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

Nested list do not work? #2125

Closed
begueradj opened this issue Mar 25, 2017 · 7 comments
Closed

Nested list do not work? #2125

begueradj opened this issue Mar 25, 2017 · 7 comments

Comments

@begueradj
Copy link

begueradj commented Mar 25, 2017

I tried different ways to write nested lists in my markdown files, but I always get in the output HTML file normal lists instead.

How to write nested lists in Pelican?

@avaris
Copy link
Member

avaris commented Mar 25, 2017

The same way you do it in markdown, indent with a tab or 4 spaces per level.

- list 1
- list 2
    - list 2.1
        - list 2.1.1
    - list 2.2
    - list 2.3 
- list 3

@ramonsuarez
Copy link

I had to add a blank line between the last line of text and the first line of the list to make it work.

@turicas
Copy link

turicas commented Oct 3, 2020

GitHub-flavored markdown accepts 2 levels of indentation (which I prefer), so this:

- test
  - nested

turn into this:

  • test
    • nested

Is it possible to force this behavior in pelican?

@justinmayer
Copy link
Member

justinmayer commented Oct 3, 2020 via email

@turicas
Copy link

turicas commented Oct 3, 2020

Actually, to make markdown easier to use, pelican could just configure python-markdown to accept 2 spaces as indentation (this will apply to all indentation, including code; there's also an extension to fix just list's indentation).

@justinmayer
Copy link
Member

To be clear, how markup is rendered is still not directly in Pelican's bailiwick. You are correct that there are ways to control how Python-Markdown behaves, but instead of doing that for all users in Pelican core, that should be configured by individual end users via the MARKDOWN setting (see appropriate entry in the Settings section of the docs for more detail). I think that using a custom Python-Markdown extension is indeed perhaps the best way to achieve the desired result.

@turicas
Copy link

turicas commented Oct 4, 2020

To be clear, how markup is rendered is still not directly in Pelican's bailiwick. You are correct that there are ways to control how Python-Markdown behaves, but instead of doing that for all users in Pelican core, that should be configured by individual end users via the MARKDOWN setting (see appropriate entry in the Settings section of the docs for more detail). I think that using a custom Python-Markdown extension is indeed perhaps the best way to achieve the desired result.

Ok, thanks. :)

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

5 participants