From c3ef98c98d7ba35f82eabe3632e028b2105257ae Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Tue, 7 Mar 2017 11:44:47 +0300 Subject: [PATCH 01/10] Initial Home page --- Home.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Home.md diff --git a/Home.md b/Home.md new file mode 100644 index 0000000..f9aec7e --- /dev/null +++ b/Home.md @@ -0,0 +1 @@ +Welcome to the pelican-alchemy wiki! \ No newline at end of file From bc527aac46972733d8b94c9b230dc1b07877db17 Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Tue, 7 Mar 2017 12:01:08 +0300 Subject: [PATCH 02/10] Created Tips (markdown) --- Tips.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Tips.md diff --git a/Tips.md b/Tips.md new file mode 100644 index 0000000..cd304cb --- /dev/null +++ b/Tips.md @@ -0,0 +1,58 @@ +## Bootstrap classes + +To have Bootstrap classes set for rendered html (`.table`, `.img-fluid` etc), use the [Bootstrapify](https://github.com/ingwinlu/pelican-bootstrapify) Pelican plugin. + +In your Pelican site: + + $ mkdir plugins + $ git submodule add https://github.com/ingwinlu/pelican-bootstrapify plugins/pelican-bootstrapify + +And Pelican config: + + # http://docs.getpelican.com/en/stable/plugins.html#how-to-use-plugins + PLUGIN_PATHS = ['plugins'] + PLUGINS = ['pelican-bootstrapify'] + + BOOTSTRAPIFY = { + 'table': ['table', 'table-striped', 'table-hover'], + 'img': ['img-fluid'], + 'blockquote': ['blockquote'], + } + +Use `BOOTSTRAPIFY` to pass a `{'css-selector': ['list-of-classes']}` dict to the plugin. Bootstrapify will append `list-of-classes` to all tags that match `css-selector`. + +## Favicons + +To use the `RFG_FAVICONS` setting, visit [Favicon Generator](http://realfavicongenerator.net/) to generate a favicon package and download it. + +In your Pelican site: + + $ mkdir content/extras + $ unzip /PATH_TO_PACKAGE.zip -d content/extras + +And Pelican config: + + # https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#second-solution-using-static_paths + STATIC_PATHS = ['extras', 'images'] + EXTRA_PATH_METADATA = { + 'extras/android-chrome-192x192.png': {'path': 'android-chrome-192x192.png'}, + 'extras/apple-touch-icon.png': {'path': 'apple-touch-icon.png'}, + 'extras/browserconfig.xml': {'path': 'browserconfig.xml'}, + ... + } + + RFG_FAVICONS = True + +`EXTRA_PATH_METADATA` should correspond with the favicon package: + + $ unzip -l /path/to/favicons.zip + +## Use `sitemap.xml` + +There is a `sitemap.html` Jinja2 template that can be used to [generate a sitemap](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml). + +In your Pelican config: + + # Default value is ['index', 'tags', 'categories', 'authors', 'archives'] + DIRECT_TEMPLATES = ['index', 'tags', 'categories', 'authors', 'archives', 'sitemap'] + SITEMAP_SAVE_AS = 'sitemap.xml' From 2c7f3a01199b9982d630f8a0c16c4bebc76b418b Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Tue, 7 Mar 2017 12:01:23 +0300 Subject: [PATCH 03/10] Created Settings (markdown) --- Settings.md | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 Settings.md diff --git a/Settings.md b/Settings.md new file mode 100644 index 0000000..e7ea65f --- /dev/null +++ b/Settings.md @@ -0,0 +1,103 @@ +Unless otherwise specified, settings that refer to paths can be either absolute or relative to the configuration file. + +## SITESUBTITLE + +Subtitle that appears in the header: + + SITESUBTITLE = 'A magical \u2728 Pelican theme' + +## SITEIMAGE + +Image that appears in the header: + + SITEIMAGE = '/images/profile.png' + +You can also force the image size: + + SITEIMAGE = '/images/profile.svg width=200 height=200' + +## DESCRIPTION + +Index HTML head `` description: + + DESCRIPTION = 'A functional, clean, responsive theme for Pelican. Heavily ' \ + 'inspired by crowsfoot and clean-blog, powered by Bootstrap.' + +## LINKS + +A list of tuples (Title, URL) for menu links: + + LINKS = ( + ('Pelican', 'http://getpelican.com/'), + ('Python.org', 'http://python.org/'), + ('Jinja2', 'http://jinja.pocoo.org/'), + ) + +## ICONS + +A list of tuples (Icon, URL) for icon links: + + ICONS = ( + ('github', 'https://github.com/nairobilug/pelican-alchemy'), + ) + +Icon in (Icon, URL) is a Font Awesome [icon](http://fontawesome.io/icons/) without the `fa-` prefix. + +## PYGMENTS_STYLE + +You can choose one of the built-in Pygments styles for syntax highlighting. + +By default the `default` style is used: + + PYGMENTS_STYLE = 'default' + +The following styles are available: + +- algol +- algol_nu +- autumn +- borland +- bw +- colorful +- default +- emacs +- friendly +- fruity +- igor +- lovelace +- manni +- monokai +- murphy +- native +- paraiso-dark +- paraiso-light +- pastie +- perldoc +- rrt +- tango +- trac +- vim +- vs +- xcode + +For a demo of the different styles, see [link](http://pygments.org/demo/). + +## HIDE_AUTHORS + +Hide the author(s) of an article - useful for single author sites: + + HIDE_AUTHORS = True + +## NEW_FAVICONS + +Use a [realfavicongenerator](https://realfavicongenerator.net/blog/new-favicon-package-less-is-more/) favicon package: + + RFG_FAVICONS = True + +--- + + DISQUS_SITENAME = '...' + GAUGES = '...' + GOOGLE_ANALYTICS = '...' + PIWIK_URL = '...' + PIWIK_SITE_ID = '...' From 4284cd67bc28707221ffaaac47d2faa409798d0e Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Tue, 7 Mar 2017 12:01:34 +0300 Subject: [PATCH 04/10] Updated Home (markdown) --- Home.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Home.md b/Home.md index f9aec7e..da8dbbe 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,8 @@ -Welcome to the pelican-alchemy wiki! \ No newline at end of file +Welcome to the pelican-alchemy wiki! + +- [Settings](wiki/Settings) +- [Tips](wiki/Tips) + +## Contributing + +Pull requests are welcome! From f23520fb291f42e5b9867b7400c443e6c9d94c3a Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Wed, 22 Nov 2017 00:25:38 +0300 Subject: [PATCH 05/10] Code formatting --- Pelican-Tips.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ Tips.md | 58 ---------------------------------------- 2 files changed, 70 insertions(+), 58 deletions(-) create mode 100644 Pelican-Tips.md delete mode 100644 Tips.md diff --git a/Pelican-Tips.md b/Pelican-Tips.md new file mode 100644 index 0000000..4318a4e --- /dev/null +++ b/Pelican-Tips.md @@ -0,0 +1,70 @@ +## Bootstrap Classes + +To have Bootstrap classes set for rendered html (`.table`, `.img-fluid` etc), use the [Bootstrapify](https://github.com/ingwinlu/pelican-bootstrapify) Pelican plugin. + +In your Pelican site: + +```bash +mkdir plugins +git submodule add https://github.com/ingwinlu/pelican-bootstrapify plugins/pelican-bootstrapify +``` + +And in Pelican config: + +```python +# http://docs.getpelican.com/en/stable/plugins.html#how-to-use-plugins +PLUGIN_PATHS = ['plugins'] +PLUGINS = ['pelican-bootstrapify'] + +BOOTSTRAPIFY = { + 'table': ['table', 'table-striped', 'table-hover'], + 'img': ['img-fluid'], + 'blockquote': ['blockquote'], +} +``` + +Use `BOOTSTRAPIFY` to pass a `{'css-selector': ['list-of-classes']}` dict to the plugin. Bootstrapify will append `list-of-classes` to all tags that match `css-selector`. + +## Favicons + +To use the `RFG_FAVICONS` setting, visit [Favicon Generator](http://realfavicongenerator.net/) to generate a favicon package and download it. + +In your Pelican site: + +``` +mkdir content/extras +unzip .zip -d content/extras +``` + +And in Pelican config: + +```python +# https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#second-solution-using-static_paths +STATIC_PATHS = ['extras', 'images'] +EXTRA_PATH_METADATA = { + 'extras/android-chrome-192x192.png': {'path': 'android-chrome-192x192.png'}, + 'extras/apple-touch-icon.png': {'path': 'apple-touch-icon.png'}, + 'extras/browserconfig.xml': {'path': 'browserconfig.xml'}, + ... +} + +RFG_FAVICONS = True +``` + +`EXTRA_PATH_METADATA` should correspond with the favicon package: + +```bash +unzip -l .zip +``` + +## Use `sitemap.xml` + +There is a `sitemap.html` Jinja2 template that can be used to [generate a sitemap](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml). + +In your Pelican config: + +```python +# Default value is ['index', 'tags', 'categories', 'authors', 'archives'] +DIRECT_TEMPLATES = ['index', 'tags', 'categories', 'authors', 'archives', 'sitemap'] +SITEMAP_SAVE_AS = 'sitemap.xml' +``` \ No newline at end of file diff --git a/Tips.md b/Tips.md deleted file mode 100644 index cd304cb..0000000 --- a/Tips.md +++ /dev/null @@ -1,58 +0,0 @@ -## Bootstrap classes - -To have Bootstrap classes set for rendered html (`.table`, `.img-fluid` etc), use the [Bootstrapify](https://github.com/ingwinlu/pelican-bootstrapify) Pelican plugin. - -In your Pelican site: - - $ mkdir plugins - $ git submodule add https://github.com/ingwinlu/pelican-bootstrapify plugins/pelican-bootstrapify - -And Pelican config: - - # http://docs.getpelican.com/en/stable/plugins.html#how-to-use-plugins - PLUGIN_PATHS = ['plugins'] - PLUGINS = ['pelican-bootstrapify'] - - BOOTSTRAPIFY = { - 'table': ['table', 'table-striped', 'table-hover'], - 'img': ['img-fluid'], - 'blockquote': ['blockquote'], - } - -Use `BOOTSTRAPIFY` to pass a `{'css-selector': ['list-of-classes']}` dict to the plugin. Bootstrapify will append `list-of-classes` to all tags that match `css-selector`. - -## Favicons - -To use the `RFG_FAVICONS` setting, visit [Favicon Generator](http://realfavicongenerator.net/) to generate a favicon package and download it. - -In your Pelican site: - - $ mkdir content/extras - $ unzip /PATH_TO_PACKAGE.zip -d content/extras - -And Pelican config: - - # https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#second-solution-using-static_paths - STATIC_PATHS = ['extras', 'images'] - EXTRA_PATH_METADATA = { - 'extras/android-chrome-192x192.png': {'path': 'android-chrome-192x192.png'}, - 'extras/apple-touch-icon.png': {'path': 'apple-touch-icon.png'}, - 'extras/browserconfig.xml': {'path': 'browserconfig.xml'}, - ... - } - - RFG_FAVICONS = True - -`EXTRA_PATH_METADATA` should correspond with the favicon package: - - $ unzip -l /path/to/favicons.zip - -## Use `sitemap.xml` - -There is a `sitemap.html` Jinja2 template that can be used to [generate a sitemap](https://github.com/getpelican/pelican/wiki/Tips-n-Tricks#generate-sitemapxml). - -In your Pelican config: - - # Default value is ['index', 'tags', 'categories', 'authors', 'archives'] - DIRECT_TEMPLATES = ['index', 'tags', 'categories', 'authors', 'archives', 'sitemap'] - SITEMAP_SAVE_AS = 'sitemap.xml' From df7bd6516061c6a32bb56500b25e016bc1e0f01c Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Wed, 22 Nov 2017 00:28:08 +0300 Subject: [PATCH 06/10] Code formatting --- Settings.md | 62 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 21 deletions(-) diff --git a/Settings.md b/Settings.md index e7ea65f..dcff669 100644 --- a/Settings.md +++ b/Settings.md @@ -4,42 +4,54 @@ Unless otherwise specified, settings that refer to paths can be either absolute Subtitle that appears in the header: - SITESUBTITLE = 'A magical \u2728 Pelican theme' +```python +SITESUBTITLE = 'A magical \u2728 Pelican theme' +``` ## SITEIMAGE Image that appears in the header: - SITEIMAGE = '/images/profile.png' +```python +SITEIMAGE = '/images/profile.png' +``` You can also force the image size: - SITEIMAGE = '/images/profile.svg width=200 height=200' +```python +SITEIMAGE = '/images/profile.svg width=200 height=200' +``` ## DESCRIPTION Index HTML head `` description: - DESCRIPTION = 'A functional, clean, responsive theme for Pelican. Heavily ' \ - 'inspired by crowsfoot and clean-blog, powered by Bootstrap.' +```python +DESCRIPTION = 'A functional, clean, responsive theme for Pelican. Heavily ' \ + 'inspired by crowsfoot and clean-blog, powered by Bootstrap.' +``` ## LINKS A list of tuples (Title, URL) for menu links: - LINKS = ( - ('Pelican', 'http://getpelican.com/'), - ('Python.org', 'http://python.org/'), - ('Jinja2', 'http://jinja.pocoo.org/'), - ) +```python +LINKS = ( + ('Pelican', 'http://getpelican.com/'), + ('Python.org', 'http://python.org/'), + ('Jinja2', 'http://jinja.pocoo.org/'), +) +``` ## ICONS A list of tuples (Icon, URL) for icon links: - ICONS = ( - ('github', 'https://github.com/nairobilug/pelican-alchemy'), - ) +```python +ICONS = ( + ('github', 'https://github.com/nairobilug/pelican-alchemy'), +) +``` Icon in (Icon, URL) is a Font Awesome [icon](http://fontawesome.io/icons/) without the `fa-` prefix. @@ -49,7 +61,9 @@ You can choose one of the built-in Pygments styles for syntax highlighting. By default the `default` style is used: - PYGMENTS_STYLE = 'default' +```python +PYGMENTS_STYLE = 'default' +``` The following styles are available: @@ -86,18 +100,24 @@ For a demo of the different styles, see [link](http://pygments.org/demo/). Hide the author(s) of an article - useful for single author sites: - HIDE_AUTHORS = True +```python +HIDE_AUTHORS = True +``` ## NEW_FAVICONS Use a [realfavicongenerator](https://realfavicongenerator.net/blog/new-favicon-package-less-is-more/) favicon package: - RFG_FAVICONS = True +```python +RFG_FAVICONS = True +``` --- - DISQUS_SITENAME = '...' - GAUGES = '...' - GOOGLE_ANALYTICS = '...' - PIWIK_URL = '...' - PIWIK_SITE_ID = '...' +```python +DISQUS_SITENAME = '...' +GAUGES = '...' +GOOGLE_ANALYTICS = '...' +PIWIK_URL = '...' +PIWIK_SITE_ID = '...' +``` \ No newline at end of file From e0f293ec8a4031055d027b1b848a8790a86bbaa2 Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Wed, 22 Nov 2017 00:31:00 +0300 Subject: [PATCH 07/10] Updated Home (markdown) --- Home.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Home.md b/Home.md index da8dbbe..d77ad76 100644 --- a/Home.md +++ b/Home.md @@ -1,8 +1,4 @@ Welcome to the pelican-alchemy wiki! - [Settings](wiki/Settings) -- [Tips](wiki/Tips) - -## Contributing - -Pull requests are welcome! +- [Pelican Tips](wiki/Pelican-Tips) \ No newline at end of file From bca255621679e0f8eb29c2391269bc95f9a7e33a Mon Sep 17 00:00:00 2001 From: Raymond Wanyoike Date: Wed, 22 Nov 2017 00:31:20 +0300 Subject: [PATCH 08/10] Updated Home (markdown) --- Home.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Home.md b/Home.md index d77ad76..ac93b94 100644 --- a/Home.md +++ b/Home.md @@ -1,4 +1,4 @@ Welcome to the pelican-alchemy wiki! -- [Settings](wiki/Settings) -- [Pelican Tips](wiki/Pelican-Tips) \ No newline at end of file +- [Pelican Tips](wiki/Pelican-Tips) +- [Settings](wiki/Settings) \ No newline at end of file From ce6446a46c119c4c332c6344b12915547d049ac2 Mon Sep 17 00:00:00 2001 From: Vitaly Potyarkin Date: Tue, 3 Dec 2019 16:13:05 +0300 Subject: [PATCH 09/10] Prepare wiki for integration with main repo --- Home.md => docs/README.md | 0 Pelican-Tips.md => docs/pelican-tips.md | 0 Settings.md => docs/settings.md | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename Home.md => docs/README.md (100%) rename Pelican-Tips.md => docs/pelican-tips.md (100%) rename Settings.md => docs/settings.md (100%) diff --git a/Home.md b/docs/README.md similarity index 100% rename from Home.md rename to docs/README.md diff --git a/Pelican-Tips.md b/docs/pelican-tips.md similarity index 100% rename from Pelican-Tips.md rename to docs/pelican-tips.md diff --git a/Settings.md b/docs/settings.md similarity index 100% rename from Settings.md rename to docs/settings.md From c0b7c1b110f86f34c1a39343730622824d8e2f9a Mon Sep 17 00:00:00 2001 From: Vitaly Potyarkin Date: Tue, 3 Dec 2019 16:23:17 +0300 Subject: [PATCH 10/10] Fix links and headings after merging wiki contents --- README.md | 4 ++-- docs/README.md | 6 +++--- docs/pelican-tips.md | 4 +++- docs/settings.md | 4 +++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 26aef83..5619856 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ THEME = alchemy.path() ## Usage -Visit the [Settings wiki](https://github.com/nairobilug/pelican-alchemy/wiki/Settings) for examples: +Visit the [Settings docs](docs/settings.md) for examples: - **SITESUBTITLE**: Subtitle that appears in the header. - **SITEIMAGE**: Image that appears in the header. @@ -141,7 +141,7 @@ Example [pelicanconf.py](https://github.com/nairobilug/pelican-alchemy/blob/demo ### Tips & Tricks -https://github.com/nairobilug/pelican-alchemy/wiki/Tips +[See documentation page](docs/pelican-tips.md) ## How to Contribute diff --git a/docs/README.md b/docs/README.md index ac93b94..de439b0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,4 @@ -Welcome to the pelican-alchemy wiki! +Welcome to the pelican-alchemy documentation! -- [Pelican Tips](wiki/Pelican-Tips) -- [Settings](wiki/Settings) \ No newline at end of file +- [Pelican Tips](pelican-tips.md) +- [Settings](settings.md) diff --git a/docs/pelican-tips.md b/docs/pelican-tips.md index 4318a4e..c54709b 100644 --- a/docs/pelican-tips.md +++ b/docs/pelican-tips.md @@ -1,3 +1,5 @@ +# Pelican Tips + ## Bootstrap Classes To have Bootstrap classes set for rendered html (`.table`, `.img-fluid` etc), use the [Bootstrapify](https://github.com/ingwinlu/pelican-bootstrapify) Pelican plugin. @@ -67,4 +69,4 @@ In your Pelican config: # Default value is ['index', 'tags', 'categories', 'authors', 'archives'] DIRECT_TEMPLATES = ['index', 'tags', 'categories', 'authors', 'archives', 'sitemap'] SITEMAP_SAVE_AS = 'sitemap.xml' -``` \ No newline at end of file +``` diff --git a/docs/settings.md b/docs/settings.md index dcff669..b77083e 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -1,3 +1,5 @@ +# Settings + Unless otherwise specified, settings that refer to paths can be either absolute or relative to the configuration file. ## SITESUBTITLE @@ -120,4 +122,4 @@ GAUGES = '...' GOOGLE_ANALYTICS = '...' PIWIK_URL = '...' PIWIK_SITE_ID = '...' -``` \ No newline at end of file +```