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

Extra h1 from --title #924

Closed
xdan opened this issue Nov 29, 2024 · 0 comments · Fixed by #928
Closed

Extra h1 from --title #924

xdan opened this issue Nov 29, 2024 · 0 comments · Fixed by #928
Assignees

Comments

@xdan
Copy link
Contributor

xdan commented Nov 29, 2024

If we have a file like this:

---
title: Some Title | sitename.com
---

# Some Header

bla

Then for some time now(in 4.39.0 it's ok) the cli has been throwing out the h1 that is already on the page and writing title instead
That is, the page is converted to

<html>
<head>
<title>Some Title | sitename.com </title>
</head>
<body>
<h1>Some Title | sitename.com </h1>
</body>

and Some Header is thrown out altogether
And it behaves somewhat randomly. Sometimes both headers are present on the page:

<html>
<head>
<title>Some Title | sitename.com </title>
</head>
<body>
<h1>Some Title | sitename.com </h1>
<h1>Some Header</h1>
</body>

We expect that if we have h1 set, then it remains, and the expected document structure is:

<html>
<head>
<title>Some Title | sitename.com </title>
</head>
<body>
<h1>Some Header</h1>
@3y3 3y3 self-assigned this Dec 2, 2024
3y3 added a commit that referenced this issue Dec 2, 2024
3y3 added a commit that referenced this issue Dec 3, 2024
@3y3 3y3 closed this as completed in 669748a Dec 3, 2024
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 a pull request may close this issue.

2 participants