cd mysite > pelican-quickstart • Follow the prompts to set up your site configuration ◦ For the question Do you want to specify a URL prefix? use: https://sites.lipn.univ-paris13.fr/<group>/<project> • This creates a basic directory structure and a sample article Project Structure > mysite/ > content > Makefile > output > pelicanconf.py > publishconf.py > tasks.py Jaime Arias Creating Static Sites with Pelican B 7 /27
inside the content folder, all the files in it will be used to generate static pages, such as About or Contact pages. Creating an About Page > mkdir -p content/pages > echo "Title: About" >> content/pages/about.md Project Structure with Pages > mysite/ > content > pages > about.md > Makefile > output > pelicanconf.py > publishconf.py > tasks.py Jaime Arias Creating Static Sites with Pelican B 9 /27
the pelican command to generate your site. It will generate your site and save it in the output/ folder. Generating the Site > pelican content • Preview your site by navigating to http://localhost:8000/ in your browser Serving the Site Locally > pelican --autoreload --listen Jaime Arias Creating Static Sites with Pelican B 11 /27
directory in your project 2. Clone the plugin repository into this directory and remove the .git folder Cloning the Plugins > cd plugins > git clone https://github.com/VorpalBlade/pelican-cite > rm -rf pelican-cite/.git 3. Update your pelicanconf.py to use the new plugin # Specify the plugins you want to use and their paths PLUGIN_PATHS = ["plugins"] PLUGINS = ['pelican-cite'] 4. Read the documentation of the plugin to know how to configure it Jaime Arias Creating Static Sites with Pelican B 14 /27
file): Installing Dependencies > pip install pybtex • Create a data/ directory in your project and add your BibTeX file there Adding a BibTeX File > mkdir -p data > cp /path/to/your/publications.bib data/ • Update your pelicanconf.py to load the BibTeX file # Specify the path to your BibTeX file PUBLICATIONS_SRC = 'data/publications.bib' Jaime Arias Creating Static Sites with Pelican B 15 /27
• Live demos → https://pelicanthemes.com/ Installation: 1. Create a themes/ directory in your project 2. Clone the theme repository into this directory and remove the .git folder Cloning a Theme > cd themes > git clone https://github.com/jvanz/pelican-hyde > rm -rf pelican-hyde/.git 3. Update your pelicanconf.py to use the new theme # Specify name of a theme installed THEME = 'themes/pelican-hyde' 4. Read the documentation of the theme to know how to configure it Jaime Arias Creating Static Sites with Pelican B 18 /27
a .gitlab-ci.yml file in the root of your project with the following content: 1 image: python:3.13-alpine 2 3 pages: 4 stage: deploy 5 script: 6 - apk add --update --no-cache make 7 - pip install -r requirements.txt 8 - make publish 9 - mv output public # GitLab Pages expects the site to be in "public" 10 artifacts: 11 paths: 12 - public/ Jaime Arias Creating Static Sites with Pelican B 24 /27
your site using the public_html folder on the server • Your site will be available at https://lipn.univ-paris13.fr/~user • To publish your site, you need to follow these steps: 1. Modify the publishconf.py file to set the correct URL prefix SITEURL = 'https://lipn.univ-paris13.fr/~user' 2. Generate your site locally for production Generating the Site for Production > make publish 3. Copy the generated site to the public_html directory on the server Publishing to LIPN Server > scp -r output/* [email protected]:~/public_html/ Jaime Arias Creating Static Sites with Pelican B 26 /27