question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

h1, h2, h3 blocks are rendered as h2, h3, h4

See original GitHub issue

Description

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:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

0reactions
MartinXPNcommented, Aug 4, 2022

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found