MkDocs/mkdocstrings 404 CSS TIL update
Following on from my post this morning, regarding the problem I was having with _mkdocstrings.css being 404 any time I deployed my documentation, built with mkdocs/mkdocstrings, to GitHub Pages...
It's come to light that I was doing this on hard mode, pretty much.
While trying to figure out the best way of deploying the docs, I'd stumbled on ghp-import and had been using that. On the other hand, MkDocs has it's own command for doing the same thing: mkdocs
gh-deploy.
Timothée pointed out to me that he never runs into this problem, but he used this command. As it turns out, if you use mkdocs gh-deploy it creates the .nojekyll file by default.
And how does it do this? It uses the ghp-import code and uses a switch it has to achieve exactly this. In fact... the command line version even has a switch for it!
-n, --no-jekyll Include a .nojekyll file in the branch.
This is off by default, when you run the command itself, but I wish I'd noticed this when I was first experimenting. O_o
Anyway, thanks to Timothée's pointers, I've now managed to simplify how I build and publish the docs from textual-fspicker, and I'll apply this to other projects too.
References & mentions
-
… moment, and carry on and worry about it later. However, I did toot about my confusion and the ever-helpful Timothée gave a couple of pointers. He mentioned that Zensical was a drop-in replacement here. Agai…
-
…h, like MkDocs has! For a moment this felt like a bit of a show-stopper; but then I remembered that MkDocs' publishing command simply makes use of ghp-import and so I swapped to that and I was all good. So, yeah, so far... I t…
-
…anch for the repository, resulting in the documentation being hosted by GitHub. A wee problem NOTE: I've since found out there's an easier way of fixing the issue. This is, however, where I ran into a wee problem. I noticed that the locally-hosted version of the…
Have a comment or query about this post? Feel free to drop me a line about it.