peterkaminski / massive-wiki-for-github-actions

1 stars 0 forks source link

hard-coded repo name needed for CSS #2

Open peterkaminski opened 1 year ago

peterkaminski commented 1 year ago

Regular Massive Wiki Starter themes expect the site to be deployed to the root of the site, and so CSS links are like this:

<link rel="stylesheet" href="/mwb-static/css/mystyles.css">
‹link rel="stylesheet" href="/mwb-static/css/markdown.css">
‹link rel="stylesheet" href="/mwb-static/css/sidebar.css">

GitHub Pages sites on github.io are deployed one directory level down, where the directory name at the root is the repo name:

https://peterkaminski.github.io/massive-wiki-for-github-actions/

A simple fix is to hard-code the repo/directory name:

<link rel="stylesheet" href="/massive-wiki-for-github-actions/mwb-static/css/mystyles.css">
‹link rel="stylesheet" href="/massive-wiki-for-github-actions/mwb-static/css/markdown.css">
‹link rel="stylesheet" href="/massive-wiki-for-github-actions/mwb-static/css/sidebar.css">

But that's an ugly per-wiki customization.

Let's try to find some better solution.

Note that a simple relative link won't work, because different pages can be at different directory levels.

peterkaminski commented 1 year ago

Probably a decent fix:

Changes needed in both MWB and in Massive Wiki Themes.

Maybe that variable can configure the mwb-static name itself, as well?