Is it possible to override the style of a remote theme? #2502
-
Motivationremote_theme is a valid way to use the theme, but the style customization part of the docs doesn't mention anything about it. Naively I tried adding a
And without "main", as per the docs, but it just doesn't build, since the file isn't found. So I don't know if I'm doing something wrong or if it's not supposed to work at all. GitHub Pages is looking only in SuggestionThe docs should be explicit whether it's possible at all and if so, how to do it. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Playing around some more, copying main works, so it looks like just https://mmistakes.github.io/minimal-mistakes/docs/stylesheets/#customizing needs a mention. I can prepare a PR if you want. |
Beta Was this translation helpful? Give feedback.
-
Remote themes are almost identical to Ruby gem themes. All Steps for customizing the styles are what are mentioned on that link above. You copy |
Beta Was this translation helpful? Give feedback.
-
The first bit was not clear, yeah. I've set up jekyll several times before, once on GH, but this remote_theme thing seems newer. And it's counter-intuitive, though very welcome, that you can override stuff just like the files were actually there. |
Beta Was this translation helpful? Give feedback.
-
The theme assumes the user has a working knowledge of Jekyll's theme capabilities and it's plugins, that's why I don't take a deep dive into all this in the documentation. Remote themes are newer than theme gems but neither are what I'd call new. They came out years ago... The short of it is, GitHub Pages limits the gems/plugins you can use for security reasons. Most 3rd party themes aren't supported for this reason. To get around that the remote theme plugin was developed. Theme gems and remote themes are pretty much interchangeable in functionality. The big difference is how you assign them to your repo in |
Beta Was this translation helpful? Give feedback.
-
Not much of that is new to me, but the docs mention remote themes (and GH Pages) specifically in some places and not others, so there's room for improvement. Eg. you don't need to run bundler on GHP either. If you think it's not worthwhile, just close this report, I mind. ¯_(ツ)_/¯ |
Beta Was this translation helpful? Give feedback.
Remote themes are almost identical to Ruby gem themes. All
_layouts
,_includes
and Sass files can be customized by adding local versions of the files in your repo. These will overwritethe ones bundled in the gem or files pulled remotely viaremote_theme
.Steps for customizing the styles are what are mentioned on that link above. You copy
assets/css/main.scss
and customize as needed.