Creation of a .rst site
We go through the process of creating a new site subdirectory in our git repository here to record a walk through of starting a new site.
For the actual creation of hosting infrastructure within a bunny.net account see: newbunny site
mypelican_static_sites is the git repository project where we set it up.
We make a new site is called: dummy.bernatchez.net
Create the new site directory and populate it
# create
cd ${HOME}/repos/mypelican_static_sites
mkdir dummy.bernatchez.net
# populate
cp -r -P init.files/* dummy.bernatchez.net/
reference the pre-existing pelican/ articles within our dummy site
You only need for the directory to exist under content/ for that. The Makefile takes care of populating the subdirectory.
We will add a placeholder.txt file in that directory so that git clone will create the subdirectory in the future.
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net
mkdir content/pelican
# this assures pelican/ directory is created henceforth upon git clone
cp content/pages/placeholder.txt content/pelican/placeholder.txt
git add content/pelican/placeholder.txt
Add the following lines to the end of ".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
Put the customizable files under version control
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
# Commit your git additions
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/
git commit -m new-dummy-site
Generate this first revision of the site
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/
make html
# revise and continue maintaining as and when required
Once you are satisfied with the site generate a publishable version
This relies on the bunny.net storage zone and pull zone existing otherwise the deploy.bunny step will fail.
cd ${HOME}/repos/mypelican_static_sites/dummy.bernatchez.net/
make pubhtml