Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Appearance dark does not seem to do anything. #18

Open
nassredean opened this issue Mar 17, 2021 · 4 comments
Open

Appearance dark does not seem to do anything. #18

nassredean opened this issue Mar 17, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@nassredean
Copy link

Hello there. I have a basic setup with this theme, and I'm noticing that the specifying "dark" will not change the color scheme of the theme when building. I have the following _config.yml

title: nassredean nasseri
tagline: "| nasseri.io"
author:
  name: Nassredean Nasseri
email: dean@nasseri.io
description: "the personal website of nassredean nasseri"
url: "https://nasseri.io"
baseurl: ""
exclude: [scripts/]
favicon: "favicon.png"
permalink: /:slug.html
theme: no-style-please
theme_config:
  appearance: "dark"
  back_home_text: ".." # customize text for homepage link in post layout
  date_format: "%Y-%m-%d" # customize how date is formatted
  show_description: false # show blog description in home page
timezone: America/New_York
plugins:
  - jekyll-sitemap
  - jekyll-feed

I observe that the <body> tag, is not being given an a attribute of any kind after running jekyll build. So it seems like, somehow this line <body a="{{ site.theme_config.appearance | default: "auto" }}"> in https://github.com/riggraz/no-style-please/blob/3432e31045f14ee57dedd1e0653c3d94d19eed01/_layouts/default.html is not working for me.

Is there anything else I need to do to get the dark theme applying correctly? Note that I have no _layouts, _includes, or _posts directory in my site. Not sure if that makes a difference.

@marcelo57
Copy link

hey, this happens to me too when I host the page locally through "jekyll serve" on my computer
but once I uploaded it to githubpages, it works correctly,

may be the "remote-theme" thing

@nassredean
Copy link
Author

hey, this happens to me too when I host the page locally through "jekyll serve" on my computer
but once I uploaded it to githubpages, it works correctly,

may be the "remote-theme" thing

Indeed this has been happening when using jekyll serve. I don't use githubpages, I just host my stuff in a public s3 bucket and then put a cloudfront distribution in front of it.

Strangely, when I first deployed, I was getting a mixed content warning trying to load the CSS file (despite it being served over http). Somehow this issue got resolved, then I made some change trying to fix the dark theme issue, and the mixed content warning came back. I hacked around it my just inlining the style in the _site directory and deploying that. Obviously not a great solution at all, but my site basically never changes so for that time being I'm just leaving it as is.

@riggraz riggraz added the bug Something isn't working label Jun 14, 2021
@yogeshvar
Copy link

+1

1 similar comment
@devnix
Copy link

devnix commented Dec 30, 2022

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants