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 first heading for title #63

Merged
merged 2 commits into from
Nov 1, 2020
Merged

Use first heading for title #63

merged 2 commits into from
Nov 1, 2020

Conversation

felixfbecker
Copy link
Contributor

Markdown pages can have content before the first heading, e.g. HTML tags containing a floated image, a style tag, a script, etc. This causes the page to show up as "Untitled" in search, see e.g. sourcegraph/about#1892. I've also seen this with some other pages. Comments were explicitly handled but all other tags were not. This changes it to simply use the first level-1 heading it can find, no matter if there are any other tags before it.

@felixfbecker felixfbecker requested a review from sqs October 31, 2020 11:59
@felixfbecker
Copy link
Contributor Author

@sqs how does this get deployed to the handbook? I'm still seeing no title on https://about.sourcegraph.com/handbook/engineering/web

@felixfbecker
Copy link
Contributor Author

Nvm figured it out

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

Successfully merging this pull request may close these issues.

2 participants