Health-Sprints / A-Machine

A-Machine
GNU General Public License v3.0
1 stars 0 forks source link

GitHub Pages HTML rendering #16

Open mrchristian opened 4 years ago

mrchristian commented 4 years ago

Question:

GitHub Pages HTML rendering - We are looking to see if you might have a recommendation about a framework we could use? Maybe that framework is even a use of Vivliostle or a CSS Typesetting solution? (Eureka - ah hadn’t thought of that until I started asking the question.). Currently we make a website by converting Fidus Writer output, either HTML or unzipped EPUB so XHTML into a GitHub Pages - Jekyll or Hugo website, by converting the HTML/XHTML to Markdown. See:

  1. GlobaleGesundheit - Jekyll - https://akademie-oeffentliches-gesundheitswesen.github.io/GlobaleGesundheit/
  2. Should-Schools-Reopen - Hugo - https://independent-sage.github.io/Should-Schools-Reopen/

What we want to change to is to remove the Markdown conversion and instead make the website on GitHub Pages using HTML or XHTML as directly outputted Fidus Writer. We imagine that we need to add custom CSS and Javascript to replicate some of the features we get from Jekyll or Hugo. The features we need are to build a navigation menu on the left, have a header and footer where we could insert links automatically; add some extra page content like GDPR, and if possible add anchor links to headers, and add search. Jekyll and Hugo frameworks can use HTML/XHTML but we tend not to find themes that have been built to take advantage of rendering HTML/XHTML and still be able to build the menus as they would when using Markdown.

Here are example file sets as delivered from Fidus Writer:

  1. HTML / XHTML - https://github.com/akademie-oeffentliches-gesundheitswesen/GlobaleGesundheit/tree/master/source
  2. XHTML from unzipped EPUB - https://github.com/akademie-oeffentliches-gesundheitswesen/Buchvorlage/tree/master/webbuch
mrchristian commented 4 years ago

Answer:

EPUB-compatible WebBook format (see: https://github.com/Health-Sprints/obp/issues/3) will be useful because the same XHTML content documents can be used for EPUB, WebBook (with or without Vivliostyle), and PDF (with Vivliostyle).

How to generate such WebBook files will be a question. As explained before, images/tables numbering has to be processed without using CSS counter. Also, endnotes, images/tables lists at the back of the book have to be generated. If such processing can be done in Fidus Writer it will be nice.

Each content document XHTML file will have two stylesheet links, one for normal browser and EPUB reader, and the other for Vivliostyle that can be specified with media="print" (not only for Vivliostyle but also for normal browser to print, or other HTML+CSS to print tools) or media="vivliostyle" (only for Vivliostyle).