From f0b522d8042c02396faf5f4608aca7195d34a998 Mon Sep 17 00:00:00 2001 From: Alexandre Vicenzi Date: Sat, 18 Jul 2015 21:43:25 -0300 Subject: [PATCH] Better code examples. --- README.md | 54 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 7753693..11ed817 100644 --- a/README.md +++ b/README.md @@ -20,22 +20,36 @@ A minimalist [Pelican](http://blog.getpelican.com/) theme. See what you can customize. -Maybe some Pelican settings not work properly. +> Maybe some Pelican settings not work properly. -| Name | What does it do? | Code | -|:----:|------------------|:----:| -| AUTHOR_SHORT_DESC | Short description to show below author name. | `AUTHOR_SHORT_DESC = 'Web Developer` | -| AUTHOR_IMG_URL | Profile picture to show above author name. | `AUTHOR_IMG_URL = '/static/img/me.png'` | -| COPYRIGHT_YEAR | Copyright year to display on footer. | `COPYRIGHT_YEAR = 2015` | -| CC_LICENSE | Creative Commons License to show on footer. | `CC_LICENSE = { 'name': 'Creative Commons Attribution-ShareAlike', 'version':'4.0', 'slug': 'by-sa')` | -| MENUITEMS | A list of tuples (Title, URL) for additional menu items to appear on main menu. | Same as Pelican docs. | -| LINKS | A list of tuples (Title, URL) for links to appear on the sidebar menu. | Same as Pelican docs. | -| SOCIAL | A list of tuples (name, URL) to appear in the "social" section. | See below. | -| MAIN_MENU | Show main menu. | `MAIN_MENU = True` | -| DISQUS_SITENAME | Disqus website's shortname to activate Disqus comment system. | `DISQUS_SITENAME = 'yoursite'` | -| GOOGLE_ANALYTICS | Set to ‘UA-XXXX-YYYY’ to activate Google Analytics. | `GOOGLE_ANALYTICS = 'UA-1234-5678'` | -| GOOGLE_TAG_MANAGER | Set to ‘GTM-XXXXXX’ to activate Google Tag Manager. | `GOOGLE_TAG_MANAGER = GTM-ABCDEF` | -| STATUSCAKE | Show StatusCake Uptime badge on footer. | `STATUSCAKE = { 'trackid': 'your-id', 'days': 7 }` | +| Name | What does it do? | +|:----:|------------------| +| AUTHOR_SHORT_DESC | Short description to show below author name. | +| AUTHOR_IMG_URL | Profile picture to show above author name. | +| COPYRIGHT_YEAR | Copyright year to display on footer. | +| CC_LICENSE | Creative Commons License to show on footer. | +| MENUITEMS | A list of tuples (Title, URL) for additional menu items to appear on main menu. | +| LINKS | A list of tuples (Title, URL) for links to appear on the sidebar menu. | +| SOCIAL | A list of tuples (name, URL) to appear in the "social" section. | +| MAIN_MENU | Show main menu. | +| DISQUS_SITENAME | Disqus website's shortname to activate Disqus. | +| GOOGLE_ANALYTICS | Activate Google Analytics. | +| GOOGLE_TAG_MANAGER | Activate Google Tag Manager. | +| STATUSCAKE | Show StatusCake Uptime badge on footer. | + +### Example + +```python +AUTHOR_SHORT_DESC = 'Web Developer +AUTHOR_IMG_URL = '/static/img/me.png' +COPYRIGHT_YEAR = 2015 +CC_LICENSE = { 'name': 'Creative Commons Attribution-ShareAlike', 'version':'4.0', 'slug': 'by-sa') } +MAIN_MENU = True +DISQUS_SITENAME = 'yoursite' +GOOGLE_ANALYTICS = 'UA-1234-5678' +GOOGLE_TAG_MANAGER = GTM-ABCDEF +STATUSCAKE = { 'trackid': 'your-id', 'days': 7 } +``` ### How main menu works? @@ -45,7 +59,7 @@ If `MAIN_MENU = True`, the order is: Home, `MENUITEMS`, Atom and RSS if availabl The order is Pages and `LINKS`. `LINKS` are shown in a new page. -### How Social menu works? +### How social menu works? All icons are provided by [Font Awesome](http://fortawesome.github.io/Font-Awesome/). @@ -73,13 +87,13 @@ If you need more icons, you will need to add a custom background to keep all ico ## Custom File Metadata -| Name | What does it do? | Code | -|:----:|------------------|:----:| -| Summarise | Enable Home summary | `Summarise: True` | +| Name | What does it do? | +|:----:|------------------| +| Summarise | Enable Home summary | By default, all article content is shown on Home. If the article has a custom Summary, the custom summary is shown. -If the article has Summarise metadata, the default article summary is shown. +If the article has `Summarise: True` metadata, the default article summary is shown. ## Live example