Skip to content

Conversation

@be5invis
Copy link
Contributor

@be5invis be5invis commented Jun 2, 2017

This PR adds Nunjucks disabling if the renderer claim that it can handle “tags” on its own.
Currently it is not active (i.e., Nunjucks would work) for all existing renderers.

@coveralls
Copy link

coveralls commented Jun 2, 2017

Coverage Status

Coverage increased (+0.004%) to 97.142% when pulling 68568e9 on be5invis:be5invis-disable-nunjucks into b76a7b2 on hexojs:master.

@coveralls
Copy link

coveralls commented Jun 2, 2017

Coverage Status

Coverage increased (+0.004%) to 97.142% when pulling 7c23e3a on be5invis:be5invis-disable-nunjucks into b76a7b2 on hexojs:master.

@coveralls
Copy link

coveralls commented Jun 2, 2017

Coverage Status

Coverage increased (+0.004%) to 97.142% when pulling 16aa813 on be5invis:be5invis-disable-nunjucks into b76a7b2 on hexojs:master.

Copy link
Member

@NoahDragon NoahDragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please keep the old promising style?

promise(
  some code
).then(
  antoher code
)

instead of

promise(
  some code
)
.then(
  another code
)

This will make the change comparison more clearly.

@be5invis
Copy link
Contributor Author

be5invis commented Jun 2, 2017

@NoahDragon Hold on.

@coveralls
Copy link

coveralls commented Jun 2, 2017

Coverage Status

Coverage increased (+0.004%) to 97.142% when pulling 7f0742e on be5invis:be5invis-disable-nunjucks into b76a7b2 on hexojs:master.

@be5invis
Copy link
Contributor Author

be5invis commented Jun 2, 2017

@NoahDragon Finish.

@NoahDragon
Copy link
Member

NoahDragon commented Jun 2, 2017

Thank for the PR. IMO, give this decision to renderers is better than to the users. #2478

@NoahDragon NoahDragon merged commit 2d0af81 into hexojs:master Jun 2, 2017
@NoahDragon
Copy link
Member

I'm thinking extend this function to post front matters. Instead of site-wide configuration variable, each post can disable Nunjucks when specified. Do you think this will be feasible and compatible with your change?

#2622

@9662
Copy link

9662 commented Apr 13, 2019

Sorry, could you please provide an example of how would a renderer use this feature?

@be5invis
Copy link
Contributor Author

be5invis commented Apr 15, 2019

@9662
I have a custom renderer which is completely not MarkDown and Nunjucks notation may conflict with some of its inputs. That's (originally) why I created this PR. To achieve this, simply add a disableNunjucks property to your renderer function.

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.

4 participants