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

Use h1 heading as title? #30

Open
arthur-shaw opened this issue Mar 6, 2024 · 2 comments
Open

Use h1 heading as title? #30

arthur-shaw opened this issue Mar 6, 2024 · 2 comments

Comments

@arthur-shaw
Copy link
Collaborator

Currently, adodownr looks for a title in YAML. If it exists, it uses that as title. If it doesn't exist, it takes the file name as title.

For the adodown documentation, article titles appear as h1 headers (ie, come after #). That generates strange articles that have two titles (h1 headings): name of the file, since no title was found with current heuristics; h1 heading that already exists in the article.

Should we take the first h1 heading as the title?

@arthur-shaw
Copy link
Collaborator Author

@kbjarkefur , what do you think?

@kbjarkefur
Copy link
Collaborator

Yes, I think the best solution here. The first h1 header becomes the title of the page.

What will happen to the URL? I think file name, which is what we use now, is still best for the URL path. I can see someone editing a h1 header not thinking it will break URLs that might already be shared. I think it is much more likely that people understand that changing file names could break current links to web documentation.

And even if a user don't understand this ex-ante, they are more likely to at least have understanding for this ex-post.

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