This guide is intended for those who wish to enable a TLP website that leverages Pelican and github flavored markdown (GFM) to be published by buildbot.
Resources
https://github.github.com/gfm/ – github flavored markdown
https://docs.getpelican.com/en/stable/ – pelican documentation
Key Files and Directories:
- content/pages
- static pages for your website
- only .md files
- requires 'Title:'
- requires 'Date:'
- content/articles
- articles are listed on the front page
- only .md files
- requires 'Title:'
- requires 'Date:'
- theme/plugins
- houses the plugins that Pelican uses to generate the site.
- Required for buildbot process.
- pelicanconf.py
- site configuration file
- defines plugins
Setting up a Pelican website
...
Create the repository for the website content using the gitbox self service tool (https://gitbox.apache.org/setup/newrepo.html) (or SVN).
...
- The script asks where you want to create the website. Accept " . ", the default, unless you have a specific location in mind for it.
- Title the website with $PROJECTNAME
- Set the website author as $PROJECTNAME also. This lets all members of the project edit the website.
- default language as English should be just fine
- Specify a default prefix
- default prefix should be https://$PROJECTNAME.apache.org (or similar friendly name)
- No article pagination
- Set timezone to UTC
No generation of tasks.py / makefile
Code Block |
---|
language | bash |
---|
title | Pelican Site Configuration |
---|
|
# in your site repo
for x in "content/pages content/articles theme/plugins"; do mkdir -p $x; done
rm -rf output publishconf.py
echo -e "\nPLUGIN_PATHS=['./theme/plugins']\nPLUGINS=[]\n" >> pelicanconf.py
echo -e "pelican\nbeautifulsoup4" >> requirements.txt |
...
commit and push your changes.
...
Working with Pelican websites
Updating content
Create and update markdown files (.md) in the content/pages and content/articles directories.
Pelican themes
Pelican supports the use of themes which can be found here: http://www.pelicanthemes.com/ . Be sure to specify the directory containing the 'static' and 'templates' directory as 'theme:' in the .asf.yaml
...
Related articles
Content by Label |
---|
showLabels | false |
---|
max | 5 |
---|
spaces | INFRA |
---|
showSpace | false |
---|
sort | modified |
---|
reverse | true |
---|
type | page |
---|
cql | label = "kb-how-to-article" and type = "page" and space = "INFRA" |
---|
labels | kb-how-to-articleinformation has moved here.
Related articles
...