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

Extract the title from h1 #61

Open
moonglum opened this issue Apr 28, 2021 · 1 comment
Open

Extract the title from h1 #61

moonglum opened this issue Apr 28, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@moonglum
Copy link
Member

Currently, the title (used for the navigation) is extracted from the meta information in each of the files. Not providing a title will result in an error (for that matter, not providing meta information results in an error - that is quite hard to read). @joyheron suggested, to extract the title from the h1 tag of the page.

This way, you can use a regular Markdown file, which is probably easier for people new to aiur - and you can use files like the README.md of your project.

We would document this as the main way to provide a title. We would still keep the title meta option for two reasons:

  1. backwards compatibility
  2. for people that want to use a different h1 and title

Implementation notes

  • The h1 would be extracted using commonmark. We already use it to render the documents, and hook into it for our handling of snippets
@moonglum moonglum added the enhancement New feature or request label Apr 28, 2021
@FND
Copy link
Collaborator

FND commented Apr 28, 2021

As discussed elsewhere, it might be worth making a strict distinction between naked Markdown files (no front matter) and RFC 822-structured files - only the former would use h1 as title, and that's the only metadata they'll have.

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

No branches or pull requests

2 participants