~/mysite 2 cd ~/mysite 3 pelican-quickstart 2. When asked for your URL prefix, enter your domain name as indicated. 1 > Do you want to specify a URL prefix? e.g., http://example.com (Y/n) Y 2 3 > What is your URL prefix? (see above example; no trailing slash) https://himito-test.github.io → 4 5 > Do you want to generate a Fabfile/Makefile to automate generation and publishing? (Y/n) Y → 6 7 > Do you want an auto-reload & simpleHTTP script to assist with theme and site development? (Y/n) Y → 8 9 > Do you want to upload your website using GitHub Pages? (y/N) y 10 11 > Is this your personal page (username.github.io)? (y/N) y Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 4/19 4/19
inside the content folder, all the files in it will be used to generate static pages, such as About or Contact pages. 1 mkdir -p content/blog 2 mkdir -p content/pages 3 echo "Title: About" >> content/pages/about.md Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 5/19 5/19
the pelican command to generate your site: 1 cd ~/mysite 2 pelican content • Preview your site by navigating to http://localhost:8000/ in your browser. 1 cd ~/mysite 2 ./develop_server.sh start Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 7/19 7/19
• Installation: 1. Create a directory to save the themes 1 cd ~/mysite 2 mkdir themes 2. Select a theme and install it 1 cd ~/mysite/themes 2 git clone https://github.com/fle/pelican-sober.git 3. Update pelicanconf.py 1 # Specify name of a theme installed via the pelican-themes tool 2 THEME = 'themes/pelican-sober' 4. Read the documentation of the theme to know how to configure it Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 9/19 9/19
directory to save the plugins 1 cd ~/mysite 2 mkdir plugins 2. Select a plugin and install it 1 cd ~/mysite/plugins 2 git clone https://github.com/cmacmackin/pelican-cite.git 3. Update pelicanconf.py 1 PLUGIN_PATHS = ['plugins'] 2 PLUGINS = ['pelican-cite'] 4. Read the documentation of the plugin to know its dependencies and how to configure it Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 11/19 11/19
install pybtex • Bibtex file 1 cd ~/mysite 2 mkdir -p content/files 3 cp {$MYBIBLIO_PATH}/mybiblio.bib ~/mysite/content/files • Updating pelicanconf.py 1 echo PUBLICATIONS_SRC = \'content/files/mybiblio.bib\' >> ~/mysite/pelicanconf.py → • Using the plugin in about.md 1 Hi my name is Jaime, you can find the results of my thesis in [@Arias:Journal_UPPAAL] → Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 12/19 12/19
a specific page or article? • The following Markdown example could be stored in content/pages/home.md: 1 Title: Welcome to My Site 2 URL: 3 save_as: index.html 4 5 Thank you for visiting. Welcome! Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 15/19 15/19
2. Change to the branch with the sources 1 cd ~/mysite 2 git checkout ghp-pages 3. {Insert here the modifications …} 4. Update the Github repository 1 git add -A 2 git commit "some modifications ..." 3 git push origin ghp-pages 5. Deploy your site 1 make github 6. Check your site updated on Internet! Jaime Arias, Inria Grenoble Rhône-Alpes (2016) Creating Static Sites with Pelican ♡ 19/19 19/19