Creación de un sitio .rst

Recorremos el proceso de creación de un nuevo subdirectorio de sitio en nuestro repositorio git para documentar los pasos necesarios al iniciar un nuevo sitio.

Esto no cubre la creación real de la infraestructura de alojamiento dentro de bunny.net. Por lo tanto, no seguimos ningún paso relacionado con la publicación en este ejemplo.

mypelican_static_sites es el proyecto de repositorio git donde lo configuramos.

Creamos un nuevo sitio llamado: dummy.bernatchez.net

Crear el nuevo directorio del sitio y poblarlo

# crear
cd ${HOME}/repos/mypelican_static_sites
mkdir dummy.bernatchez.net

# poblar
cp -r -P init.files/* dummy.bernatchez.net/

Agregar estos nuevos archivos específicos del sitio al control de revisión git

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net
# los git adds están por determinarse

Referenciar los artículos pelican/ preexistentes dentro de nuestro sitio de prueba

Solo es necesario que el directorio exista bajo content/ para eso. El Makefile se encarga de poblar el subdirectorio.

Agregaremos un archivo placeholder.txt en ese directorio para que git clone cree el subdirectorio en el futuro.

cd ${HOME}/repos/mypelican_static_files/dummy.bernatchez.net
mkdir content/pelican

# esto asegura que el directorio pelican/ se cree en adelante al hacer git clone
cp content/pages/placeholder.txt content/pelican/placeholder.txt
git add content/pelican/placeholder.txt

Agregar las siguientes líneas al final de ".gitignore"

cd ${HOME}/repos/mypelican_static_sites

cat >>.gitignore <<EOFGITIGNORE
##
## BEGIN added for a new site
##

# dummy.bernatchez.net softlinks

dummy.bernatchez.net/content/favicon.ico
dummy.bernatchez.net/content/images/
dummy.bernatchez.net/content/site-only/
dummy.bernatchez.net/content/pages/
dummy.bernatchez.net/content/pelican/

dummy.bernatchez.net/content/images/*
dummy.bernatchez.net/content/site-only/*
dummy.bernatchez.net/content/pages/*
dummy.bernatchez.net/content/pelican/*


# dummy.bernatchez.net bucket is all generated
dummy.bernatchez.net/bucket/
dummy.bernatchez.net/bucket/*

##
## END additions for a new site
##
EOFGITIGNORE
cd ${HOME}/repos/mypelican_static_sites
git add .gitignore

Poner los archivos personalizables bajo control de versiones

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net

git add Makefile
git add deploy.bunny
git add favicon.ico
git add login.bunny
git add names.bunny
git add notes.txt
git add pelicanconf-en.py
git add pelicanconf-es.py
git add pelicanconf-fr.py
git add publishconf-en.py
git add publishconf-es.py
git add publishconf-fr.py
git add purge.bunny
git add puta2p.sh

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/pages
git add *.rst

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/content
git add binaries images sitepdfs

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/pages-media
git add *
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/pages-pdfs
git add placeholder.txt
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/site-only-pdfs
git add placeholder.txt
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/site-only
git add *.rst
# Confirmar sus adiciones git

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/
git commit -m new-dummy-site

Generar esta primera revisión del sitio

cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/
make html

# revisar y continuar el mantenimiento según sea necesario
Publicado el par Pierre Bernatchez dans «pelican». Palabras clave: pelican, git