Skip to content

Give option to disable Nunjucks when processing posts.#2478

Closed
be5invis wants to merge 1 commit intohexojs:masterfrom
be5invis:be5invis-patch-disable-nunjucks
Closed

Give option to disable Nunjucks when processing posts.#2478
be5invis wants to merge 1 commit intohexojs:masterfrom
be5invis:be5invis-patch-disable-nunjucks

Conversation

@be5invis
Copy link
Contributor

This PR adds...

  • An option, disable_nunjucks.
  • And the corresponded code to skip Nunjucks when this options is set.

@coveralls
Copy link

coveralls commented Mar 29, 2017

Coverage Status

Coverage increased (+0.002%) to 97.133% when pulling f4c405c on be5invis:be5invis-patch-disable-nunjucks into 5a7ea3e on hexojs:master.

@NoahDragon
Copy link
Member

Thanks for the PR. Since Swig deprecated and Nunjucks is major renderer for tags in Hexo 3.0, this setting could affect all tag plugins (Hexo tags or third-parties). The impact could be huge.

One solution is we give up the Nunjuncks as it really causes troubles with math and LeTex symbols. However, adding a system setting doesn't do it once for all.

@be5invis
Copy link
Contributor Author

@NoahDragon This is intensional: if we do NOT need any tag plugin (for me, my Youki can handle them with its macro system), then you can turn the entire thing off.

@NoahDragon
Copy link
Member

NoahDragon commented Apr 12, 2017

I totally understand your situation. However, this fix is a shortcut to solve the conflict between Nunjucks and other marked languages. We are also working on to resolve the confliction. I would recommend modifying the Hexo version in your package.json to:

"hexo": "https://github.com/be5invis/hexo.git"

So that you could keep this change for your site, we also could move on our changes without worrying about the new setting.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants