Skip to content

Reduce PHP in favour of XSLT #245

@sjehuda

Description

@sjehuda

Every page is RSS, and every page is Machine Readable.

I am also working on a publishing system which is both CMS and SSG (depends on the mode).

Instead of (X)HTML documents, I advise to generate Atom Syndication Format documents and utilize XSLT stylesheet to transform them into (X)HTML, Gemtext, JSON, Twtxt, et cetera.

Instead of processing data with a "templating engine" (e.g. bottle.py or jinja2) I have decided to generate Atom documents, and utilize XSLT as a templating engine.

Source code

https://git.xmpp-it.net/sch/Rivista

Demonstration

It defaults to HTML; add "index.atom" to pages in order to retrieve XML.

https://journal.woodpeckersnest.eu/index.atom

There is also navigation support with attribute "rel" (values "next" and "prev").

https://journal.woodpeckersnest.eu/posts/1270-01-01-havamal-ii/

https://journal.woodpeckersnest.eu/posts/2024-08-01-establish-your-i2p-site-in-five-minutes/

One of the major advantages is that we would be able to share themes without software-specific modifications, if we choose to exchange themes from one project to another which is also made of Atom+XSLT.

All themes are purely made of XSLT and CSS.

https://git.xmpp-it.net/sch/Rivista/src/branch/main/rivista/data/themes/vivista

For the sake of future security, I have added a server-side XSLT transformation, in case when client-side XSLT interpretor is not available.

Benefits

  • Everry page is RSS;
  • Removing HTML code in favour of XSLT;
  • Segregating themes from the repository;
  • Themes be more flexible by only requiring XSLT and CSS; and
  • Themes be compatible with other ACE (Atom Centric Elevation) publication platforms such as Rivista Voyager.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions