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

spec: Explicit html/head/…/body elements by HTML block #154

Open
MurakamiShinyu opened this issue Sep 5, 2022 · 0 comments
Open

spec: Explicit html/head/…/body elements by HTML block #154

MurakamiShinyu opened this issue Sep 5, 2022 · 0 comments
Labels
spec Spec related thing

Comments

@MurakamiShinyu
Copy link
Member

Related proposal:

現在のvfm仕様ではHTML blockを使って直接書くことができるHTML要素は、body要素の内部の要素に限らる。body開始タグやそれより前にあるHTML要素のタグを直接書くことはできない(その代わりに spec: Frontmatter が使える)。それを可能にすると、次の利点がある:

  • spec: Prevent auto-generation of section elements by headings inside explicit parent element #152 の明示的な親要素がある場合の見出しでは親要素の自動生成をしないようにする案との組み合わせにより、<body> の直後の見出しではsectionを生成しないようにできるようになる。例:

    <body class="lipsum">
    
    # Lorem ipsum {.title}
    
    Lorem ipsum dolor sit amet.

    <body class="lipsum">
    
    <h1 id="lorem-ipsum" class="title">Lorem ipsum</h1>
    
    <p>Lorem ipsum dolor sit amet.</p>
  • HTMLのhead要素内に出力するべき <style><script> 要素を直接書くことができる。

    • 現在のvfmでは <style><script> 要素をMarkdownファイルの先頭またはfrontmatterの直後に直接書いた場合、head要素内ではなくbody要素内にそれらが出力される。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Spec related thing
Projects
None yet
Development

No branches or pull requests

1 participant