Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table of contents for long articles #31

Open
moy opened this issue Dec 13, 2018 · 4 comments
Open

Table of contents for long articles #31

moy opened this issue Dec 13, 2018 · 4 comments

Comments

@moy
Copy link
Contributor

moy commented Dec 13, 2018

For the darktable 2.6 article (#25), I'd like to have a table of contents at the top (the article is around 30-screens long ...).

Appartently, there's a way to do that with Pelican and it seems at least partly-activated in pelicanconf.py:

# toc(permalink=True) sets all headers to have an id
# set, and an <a> after the heading.
# see: http://pythonhosted.org/Markdown/extensions/toc.html
MARKDOWN = {
  'extension_configs' : {
    #'markdown.extensions.fenced_code' : {},
    #'markdown.extensions.codehilite' : {'css_class': 'codehilite'},
    'markdown.extensions.extra' : {},
    'markdown.extensions.headerid' : {},
    'markdown.extensions.toc(permalink=)' : {}
  }
}

Unfortunately:

Any idea how to use TOC in darktable.org?

Thanks,

@patdavid
Copy link
Member

I'm in the site code now and will check - may just have to make sure the plugin is active. please hold...

@patdavid
Copy link
Member

Ok, I've got this working using my local Pelican version 3.6.3.
I had to modify the pelicanconf.py file to use the old syntax for markdown extensions. I'm not going to push anything until I can clear some details with @houz.

@houz - are we using a newer version of Pelican on the server? If so I can upgrade and test as needed.

@patdavid
Copy link
Member

I think we might be able to include both versions of python variables in the build system without harm. I'm going to test this, and if it works we might be good to include [TOC] to automatically create a Table of Contents from headings in the .md files. Stand by.

@moy
Copy link
Contributor Author

moy commented Dec 20, 2018

OK, probably best is that I let you add the [TOC] in the article, so you can easily remove it or fix the issue if it doesn't work.

Thanks for working on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants