A question to static site generator users.

I have a few html tweaks I want to add to the contend of the article. Is it possible?

* remove table from section pages and instead use UL/LI elements.

* Turn section headers into links

Follow

It looks like I need to write a plugin that does things with beautiful soup in order to tweak HTML generation

I find this one in particular to be a good example on how to write a plugin

github.com/cmacmackin/figure-r

Introductory info on plugins -- docs.getpelican.com/en/stable/

It looks like {{ article.content }} tag converts the content from rst to html.

Looks like a black box with no easy way of getting in. It's probably done by docutils.

I ended up fixing formatting on the fronted with SASS.

Here's a bit of sass I used. Docutils generate css class 'footnote' on which I can anchor elements.

.footnote
border: none
table:
border: none
tbody
border: none
td
border: none
table
border: $table-border
tbody
border: $table-border
td
border: $table-border
padding-left: 3px

This guess is correct.

In reader.py the HTMLTranslator from docutils.writers.html4css1 does all the heavy lifting

Sign in to participate in the conversation
Mastodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!