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

When using a dark theme, giscus should use a dark theme as well. #4820

Closed
5 tasks
kdheepak opened this issue Mar 14, 2023 · 1 comment · Fixed by #5020
Closed
5 tasks

When using a dark theme, giscus should use a dark theme as well. #4820

kdheepak opened this issue Mar 14, 2023 · 1 comment · Fixed by #5020
Assignees
Labels
bug Something isn't working giscus Giscus comments integration
Milestone

Comments

@kdheepak
Copy link
Contributor

Bug description

Right now giscus uses a light theme by default even when a dark theme is toggled.

image

Checklist

  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.
  • Please provide the output of quarto check so we know which version of quarto and its dependencies you're running.
@kdheepak kdheepak added the bug Something isn't working label Mar 14, 2023
@dragonstyle dragonstyle self-assigned this Mar 14, 2023
@dragonstyle dragonstyle added this to the v1.4 milestone Mar 14, 2023
@dragonstyle dragonstyle added the good-first-issue Good for newcomers, fairly well defined label Mar 20, 2023
@allenmanning allenmanning added giscus Giscus comments integration and removed good-first-issue Good for newcomers, fairly well defined labels Mar 24, 2023
@allenmanning
Copy link
Contributor

Thanks for posting this.

I wanted to document a proposed approach here for review:

Setting Giscus Themes

Following the theme from the html format like

format:
  html:
    theme:
      light: lightly
      dark: darkly

We can now set Giscus themes to correspond

website:
  comments:
    giscus:
      theme:
        light: light
        dark: cobalt

So when the website is lightly Giscus will be light, and when darkly Giscus is cobalt.

Existing single string theme

The existing single string theme will still be supported

website:
  comments:
    giscus:
      theme: cobalt

It will expand out to be cobalt in both cases so it is equivalent to

website:
  comments:
    giscus:
      theme:
        light: cobalt
        dark: cobalt

Sensible Defaults

No Giscus theme

If none is specified like

website:
  comments:
    giscus:

this is equivalent to

website:
  comments:
    giscus:
        light: light
        dark: dark

Partial Giscus theme

If partially specified like

website:
  comments:
    giscus:
       dark: cobalt

We will fill in the default as

website:
  comments:
    giscus:
        light: light
        dark: cobalt

Note: The order of the Giscus themes has no special value. The single source of truth for default themes remains in the HTML format.

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

Successfully merging a pull request may close this issue.

3 participants