diff --git a/pelicanconf.py b/pelicanconf.py
index 45f283f..226e778 100644
--- a/pelicanconf.py
+++ b/pelicanconf.py
@@ -12,6 +12,10 @@ DISPLAY_CATEGORIES_ON_MENU = True
DISPLAY_PAGES_ON_MENU = True
MARKDOWN = {
'extension_configs': {
+ 'markdown.extensions.toc': {
+ 'title': 'Tabla de Contenidos',
+ 'permalink': 'true'
+ },
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.footnotes': {'BACKLINK_TITLE': 'Volver a la nota %d en el texto'},
@@ -24,7 +28,7 @@ MARKDOWN = {
PATH = 'content'
PLUGIN_PATHS = ['plugins']
-PLUGINS = ['another_read_more_link', 'i18n_subsites', 'neighbors', 'pelican-css', 'pelican-js', 'sitemap', 'tag-cloud', 'tipue-search']
+PLUGINS = ['another_read_more_link', 'extract_toc', 'i18n_subsites', 'neighbors', 'pelican-css', 'pelican-js', 'sitemap', 'tag-cloud', 'tipue-search']
SITENAME = 'Conocimientos Libres'
SITENAME_SINGLE = 'CL'
SITEURL = 'https://conocimientoslibres.tuxfamily.org'
@@ -128,6 +132,9 @@ I18N_SUBSITES = {
'LOCALE': ('en_US.UTF-8'),
'MARKDOWN': {
'extension_configs': {
+ 'markdown.extensions.toc': {
+ 'title': 'Table of Contents',
+ },
'markdown.extensions.codehilite': {'css_class': 'highlight'},
'markdown.extensions.extra': {},
'markdown.extensions.footnotes': {'BACKLINK_TITLE': 'Jump back to footnote %d in the text'},
diff --git a/plugins/extract_toc/README.md b/plugins/extract_toc/README.md
new file mode 100644
index 0000000..40d2bee
--- /dev/null
+++ b/plugins/extract_toc/README.md
@@ -0,0 +1,137 @@
+Extract Table of Content
+========================
+
+A Pelican plugin to extract table of contents (ToC) from `article.content` and
+place it in its own `article.toc` variable for use in templates.
+
+Copyright (c) Talha Mansoor
+
+Author | Talha Mansoor
+----------------|-----
+Author Email | talha131@gmail.com
+Author Homepage | http://onCrashReboot.com
+Github Account | https://github.com/talha131
+
+
+Acknowledgement
+---------------
+
+Thanks to [Avaris](https://github.com/avaris) for going out of the way to help
+me fix Unicode issues and doing a thorough code review.
+
+Thanks to [gw0](http://gw.tnode.com/) for adding Pandoc reader support.
+
+
+Why do you need it?
+===================
+
+Pelican can generate ToC of reST and Markdown files, using markup's respective
+directive and extension. Such ToC is generated and placed at the beginning of
+`article.content` like a string. Consequently it can not be placed anywhere
+else on the page (eg. `