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

Render h1 from markdown #309

Closed
bdrtsky opened this issue May 17, 2021 · 4 comments · Fixed by #411
Closed

Render h1 from markdown #309

bdrtsky opened this issue May 17, 2021 · 4 comments · Fixed by #411
Labels
enhancement New feature or request

Comments

@bdrtsky
Copy link
Contributor

bdrtsky commented May 17, 2021

Currently Docus treat h1 separate from other content https://github.com/nuxtlabs/docus/blob/main/src/defaultTheme/components/organisms/PageContent.vue#L12-L37

This could be confusing and unexpected. Maybe we should rethink this approach, and render h1 along with other markdown content. This is expected, and also it doesn't have additional mental load on were to search where rendered h1 was placed in template.

We can still use it for frontmatter, just change rendering part.

I believe this will affect current template, so it also will need a rethink.

@bdrtsky bdrtsky added the enhancement New feature or request label May 17, 2021
Copy link
Contributor

atinux commented May 17, 2021

I fully agree, it was quite weird to have the first H1 not rendered.

@Tahul
Copy link
Contributor

Tahul commented May 18, 2021

What should happen is that the H1 fills the frontmatter title if it's empty.

Same for description with first paragraph.

By default it should always be displayed.

Maybe this could be an option from theming, but for now I think everything from the .md file should definitely be displayed.

Copy link
Collaborator

farnabaz commented Jun 11, 2021

Is this still valid?
if so, I believe we should change the behavior before Nuxtjs.org release to prevent huge breaking change in contents. Both document and UI require changes
Note that it will be a breaking change since we use blockquote to define page description

Copy link
Contributor

atinux commented Jun 11, 2021

I believe so, we need to do it before release nuxtjs.org with Docus yes.

Also, I think we should not use the bloquote but the first paragraph for filling the front-matter description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants