pelican-mg/README.md

222 lines
6.7 KiB
Markdown
Raw Normal View History

2017-11-30 00:54:19 +00:00
pelican-mg
==========
[![Build Status](https://travis-ci.org/Lucas-C/pelican-mg.svg?branch=master)](https://travis-ci.org/Lucas-C/pelican-mg)
2014-12-29 22:08:56 +00:00
2015-01-10 19:06:27 +00:00
A minimal theme for [Pelican](http://blog.getpelican.com/) that uses uikit.
2017-08-13 18:36:09 +00:00
The theme is suited for a single author blog. Feeds are provided via ATOM.
2014-12-29 22:08:56 +00:00
This theme was developped with accessibility in mind, but may not be perfectly WCAG-compliant.
2015-01-10 19:50:43 +00:00
2017-08-10 16:30:29 +00:00
Screenshots
2015-01-10 19:50:43 +00:00
--------------
Here is how the home page look like
![mg home page screenshot](https://raw.githubusercontent.com/lucachr/pelican-mg/master/home-page-screenshot.png)
This is the article page
![mg article page screenshot](https://raw.githubusercontent.com/lucachr/pelican-mg/master/article-screenshot.png)
2017-08-10 16:30:29 +00:00
The home page on a smartphone
2015-01-10 19:50:43 +00:00
![mg home page smartphone top screenshot](https://github.com/lucachr/pelican-mg/blob/master/home-page-smartphone-top.png)
![mg home page smartphone bottom screenshot](https://github.com/lucachr/pelican-mg/blob/master/home-page-smartphone-bottom.png)
This is the article layout on a smartphone screen
![mg article page smartphone top screenshot](https://raw.githubusercontent.com/lucachr/pelican-mg/master/article-page-smartphone-top.png)
2014-12-30 00:48:06 +00:00
Live Example
--------------
2017-08-13 18:36:09 +00:00
Check out [my blog](https://chezsoi.org/lucas).
2014-12-30 00:48:06 +00:00
2014-12-29 22:08:56 +00:00
Features
--------------
2015-01-01 21:22:36 +00:00
* [Open Graph](http://ogp.me) support.
* [Twitter Summary Card](https://dev.twitter.com/cards/types/summary) support.
* [Schema.org](http://schema.org) support.
2015-01-08 23:18:22 +00:00
* Search with [Tipue Search](http://www.tipue.com/search).
2015-01-01 21:22:36 +00:00
* Responsive design.
2017-08-13 18:36:09 +00:00
* Comment with DISQUS or inno
2015-01-10 19:06:27 +00:00
* SCSS style sheets.
2015-01-08 23:18:22 +00:00
* Analytics with Google Analytics, PIWIK and StatCounter.
2014-12-29 22:08:56 +00:00
* Share buttons built with share urls.
* Custom footer notice.
2017-12-02 23:59:03 +00:00
* W3C-Validated HTML
2017-08-13 18:36:09 +00:00
Install
-------
This template uses the [representative_image](https://github.com/getpelican/pelican-plugins/tree/master/representative_image) and [image_process](https://github.com/getpelican/pelican-plugins/tree/master/image_process) plugins, so you will need to:
2017-08-13 18:36:09 +00:00
2017-12-04 22:53:23 +00:00
./run.sh install && ./run.sh dev_install
2017-08-13 18:36:09 +00:00
2014-12-29 22:08:56 +00:00
Settings
--------------
2015-01-10 19:06:27 +00:00
The following settings are required for a correct behaviour of this theme.
2015-11-23 18:18:35 +00:00
If you want to use the theme with search enabled (and probably you want it).
2015-01-01 21:22:36 +00:00
```python
TAG_SAVE_AS = ''
AUTHOR_SAVE_AS = ''
2015-01-08 23:18:22 +00:00
DIRECT_TEMPLATES = ('index', 'categories', 'archives', 'search', 'tipue_search')
TIPUE_SEARCH_SAVE_AS = 'tipue_search.json'
2015-01-01 21:22:36 +00:00
```
2015-11-23 18:18:35 +00:00
If you want to use mg with search disabled.
```python
TAG_SAVE_AS = ''
AUTHOR_SAVE_AS = ''
DIRECT_TEMPLATES = ('index', 'categories', 'archives')
2015-11-23 19:05:15 +00:00
DISABLE_SEARCH = True
2015-11-23 18:18:35 +00:00
```
2015-01-01 21:22:36 +00:00
###Optional settings
2014-12-30 20:17:01 +00:00
2017-08-10 16:30:29 +00:00
**ALT_NAME**
2014-12-30 20:17:01 +00:00
An alternative name for your site. It appears in the header bar.
2017-08-10 16:30:29 +00:00
**DESCRIPTION**
2015-01-10 19:06:27 +00:00
A brief description of your site, for social networks and search engines.
2014-12-29 22:08:56 +00:00
2017-08-10 16:30:29 +00:00
**DISABLE_SEARCH**
2015-11-23 18:18:35 +00:00
Disable search, boolean.
2017-08-10 16:30:29 +00:00
**FAVICON**
2015-01-10 19:06:27 +00:00
The relative path of your favicon, this is needed for Disqus forum favicon.
2015-01-01 21:22:36 +00:00
2017-08-10 16:30:29 +00:00
**FAVICON_TYPE**
2015-01-10 19:06:27 +00:00
The MIME type of your favicon, this is needed for Disqus forum favicon.
2015-01-01 21:25:20 +00:00
2017-08-10 16:30:29 +00:00
**FOOTER**
2014-12-29 22:08:56 +00:00
A custom footer notice.
2017-08-10 16:30:29 +00:00
**META_IMAGE**
The absolute URL of a custom image for the `og:image` meta property, Twitter
summary card, and `image` meta property of Schema.org. This image is used in
every page of the blog. Articles and pages can override the default
**META_IMAGE** by setting the "image" metadata in the relative file.
2014-12-29 22:08:56 +00:00
2017-08-10 16:30:29 +00:00
**META_IMAGE_TYPE**
2015-01-10 19:06:27 +00:00
The MIME type for **META_IMAGE**, this is needed for `og:image:type`.
2015-01-08 23:18:22 +00:00
2017-08-10 16:30:29 +00:00
**SC_PROJECT**
The StatCounter project number.
2015-01-08 23:18:22 +00:00
2017-08-10 16:30:29 +00:00
**SC_SECURITY**
2015-01-08 23:18:22 +00:00
The StatCounter security code for the project.
2017-08-10 16:30:29 +00:00
**SHARE**
2015-01-08 23:26:37 +00:00
Enable share buttons, boolean.
2017-08-10 16:30:29 +00:00
**SOCIAL**
2015-06-03 11:25:54 +00:00
A list of tuples (icon, URL). The icons are from [Font Awesome]
2017-08-10 16:30:29 +00:00
(http://fortawesome.github.io/Font-Awesome/). The suffix "-square" is removed
in the footer icons of the small screen layout.
e.g.
2014-12-29 22:08:56 +00:00
```python
SOCIAL = (('twitter', 'https://twitter.com/luca_chr'),
('google-plus-square', 'https://plus.google.com/117284397605208270870'),
('github', 'https://github.com/lucachr'),
('envelope', 'mailto:luca92web@gmail.com'),)
```
2015-01-10 19:06:27 +00:00
2017-11-07 12:26:32 +00:00
**SUPPORTS**
An optional list of tuples (img_alt, url, logo_url, title)
2017-11-14 14:12:18 +00:00
**READINGS**
An optional list of `dict`, with `img_url` & `description` fields, of books you read, from most recent to oldest.
2017-11-07 12:26:32 +00:00
**ISSO_BASE_URL**
An optional URL to an [isso](https://posativ.org/isso/) endpoint (serving `/js/embed.dev.js`).
2017-08-13 18:36:09 +00:00
**MG_DISABLE_SUMMARY**
If you do not manually provide a summary on your articles, set this to `True` so that that the articles summary is not included on the index / search result pages.
**MG_NO_EXCERPT**
Set this to `True`, if you do not want to display the last article in full on the index page.
**MG_FILTER_TAGS** and **MG_LANG_FILTER_TAGS**
Define those variables as list of tag names if you want to enable the tag filtering buttons.
2017-11-07 12:26:32 +00:00
**EXTRA_ATOM_FEED**
An extra URL providing an Atom feed of updates that you want inserted along the blog Atom feed.
2015-01-10 19:06:27 +00:00
Example Configuration
----------------------
This is the settings file for Dev's Bytes.
```python
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = 'Luca Chiricozzi'
SITENAME = "Dev's Bytes"
ALT_NAME = "#! " + SITENAME
SITESUBTITLE = "Random programming stuff"
DESCRIPTION = "A blog about programming, *nix, and software development."
SITEURL = 'http://www.devsbytes.com'
FAVICON = 'favicon.ico'
FAVICON_TYPE = 'image/vnd.microsoft.icon'
META_IMAGE = SITEURL + "/static/img/og_logo.jpg"
META_IMAGE_TYPE = "image/jpeg"
PATH = 'content'
TIMEZONE = 'Europe/Rome'
DEFAULT_LANG = 'en'
LOCALE = 'en_GB'
THEME = "themes/mg"
# Social widget
SOCIAL = (('twitter', 'https://twitter.com/luca_chr'),
('google-plus-square', 'https://plus.google.com/+LucaChiricozzi'),
('github', 'https://github.com/lucachr'),
('envelope', 'mailto:luca92web@gmail.com'),)
SHARE = True
FOOTER = ("&copy; 2015 Luca Chiricozzi. All rights reserved.<br>" +
"Code snippets in the pages are released under " +
"<a href=\"http://opensource.org/licenses/MIT\" target=\"_blank\">" +
"The MIT License</a>, unless otherwise specified.")
DEFAULT_PAGINATION = 10
TAG_SAVE_AS = ''
AUTHOR_SAVE_AS = ''
2017-08-13 21:55:44 +00:00
PLUGINS = ['representative_image']
2015-01-10 19:06:27 +00:00
DIRECT_TEMPLATES = ('index', 'categories', 'archives', 'search', 'tipue_search')
TIPUE_SEARCH_SAVE_AS = 'tipue_search.json'
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
DELETE_OUTPUT_DIRECTORY = True
TWITTER_USERNAME = 'luca_chr'
2015-06-03 11:25:30 +00:00
# DISQUS_SITENAME = "devsbytes"
# SC_PROJECT = '10224955'
# SC_SECURITY = '1f2cc438'
2015-01-10 19:06:27 +00:00
```
License
---------
mg is released under [the MIT License](http://opensource.org/licenses/MIT).