Skip to content
/ yapeme Public

Yapeme (Yet Another PElican theME) is a responsive theme for Pelican.

License

Notifications You must be signed in to change notification settings

kplaube/yapeme

Repository files navigation

yapeme

Yapeme (Yet Another PElican theME) is a responsive theme for Pelican.

Installing

Before installing the theme, make sure to have Yarn (or NPM) installed.

First, solve the Javascript dependencies by running the following:

yarn global add postcss-cli
yarn install

And finally, the Python dependencies:

pip install -r requirements.txt

If you are running your blog/website in a Python virtualenv, make sure to install the template's dependencies there.

Plugins

This theme uses the following Pelican plugins:

Configuration

A mandatory thing is to have jinja2.ext.i18n listed as a Jinja extension:

JINJA_ENVIRONMENT = {"extensions": ["jinja2.ext.i18n"]}

Also, set I18N_TEMPLATES_LANG to pt_BR if you want the theme in Brazilian Portuguese 🇧🇷

Bellow you can see the list of all parameters used by the theme:

AUTHOR = "Author's name"
DISQUS_SITENAME = "Your Disqus sitename"
FACEBOOK_APP_ID = "Add your Facebook APP ID to check out insigths"
FEED_ALL_RSS = "Relative URL to output the all-posts RSS feed"
FEED_DOMAIN = "The domain prepended to feed URLs"
GOOGLE_ANALYTICS = "Your GA ID"
GOOGLE_SITE_VERIFICATION = "The Site Verification ID"
LICENSE = "The license"
LICENSE_TITLE = "A brief summary to print in a's title attribute"
LICENSE_URL = "The license url"
MENUITEMS = "A list of title,urls to be shown in your menu"
SITEDESCRIPTION = "A brief content for meta description"
SITENAME = "Your site name"
SITESUBTITLE = "A brief subtitle for your site"
SITEURL = "Base URL of your website"
SOURCE_CODE_REPOSITORY = "GitHub"
SOURCE_CODE_URL = "Where the source code of your blog is"

Translations

You can find the translations inside translations/ folder. If you want to contribute, please follow the instructions below:

pybabel extract --mapping babel.cfg --output translations/messages.pot ./

This is going to create the "translations template" for the project. After that, if you want to create a new language translation:

pybabel init --input-file translations/messages.pot --output-dir translations/ --locale pt-br --domain messages

Or if you want to update a already created language file:

pybabel update --input-file translations/messages.pot --output-dir translations --locale pt-br --domain messages

Now you can update the msgstr with the proper translation:

#: templates/includes/article.html:35
msgid "By"
msgstr "Por"

To conclude the translation, we need to compile the language file:

pybabel compile -d translations

Don't forget to configure your Pelican instance properly.

Screenshot

screenshot