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

Support shortcodes (Fix #172) #173

Merged
merged 16 commits into from Sep 24, 2016
Merged

Support shortcodes (Fix #172) #173

merged 16 commits into from Sep 24, 2016

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented Sep 24, 2016

Adding shortcode support to almost all plugin compilers. (Issue #172)

@ralsina ralsina changed the title [WIP] Support shortcodes Support shortcodes (Fix #172) Sep 24, 2016
body = m2h.markmin2html(data, pretty_print=True)
out_f.write(body)
output = m2h.markmin2html(data, pretty_print=True)
output, shortcode_deps = self.site.apply_shortcodes(output, filename=source, with_dependencies=True, extra_context=dict(post=post))
Copy link
Member

Choose a reason for hiding this comment

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

You aren’t getting the post object anywhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ack, I could not test the py2-only plugins. Fixing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@Kwpolska
Copy link
Member

Also, could we replace all this copy-pasted boilerplate with a single function in nikola.utils? (which would move this change to after a release)

@ralsina
Copy link
Member Author

ralsina commented Sep 24, 2016

Well, it would bw a couple of calls... I don't know. I just copy/pasted the code that works.

@Kwpolska
Copy link
Member

Feel free to go either way and merge if you think copy-paste will be enough.

@ralsina
Copy link
Member Author

ralsina commented Sep 24, 2016

Ack, will wait for tests and merge.

@ralsina ralsina merged commit 7d6f171 into master Sep 24, 2016
@ralsina ralsina deleted the support-shortcodes branch September 24, 2016 18:56
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.

None yet

2 participants