fa icon indicating copy to clipboard operation
fa copied to clipboard

Generate a 'changelog overview' Lua file

Open Garanas opened this issue 1 year ago • 0 comments

Description

With https://github.com/FAForever/fa/pull/6444 we now have a workflow that converts the markdown-based changelogs into Lua-compatible files that the game can read. With this issue we aim to extend this functionality by also generating an overview file.

Course of Action

Ideally the workflow is extended. The goal is to generate a module that holds references to all generated Lua-compatible changelogs. As an example of the setup:

---@class ChangelogOverview
---@field Changelogs ChangelogMetadata[]

---@class ChangelogMetadata
---@field Path string

Overview = {
    Changelogs = {
        { 
            URL = "http://url-to-changelog-online.org"
            Path = "/lua/path/to/changelog.lua" 
        }
    }
}

As the future is always changing it is important that the implementation is flexible towards introducing additional fields at both the ChangelogOverview level and the ChangelogMetadata level. For the latter the input will be the source file.

The documentation website that we'll use in the (near) future uses Jekyll. As an example of why this flexibility is useful: there may be Front matter that we may parse and add to the ChangelogMetadata in the future.

As an example of front matter that we use right now:

---
layout: post
title: Game version 3801
permalink: changelog/3801
---

See also the _posts folder of the documentation website. In the future these posts will be the source of which we generate lua-compatible changelogs.

Garanas avatar Oct 08 '24 12:10 Garanas