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

Markdown extension: sections #19

Closed
danburzo opened this issue Jun 16, 2018 · 2 comments
Closed

Markdown extension: sections #19

danburzo opened this issue Jun 16, 2018 · 2 comments
Labels
brainstorming Discussing ideas around a concept and its implementation help wanted Extra attention is needed Priority: nice to have

Comments

@danburzo
Copy link
Member

This is just an idea so far, but:

Using the § character (which hopefully most people have access to form their keyboard in one way or another), you can define sections in the content.

§ Named Section
§
Above is an anonymous section

When processing the Markdown, the post object receives the following properties:

content is the whole content (all sections together) — do we strip out the section names, convert them to headings?

sections is an object containing the individual sections. Now, it can either be an object or an array, or both. It should be easy to:

  • refer to particular sections (e.g. post.sections.excerpt)
  • iterate on many, anonymous sections (e.g. {% for section in post.sections %})

The use

  • Excerpts
  • Pagination
  • Many more, I would assume
@danburzo danburzo added brainstorming Discussing ideas around a concept and its implementation help wanted Extra attention is needed labels Jun 16, 2018
This was referenced Jun 16, 2018
@danburzo danburzo added the Priority: nice to have label Jun 16, 2018
@danburzo
Copy link
Member Author

Implemented as https://github.com/marceljs/markdown-split, it now just needs to be integrated.

@danburzo
Copy link
Member Author

See also: mdx-js/mdx#454

@danburzo danburzo closed this as completed Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
brainstorming Discussing ideas around a concept and its implementation help wanted Extra attention is needed Priority: nice to have
Projects
None yet
Development

No branches or pull requests

1 participant