GithubHelp home page GithubHelp logo

bake / solar-theme-hugo Goto Github PK

View Code? Open in Web Editor NEW
54.0 4.0 26.0 425 KB

A port of solar-theme-ghost for Hugo

Home Page: https://themes.gohugo.io/solar-theme-hugo/

License: GNU General Public License v2.0

HTML 21.28% SCSS 78.72%
hugo theme solarized-theme

solar-theme-hugo's Introduction

Solar Theme for Hugo

A minimalistic theme for Hugo blogs, fork of Solar Theme for Ghost. There is a demo available on Hugos theme list. See the example config.toml for a starting point.

Color schemes

Solar offers three color schemes: (Solarized) light, (Solarized) dark (default) and gray. Additionally there is a preference setting which switches between light and dark according to the users preference.

Screenshot

Screenshot

Additional HTML

Custom HTML can be injected just before </head> and </body> by creating a head.html or foot.html inside the sites layouts/partials/ folder. The default (empty) logo can be overwritten by creating a logo.svg in static/img/.

Syntax Highlighting

This theme does not bring a syntax highlighter. If you want to use Hugos built in one, remember to update the color scheme by setting pygmentsStyle. The pygments style solarized-dark, for example, matches the themes dark color scheme, while solarized-light matches light and solarized-dark256 works well with gray.

Otherwise, if you want to use a JavaScript highlighter like highlight.js, the necessary JavaScript can be placed inside static/ and get included by providing a footer.html as described above.

Installation

Same as with any other theme:

$ git clone https://github.com/bake/solar-theme-hugo.git themes/solar-theme-hugo
$ hugo server --theme solar-theme-hugo
...

License

GPLv2 or higher

solar-theme-hugo's People

Contributors

bake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

solar-theme-hugo's Issues

Reference to localhost

Hi, thank you for sharing this theme.

I have tried to install it but I have issues that the CSS is being referred using localhost which broke the visual.

So, I use the config.toml that is included in the exampleSite and start the site:

hugo server --port 3000 --bind "0.0.0.0"

I got the following from Firefox debug tool. The site loads and I can see content, however the stylesheet is broken being served using localhost. I don't know if this is relevant, I install it on raspberrypi which uses ARM architecture.

image

Broken demo page.

Your demo page seems to be not working correctly on the gohugo site.

Consider using prefers-color-scheme to provide an automatic light/dark selection

The prefers-color-scheme media query is supported by all major browsers, and switching automatically from light to dark would be a nice touch. It looks like it would mostly be a matter of loading conditionally one CSS file or the other, with something like that:

<script>
  // Fallback if prefers-color-scheme is not supported
  if (window.matchMedia('(prefers-color-scheme)').media === 'not all') {
    document.documentElement.style.display = 'none';
    document.head.insertAdjacentHTML(
        'beforeend',
        '<link rel="stylesheet" href="/light.css" onload="document.documentElement.style.display = ``">'
    );
  }
</script>
<link rel="stylesheet" href="/dark.css" media="(prefers-color-scheme: dark)">
<link rel="stylesheet" href="/light.css" media="(prefers-color-scheme: no-preference), (prefers-color-scheme: light)">
<link rel="stylesheet" href="/style.css">

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.