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

Using block in title tag results in 'Unexpected block "title"' #35

Open
philicevic opened this issue Mar 11, 2021 · 1 comment
Open

Comments

@philicevic
Copy link
Owner

philicevic commented Mar 11, 2021

Using a block inside of the <title> (like in #31) leads to an error on compiling.

ERROR in   Error: Child compilation failed:
  Module build failed (from ./node_modules/posthtml-loader/lib/index.js):
  PostHTML Loader: 
  [posthtml-extend] Unexpected block "title"
  

  - PostHTML Loader:

  - [posthtml-extend] Unexpected block "title"

  - ModuleBuildError: Module build failed (from ./node_modules/posthtml-loader/lib/index.js):

  - PostHTML Loader:

  - [posthtml-extend] Unexpected block "title"

This seems to be an issue in posthtml-parser as mentioned here.

@philicevic philicevic changed the title Using block in title tag results in Using block in title tag results in 'Unexpected block "title"' Mar 11, 2021
@philicevic
Copy link
Owner Author

For now changing

<!-- layout.html -->
<title><block name="title"></block ></title>

to

<!-- layout.html -->
<block name="title"></block>

<!-- index.html -->
<block name="title"><title>Page title</title></block>

needs to do the trick. To fix this properly we need a fix for the issue in posthtml-parser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant