You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.4 KiB
Markdown
52 lines
2.4 KiB
Markdown
---
|
|
title: Soupboat CMS 00
|
|
description: Micro JSON→HTML CMS for the first trimester
|
|
cover: cms00.jpg
|
|
cover_alt: Notebook drawing of a dog saying dog and a Microsoft clipper saying pig with ancient hieroglyphs
|
|
date: 24/12/2021
|
|
git: https://git.xpub.nl/kamo/kamo-soupbato
|
|
project: cms00
|
|
categories:
|
|
- CMS
|
|
- JS
|
|
---
|
|
|
|
## A micro CMS
|
|
|
|
During the first weeks at XPUB I spent some time trying to figure out how to archive and log the various projects going on. I felt to do it here in the Soupboat, because it's more flexible and playful than the wiki, that remains of course the source of truth and the future-proof archiving system etc. etc. 👹👺
|
|
|
|
After the second page though I was already ultra annoyed by the fact of rewriting or copy-pasting the HTML from a page to the other to keep at least a bit of style and structure and add contents manually. I wrote then a bit of code to have a default page and then used a JSON file filled with a list of projects. The script traversed this list and created a table with the basic informations about each one.
|
|
|
|
The model for a project was something like that:
|
|
|
|
```json
|
|
{
|
|
"title": "Text Weaving",
|
|
"date": "Oct 5, 2021",
|
|
"url": "10-05-2021-weaving/",
|
|
"git": "https://git.xpub.nl/kamo/text_weaving",
|
|
"pad": "https://pad.xpub.nl/p/replacing_cats",
|
|
"links": [
|
|
{
|
|
"url": "",
|
|
"title": "",
|
|
}
|
|
],
|
|
"categories": [
|
|
"Python",
|
|
"NLTK",
|
|
"Text"
|
|
]
|
|
},
|
|
```
|
|
|
|
Each proj has a title, a date, an URL to a dedicated page. Then a list of links: the git repository for sharing the source code and the pad, that are the two most common types of link, and then a list of generic other links, each one composed by an URL and a title. There is also a list of categories, in order to give some hints about the project.
|
|
|
|
The dedicated page for a project could have been something somewhere in the Soupboat, or a subfolder in my personal folder.
|
|
|
|
The structure of the whole thing was: an `index.html` page with a `cms.js` script and a `cms.json` file. (Such imagination in these filenames). Then a `style.css` and a `global.css` for sharing the style with the various projects.
|
|
|
|
Not really a revolutionary CMS but a starting point. Ah ah
|
|
|
|
I'm writing this while im migrating everything into a flask based one, that will use more or less the same structure we developed for the SI16! Really happy with it. Good night
|