Skip to content

Render documentation for GitHub Pages#455

Draft
peterbrightwell wants to merge 15 commits into
dmf-mxl:mainfrom
peterbrightwell:main
Draft

Render documentation for GitHub Pages#455
peterbrightwell wants to merge 15 commits into
dmf-mxl:mainfrom
peterbrightwell:main

Conversation

@peterbrightwell
Copy link
Copy Markdown
Contributor

@peterbrightwell peterbrightwell commented Apr 13, 2026

Addresses #364

The .github/workflow/docs.yml action renders a site with Zensical, checks for broken links with Lychee and uploads to GitHub pages.

It needs to be run from main to use GitHub Pages, which will need enabling in settings once the PR is merged (default name will be dmf-mxl.github.io/mxl). So to look at it before that see https://peterbrightwell.github.io/mxl -- it's improved a little from what I showed at the TSC, and now adds v1.0 or v1.1 to the sidebar selector (only placeholder v1.1 content for now).

For now the navigation is manually defined in the nav object of zensical.toml (which annoyingly can't be in the docs/ folder -- see zensical/backlog#101) but that can probably be improved later.

For now I have removed the MXL logo from the header as it needs to be in the documentation tree rather than use from mxl-logos, but we can fix this at some point.

Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
@peterbrightwell peterbrightwell marked this pull request as draft April 22, 2026 15:37
@peterbrightwell
Copy link
Copy Markdown
Contributor Author

Following discussion on TSC it would be good to get a version selector included. See https://peterbrightwell.github.io/mxl/ for an example of this, allowing you to select between v0.1.0 (stable) and v0.1.1 (latest). (The two trees are the same apart from the comment about versions). This example uses mike with zensical, pending a zensical-native versioning system. It seems to work ok, but unlike the approach in this draft PR, it works by building a tree in the gh-pages branch (see here) and using the "Classic Pages experience" setting rather than a custom GitHub action. A bit more work will be needed turning this example into a usable automation, but it looks promising.

Copy link
Copy Markdown
Contributor

@vt-tv vt-tv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to avoid hardcoding absolute urls in the markdown files?

Comment thread docs/Guide/Building.md Outdated
1. Install all apt packages specified in the [Dockerfile](../.devcontainer/Dockerfile)
2. Install vcpkg as done in the [Dockerfile](../.devcontainer/Dockerfile)
1. Install all apt packages specified in the [Dockerfile](https://github.com/dmf-mxl/mxl/blob/main/.devcontainer/Dockerfile)
2. Install vcpkg as done in the [Dockerfile](https://github.com/dmf-mxl/mxl/blob/main/.devcontainer/Dockerfile)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean that we will have to edit the URLs for each branches? (/mxl/blob/main) Can't we use relative URLs so we don't have to change them all the time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vt-tv Unfortunately that requested change won't work as is, as ../.devcontainer/Dockerfile isn't in the docs/ directory, so won't be rendered. So I used the absolute URL to get things going.

We could have a more complete solution by running a pre-build script and use a variable, e.g.

[Dockerfile](https://github.com/{{ repo }}/blob/{{ branch }}/.devcontainer/Dockerfile)

But that's a bit of a pain for authoring and difficulties arise if we want the links to work both on the github.com repo site and the github.io documentation site. For the https://specs.amwa.tv/ NMOS rendering we have some complex scripts to rewrite links (and fix various other issues with the rendering tools), but it's all quite obscure and I certainly wouldn't want to repeat that for MXL.

Probably worth a discussion of what we really want here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or the script could copy across the non-docs part of the repo, including that Dockerfile, include files etc, which might form part of the "documentation". This is something we do for NMOS also, copying APIs/, APIs/schemas/ and examples/ into the render tree.

Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Signed-off-by: Peter Brightwell <peter.brightwell@bbc.co.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants