fribyte-code / fribyte.no

Official website for friByte 🌐
https://fribyte.no
GNU General Public License v3.0
2 stars 8 forks source link

Add documents from the admin repo #33

Open Kremtastic opened 1 year ago

Kremtastic commented 1 year ago

The Public Documents section of fribyte.no is not up to date with all the latest files from the admin repository. Within the directory fribyte.no/content/dokumenter lies sub-directories that should ideally mirror repositories from the admin repo. The files cannot be simply copied and pasted over however, as it is required to manually edit them in a specific format for them to be displayed properly on the website.

Here is an example of how a file has been edited:

Admin repo version:

---
papersize: a4
lang: no-NB
title: Utflukt H22
subtitle: 2022-11-24
author: Rolf Martin Glomsrud
numbersections: true
---

New version (for the website):

+++
author = "Rolf Martin Glomsrud"
date = 2022-11-24
title = "Allmeeting H22"
+++

Note that only the encapsulated text at the top of the file (like what shown in the example) needs to be changed. The actual content of the file should remain unchanged.

timharek commented 11 months ago

A solution here could be to have a script of some sort in this repo that is initialized by a GitHub Action from fribyte/admin that retrives the latest docs and makes a new commit.

So the worflow would be something like:

  1. Change happens to docs in fribyte/admin
  2. A GitHub Action is triggered
  3. Action runs a script in this repo that retrieves all new docs from fribyte/admin
  4. The script also parses the new docs' front-matter to match the front-matter for the website (from YAML to TOML)

Any thoughts? 💭

Kremtastic commented 11 months ago

Sounds like a good idea. It does seem like it should work in theory. Maybe I will look into it at the next dugnad.