You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Nikola for a few websites now and find its expessiveness limited by the ReST vocabulary - the most fancy stuff is admonitions. Hence I use bootstrap cards, card decks and such, meaning lots of .. raw:: html or jinja2 shortcodes with HTML, so lot of the actual content often uses raw HTML markup like <a href="...">...</a>.
There is the sphinx-design project which brings these higher-level entities to ReST inside Sphinx. I tried to bridge the gap by writing a few stub classes emulating Sphinx as sphinxdesign plugin so that the sphinx-design module can be imported inside Nikola unmodified. (This should work for other interesting sphinx extension as well.)
The result is that the screenshot below (using sample code from sphinx-design) is written without any HTML, e.g.
Controlling spacing between items
------------------------------------
.. grid:: 2:gutter: 1
.. grid-item-card:: Title A
A
.. grid-item-card::
B
.. grid:: 2:gutter: 3 3 4 5
.. grid-item-card::
A
.. grid-item-card::
B
I am not sure if this is something useful in the long run, though in case it is interesting for anyone, check out the MWE (buildable with current nikola) from the repo, have a look, fork or whatever, from the repo here: https://github.com/eudoxos/nikola-sphinx-design (checkout with recursion).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am using Nikola for a few websites now and find its expessiveness limited by the ReST vocabulary - the most fancy stuff is admonitions. Hence I use bootstrap cards, card decks and such, meaning lots of
.. raw:: html
or jinja2 shortcodes with HTML, so lot of the actual content often uses raw HTML markup like<a href="...">...</a>
.There is the sphinx-design project which brings these higher-level entities to ReST inside Sphinx. I tried to bridge the gap by writing a few stub classes emulating Sphinx as sphinxdesign plugin so that the sphinx-design module can be imported inside Nikola unmodified. (This should work for other interesting sphinx extension as well.)
The result is that the screenshot below (using sample code from sphinx-design) is written without any HTML, e.g.
I am not sure if this is something useful in the long run, though in case it is interesting for anyone, check out the MWE (buildable with current nikola) from the repo, have a look, fork or whatever, from the repo here: https://github.com/eudoxos/nikola-sphinx-design (checkout with recursion).
Beta Was this translation helpful? Give feedback.
All reactions