5 ms·
I'm building a tool (at the same time I'm building a personal throw-in-every-data-you-have website, so the Github repo is my personal website repo) to edit any
by fiatjaf 12y ago
I'm building a tool (at the same time I'm building a personal throw-in-every-data-you-have website, so the Github repo is my personal website repo) to edit any kind of data, fetching it directly from the hosted website, build a git tree locally, upload it to Github and let Github host this new version of the website, just uploaded from itself.
It's kinda of a static hosted hierarchical website generator CMS (if you like these pedantic names):
https://github.com/fiatjaf/fiatjaf.github.io https://github.com/fiatjaf/fiatjaf.github.io
(and you can access the CMS at work here: http://fiatjaf.github.io/edit http://fiatjaf.github.io/edit , just ignore the password thing)
The idea is that you can create `docs`. Each doc you render itself to a page. Each doc is a JSON object including
- `title`, a title to be findable and nice, and to be displayed on the CMS, but not strictly required, as docs also have ids.
- `text` (something that will be displayed as is, or after some markdown rendering)
- `data` (field in which you can put structured data such as JSON, YAML, CSV, suggestions accepted) and do something with it later
- `parents` (a list of ids of the parents of this element, parents are used for generating URLs such as /parent/son/grandson and some other relationships -- like parents can receive its sons as data instead of the data at the `data` field)
- `kind` (a field that will be used to reference a `processor` and a `template` to render that data later)
- any other attribute you want, included using the traditional `yaml-frontmatter`, that can be used later for processing or display
In the rendering process each docs is passed to the processor referenced by its kinds and then to the template referenced by its kind and the HTML is generated.