h1, h2, h3 blocks are rendered as h2, h3, h4
See original GitHub issueDescription
It seems like the blocks are rendered differently than expected. This appears when I render a page:
<h4 class="notion-h notion-h3 notion-h-indent-0 ...></h4>
Also, text blocks appear as:
<div class="notion-text notion-block-...></div>
I think, it would be great for SEO and other purposes to render the notion pages with the right blocks (h1 with h1, h2 with h2, and h3 with h3). For text blocks, wouldn’t it be better to render them with <p>...</p>
?
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Header Tags: A Simple (But Complete) Guide To H1, H2 and ...
In this new guide, you'll learn exactly how to use H1 to H6 heading tags to optimize your page and drive higher search...
Read more ><h1>–<h6>: The HTML Section Heading elements
The to HTML elements represent six levels of section headings. is the highest section level and is the lowest.
Read more >The Complete Guide to the Gutenberg Heading Block
The following settings are available when using the heading block: Heading Level: H1, H2, H3, H4, H5 or H6; Text Alignment: Left, Center,...
Read more >Styling set on the core/heading block of theme.json ... - GitHub
Description Styles set on styles.blocks.core/heading of theme.json are applied as markup that effects all h1, h2, h3, h4, etc. tags.
Read more >Are H1,H2,H3,H4 tags block or inline elements? - html
So, they are all defined as %heading entities, which in turn are part of the %block entities. As for the question regarding if...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/NotionX/react-notion-x/blob/master/packages/notion-utils/src/get-page-title.ts
Thanks a lot @pbteja1998 I guess it would make sense to close this issue and maybe open another one only for
<p>
tags.Should probably update this part of the code: https://github.com/NotionX/react-notion-x/blob/cfbfcc1514/packages/react-notion-x/src/block.tsx#L408