{{ message }}

# reST HTML5 compiler plugin #72

Merged
merged 4 commits into from Apr 5, 2015
Merged

# reST HTML5 compiler plugin#72

merged 4 commits into from Apr 5, 2015

## Conversation

### pellenilsson commented Feb 15, 2015

 reST compiler plugin based on this HTML5 writer: https://bitbucket.org/andre_felipe_dias/rst2html5 Code changes from the original reST plugin are rather trivial, as shown if you diff the two plugins. Some settings recognised by the HTML4 writer are not recognised by rst2html5: record_dependencies, stylesheet_path and math_output. I haven't investigated the consequences of this (MathJax support might be broken?).
 rest_html5: Initial version 
 c51cd10 
 rest_html5: Fix wrong initial header level 
 8e78f70 
rst2html5 interprets initial_header_level differently than the official
docutils HTML4 writer.
 rest_html5: Add README 
 8ddada0 
 rest_html5: Change website link 
 d77c175 

### ralsina commented Feb 15, 2015

 record_dependencies is critical, it breaks recompiling the post when included files change and other similar things

### pellenilsson commented Feb 17, 2015

 Actually, the post is recompiled if an included file (using the reST include directive) changes when using rest_html5. The dependency seems to be managed by the reST parser in docutils, not the HTML writer (and this seems more natural to me). Still, the HTML4 writer does update record_dependencies for images and stylesheets, seemingly repeating the code present in the reST parser, but I don't know what this repetition is good for. Do you have a concrete scenario where this causes a problem?

### pellenilsson commented Feb 22, 2015

 I also discovered that rst2html5 doesn't handle HTML comments, and this breaks the TEASER_END mechanism. I'll see if I can get this fixed, so please keep this pull request on hold for now.

### andredias commented Feb 22, 2015

 Could you show me an example of which rst income and html5 outcome would you like from rst2html5? I mean, is there any special case for rst or html5 comments to Nikola?

### pellenilsson commented Feb 23, 2015

 This reST code: .. TEASER_END  needs to produce this HTML:   With current docutil, it seems that any non-implemented reST directive produces an HTML comment. Nikola relies on this by looking for this HTML comment in a later step of the build process.

### pellenilsson commented Feb 23, 2015

 Oh, and this: .. TEASER_END: Any string  also needs to produce  

### andredias commented Feb 23, 2015

 ok. I'll do it

### andredias commented Feb 23, 2015

 I've just pushed the implementation at BitBucket. Could you test the development version or do you need me to release a new version? I intend to release it after you test this feature.

### pellenilsson commented Feb 23, 2015

 I've confirmed that your pushed change fixed the TEASER_END issue, thank you very much! ralsina: Do you still think that missing support for record_dependencies in rst2html5 is a problem?

### ralsina commented Feb 23, 2015

 I am not sure, to be honest :-) We can always just try it.

### andredias commented Feb 23, 2015

 Please, keep me informed. I am willing to help.

### pellenilsson commented Feb 23, 2015

 As far as I can tell, the plugin is ready. Dependencies on included files seem to work. MathJax works. I guess we should let @andredias make the new release before merging this, so that the normal pip install -r requirements.txt procedure works when this plugin lands on the plugins site.

### pellenilsson commented Feb 23, 2015

 I've also tested most of the old Nikola reST plugins (media, youtube, soundcloud, code-block, chart...)

### andredias commented Feb 23, 2015

 rst2html5 1.5 released!

### pellenilsson commented Apr 5, 2015

 My site that uses this plugin is now live and happy, is there anything I need to do to get this accepted?

### Kwpolska commented Apr 5, 2015

 I guess we could accept this into the repo — we are not forcing this down peoples’ throats yet. We might, one day.
added a commit that referenced this pull request Apr 5, 2015
 Merge pull request #72 from pellenilsson/rest_html5 
 f651301 
reST HTML5 compiler plugin
merged commit f651301 into getnikola:master Apr 5, 2015
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Labels
None yet
Projects
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants