tree: 06f768207a294601d396eb6ebed453964a0dbc68 [path history] [tgz]
  1. README.md
  2. base.html
  3. page.html
  4. styles.css
theme/apache/templates/README.md

Apache Theme

The Apache Theme included here consists two types of files.

  • Page templates.
  • CSS stylesheets.

Page Templates

  • base.html - the main template. Other templates extend this template automatically even those in the default pelican thme.
  • page.html - this overrides pelican‘s default/simple page.html which includes <h1>{{ page.title }}</h1>. We don’t want that behavior.

Change base.html as necessary. Add new override templates if required. See Pelican documentation about inheritance from the simple theme.

CSS Stylesheets

In this site the css included by base.html is found in the content tree. There are site or template specific overrides to the stylesheet frameworks, but these are not done as Pelican specifies.

  • styles.css - consists of custom site CSS overrides. Edit as needed. Here we include the css for the ASF permalink style. This file is in the same directory as the html and is included inline with {% include "styles.css" %}

Page Metadata

This theme uses the following metadata:

  • Title. Used in base.html with <title>{{ page.title }}</title> to provide the page title.

  • Notice. This is notice text which is typically a link to the license.

    {% if page.notice %}<!-- {{ page.notice }} -->{% endif %}

  • License. This is an alternative to Notice.

  • bodytag. This adds attributes to the <body> element. This is allows the main index.ezmd to have the same template, but with differing layout.

    <body{% if page.bodytag %} {{ page.bodytag }}{% endif %} >

Pelican Settings

Pelican settings are provided in the pelicanconf.py file.

Some settings inlude:

SITEURL = 'https://www.apache.org'
SITEREPOSITORY = 'https://github.com/apache/www-site/blob/main/content/'
CURRENTYEAR = date.today().year

The file contains helpful comments about the settings.

  • In base.html CURRENTYEAR is used for the copyright.

    Copyright &#169; {{ CURRENTYEAR }} The Apache Software Foundation

Pelican Themes

This is a custom theme. Pelican templates use Jinja

History - Apache CMS

The svn history was not migrated and remains available.