Does minima dark skin work on github pages?
Asked Answered
C

4

8

I'm trying to set up a blog via Jekyll and GitHub Pages. To deploy it was not such a big deal, however, in trying to follow the steps described here I only managed to make it display the dark skin locally. Is there a way to deploy it on GithubPages as well? I installed it via

gem "minima", git: "https://github.com/jekyll/minima"

then added the following two lines in _config.yml

minima:
  skin: dark

This is the repo holding the ruby code.

Caaba answered 25/7, 2021 at 12:33 Comment(1)
It doesn't seem necessary to get the minima gem yourself, adding remote_theme: jekyll/minima to the _config.yml works for me. More detail on what worked for me in this answer: https://mcmap.net/q/1479403/-use-dark-mode-equivalent-of-github-pages-default-themeSkidway
C
0

I was using Chrome, and apparently the Clear browsing data in the last hour with Cookies and other site data and Cached images and files checked made the local updates appear live.

Caaba answered 28/7, 2021 at 13:7 Comment(0)
M
11

i had this problem too. I learned that the software used by github pages isn’t updated often, hopefully for stability reasoning. You can check what versions they use at https://pages.github.com/versions/. The newer version of minima has the alternative “skins” sass/css feature, but the one currently on github pages doesn’t—-heck, github pages still hasn’t updated Jekyll to v4!!... You should be able to see the build error by clicking Actions on the github repo, then clicking on the last “workflow”, then click on the red-colored build. It’ll say the key in the config file doesn’t exist or somethin’ like that, on the skin: dark line.

anyway, in the config file, add remote_theme: jekyll/minima to force download the latest version from the github repo upon rebuild. Don’t use ~jekyll-theme: minima (or whatever it’s called). In fact, at the moment, all of the themes that come pre-installed with github pages are quite old now...

but really though, use the jekyll discussion site https://talk.jekyllrb.com/.

Myology answered 15/1, 2022 at 12:50 Comment(0)
D
1

You can go even further and make your jekyll/minima powered site respect users theme preference https://alexander-taran.github.io/2022/06/08/adopting-dark-theme-in-jekyll-blog.html

Dewberry answered 15/6, 2022 at 13:19 Comment(1)
It seems this can be achieved with minima 3 using minima: skin: auto. <-- hard to do multi-line yaml in a one-line comment.Skidway
S
1

The minimum useful info from my answer on this question: https://mcmap.net/q/1479403/-use-dark-mode-equivalent-of-github-pages-default-theme

You can set the Minima theme to a dark skin (or one that adapts to the system setting). This is not supported by the version of the minima theme (2.5.1) used on github-pages currently but is available in the (as yet - 2024) unreleased minima 3.

# In _config.yml
# theme: minima
remote_theme: jekyll/minima
plugins:
  - jekyll-remote-theme
minima:
  skin: dark # or auto if you want it to switch with your system settings.

<!-- in 404.html -->
---
permalink: /404.html
layout: base 
---
<!-- Rest of the file here -->
Skidway answered 3/3 at 5:27 Comment(0)
C
0

I was using Chrome, and apparently the Clear browsing data in the last hour with Cookies and other site data and Cached images and files checked made the local updates appear live.

Caaba answered 28/7, 2021 at 13:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.