Coder Social home page Coder Social logo

abhinavs / moonwalk Goto Github PK

View Code? Open in Web Editor NEW
333.0 6.0 499.0 2.36 MB

A fast & minimal Jekyll blog theme with clean dark mode

License: MIT License

HTML 44.65% Ruby 4.65% SCSS 50.08% Shell 0.62%
jekyll jekyll-theme dark-mode minimalist github-pages ruby-gem responsive jekyll-theme-minimalism fast static-site

moonwalk's Introduction

moonwalk - a fast and minimalistic blog theme with clean dark mode

Features

  • Light & dark mode with theme switcher
  • Vertical list, horizontal list, card list
  • Landing page with navbar, footer, portfolio
  • Fast (very minimal CSS) - 100/100 on performance, accessibility, best practices and SEO, please see Lighthouse Report for more details
  • Responsive and mobile friendly
  • SEO optimized (uses Jekyll Soopr SEO Tag)
  • RSS feed (uses Jekyll Feed)
  • Easy to extend
  • Fully compatible with GitHub Pages (see GitHub Pages installation)
  • Auto-generated share images for social media (using Soopr)
  • Share & like buttons (using Soopr)

Lighthouse

Quick Installation

  1. Fork this repository.
  2. cd moonwalk
  3. bin/bootstrap
  4. [Optional] Sign up on Soopr, and add your publish_token in _config.yml file.

If you are installing Moonwalk on Windows, please note that you might have to use Ruby 3.0.x instead of Ruby 3.1.x - you can see Windows specific installation instructions here

Starting Server

bin/start - development server will start at http://127.0.0.1:4000

Deployment

Moonwalk can be easily deployed on all the cloud providers (AWS etc.), and on static website hosting services like Netlify & Vercel. You can also use this button to do one click deploy

Deploy with Netlify

If you want to use Moonwalk as a gem or use Github Pages, please see this page

Customizing

You can edit _config.yml file to customize your blog. You can change things such as the name of the blog, the author, the appearance of the theme (light, dark or auto), how dates are formatted, etc. Customizable fields should be straightforward to understand. Still, _config.yml contains some comments to help you understand what each field does.

For further customization (e.g. layout, CSS) see the official Jekyll's documentation on customizing gem-based themes.

Customize the menu

In order to add/edit/delete entries in the home page, you can copy the home.yml file inside _data folder. Through that file you can define the structure of the menu and add data for navbar, footer, portfolio or simply remove all of that and use simple blog layout. Take a look at the default configuration to get an idea of how it works and read on for a more comprehensive explaination.

The home.yml file accepts the following fields:

  1. Vertical list
  • entries define a new unordered list that will contain menu entries
  • each entry is marked by a - at the beginning of the line
  • each entry has the following attributes:
    • title, which defines the text to render for that menu entry
    • url, which can either be a URL or false. If it is false, the entry will be rendered as plain text; otherwise the entry will be rendered as a link pointing to the specified URL. Note that the URL can either be relative or absolute.
    • post_list, which can be true or false. If it is true, the entry will have all posts in the site as subentries. This is used to render your post list.
    • entries, yes, you can have entries inside entries. In this way you can create nested sublists!
  1. Card list - cards are used to showcase portfolio projects. Please see project_entries in _data/home.yml file
  • each entry is marked by a - at the beginning of the line
  • each entry has the following attributes:
    • title defines the header of the card
    • desc is the body of the card
    • url is a relative or absolute link which this card can point to.
    • highlight in case you want to highlight something, keep the text short though
  1. Horizontal list - moonwalk uses horizontal lists to create navbar and footer. Please see navbar_entries and footer_entries in data/home.yml file
  • each entry is marked by a - at the beginning of the line
  • each entry has the following attributes:
    • title defines the header of the card
    • url is a relative or absolute link which this card can point to.

Pro tips

  1. Moonwalk has 3 in-built layouts:
  • post - for content
  • blog - for listing blog posts
  • home - for landing page you can change your index.md file to use either home or blog layout.
  1. It is extremely easy to tweak the color scheme.
  • for light mode, customize these css variables
html {
    --bg: #fff;
    --bg-secondary: #f3f4f6;
    --headings: #1e293b;
    --text: #374151;
    --text-secondary: #6b7280;
    --links: #6366f1;
    --highlight: #ffecb2; // light yellow
    --code-text: #9d174d;
}
  • for dark mode customize these css variables
@mixin dark-appearance {
  html, body  {
      --headings: #74c0fc;
      --links: #91a7ff;
      --highlight: #41c7c7;
      --bg: #1f242a;
      --bg-secondary: #323945;
      --text: #adb5bd;
      --text-secondary: #9ca3af;
      --code-text: #91a7ff;
  };
}
  1. Sign up for free on Soopr and add your publish_token in _config.yml file - with this, each page gets short URL, like button and auto generated share image for social media.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/abhinavs/moonwalk.

Development

To set up your environment to develop this theme, run bundle install.

Your theme is setup just like a normal Jekyll site! To test your theme, run bundle exec jekyll serve and open your browser at http://localhost:4000. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.

When your theme is released, only the files in _layouts, _includes, _sass and assets tracked with Git will be bundled. To add a custom directory to your theme-gem, please edit the regexp in moonwalk.gemspec accordingly.

Acknowledgement

This theme's original base is no style please! theme created by Riccardo Graziosi - many thanks to him for creating a wonderful theme with nearly no css.

License

The theme is available as open source under the terms of the MIT License.

Other Projects

If you like Moonwalk, do check out my other projects

  • cookie - a free landing website boilerplate using Jekyll and Tailwind CSS
  • scoop - a Sinatra boilerplate project using Corneal, ActiveRecord, Capistrano, Puma & Nginx
  • soopr - a tool that supports you in content marketing
  • apicagent - a FREE API that extracts device details from user-agent string
  • pincodr - a FREE API for Indian pincodes
  • humangous - create public and private 'working with you' guides
  • blockr - a CLI tool to help you easily block and unblock websites
  • microrequests - a Python library to help you consume microservice efficiently

✨⚡You can read more about me on my blog or follow me on Twitter - @abhinav

✨⚡If you like my work, you can buy me a coffee

moonwalk's People

Contributors

abhinavs avatar bwees avatar kleest avatar mydayyy avatar xyzzy 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  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  avatar  avatar

moonwalk's Issues

Docker image?

It would be great if it had a docker image. I am new to Ruby, I always have trouble setting up the development environment on my Mac.

Disabling Soopr?

First of all, huge fan here; this is such a great theme! The dark/light button is what pulled me in, but the UI looks stunning too, and I instantly recommend it whenever someone asks for a static-site solution.

Just a quick question: is there any way to disable the Soopr share buttons for blog posts? Soopr is a great product too, but it seems very out-of-place for this portfolio-type project I'm working on, since it's not exactly a blog website. The buttons don't seem to appear when deployed in GH Pages (unless the publish token is added), but they're there by default when working locally, and I can't seem to uninstall the Soopr plugin either, since it's a dependency for the theme.

Some help would appreciated. Thanks!

can't bootstrap

I'm new to ruby and really attracted by your blog theme.

I follow the guide of installation on windows, but i can't bootstrap the project.

❯❯ moonwalk git:(master) 14:17 ruby .\bin\bootstrap
C:\Ruby30-x64\bin\ruby.exe: no Ruby script found in input (LoadError)
❯❯ moonwalk git:(master)  14:24 ruby -v
ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [x64-mingw32]
❯❯ moonwalk git:(master) 14:27 bundle -v
Bundler version 2.4.7

Please give me some suggestions, thanks.

[Issue] Dark theme fails on tall aspect ratio displays with wide content

Issue

As pictured below, dark theme fails to render on pages containing wide content,
such as a table in this case:

Tall aspect ratio example

Such an issue isn't persistent on local serves, but on public deployments as well, as pictured below:

Tall aspect ratio example

Source

The theme defaults to dark as is already present in the source.

  theme_config:
  appearance: "dark"
  appearance_toggle: true

Comments

Is this something that can be fixed within _config.yml? If yes, could the solution be pushed to the source?

`.w` class conflicts with code whitespace

When formatting some languages, rouge will insert explicit whitespace spans, which use the exact same class as that on the main page body. This gives them a bunch of weird extra padding.

```json
no space
 1 space
  2 space
   3 space
    4 space
```

Becomes

<pre><span class="err">no</span><span class="w"> </span><span class="err">space</span><span class="w">
 </span><span class="mi">1</span><span class="w"> </span><span class="err">space</span><span class="w">
  </span><span class="mi">2</span><span class="w"> </span><span class="err">space</span><span class="w">
   </span><span class="mi">3</span><span class="w"> </span><span class="err">space</span><span class="w">
    </span><span class="mi">4</span><span class="w"> </span><span class="err">space</span><span class="w">
</span></pre>

 
The workaround I've got for now is:

.highlighter-rouge .w {
    max-width: unset;
    margin: unset;
    padding: unset;
}

[Question]: Style like your website?

Hi @abhinavs,
I noticed that your personal website is actually built on Moonwalk. That website looks different from the standard moonwalk theme though, and I think that actually looks a lot cooler! Here are some changes I noticed (there might be more):

  • Back arrow instead of text
  • Different color scheme
  • Different font
  • Copyright and powered by are enclosed in a box
  • Reading time, author name, etc are separated by dots instead of slashes

How do I replicate these changes on my own website? Or better still, would it be possible for you to share the source code for your website? Maybe you should include some of these changes to the moonwalk theme itself, since it looks better (in my opinion). Thanks for the help!

"pages build and deployment" Action Workflow not Triggered On Git Commits

I've fairly new to Jekyll so I might have missed something, but after forking this repo and committing any changes, no workflow is triggered to deploy the new changes (see below). I've just used other Jekyll repos and had success with those with the similar modifications.

Steps to Replicate

  1. Make any file change (e.g. _config.yml).
  2. Git commit and push it to Github.
  3. No workflow is triggered (confirmed under Github > Actions > Workflows). Note that no workflow is triggered rather than something being triggered and then failing.

Things that do Work

  1. Renaming the repo triggers a "pages build and deployment" Workflow.
  2. All file changes on top of the renaming are built and deployed.
  3. The changes are reflected on the final deployed site.

[Feature Request] Support Tags

Dear @abhinavs,

I love this template and applied it on my site here
I am only missing one feature really, and that is the categories for the posts you make on the blog.
Could you please implement this?

[Bug]: Soopr Image Previews Not Working

Hi,
The Soopr Image Previews don't seem to be working for my website. When I investigated further, I realized that it isn't working for the demo site either. The screenshot below has a DevTo link to show how image previews are supposed to show up.

image

Any idea what could be the issue? Soopr doesn't have any documentation for Jekyll, so help would really be appreciated. Thanks!

Favicon not working

Hi,
I'm not able to get a favicon to show for my moonwalk website. I've tried the following:

  • Add icon to icon.png in the root directory
  • Add icon to the assets/images/favicon/favicon-16x16.png directory
  • Update the icon property in _config.yml

I tried searching up on the topic, and that tells me that I should add the favicon HTML tag to either _layouts/head.html or _layouts/default.html. I'm not sure how the theme works in this situation though. Will adding the layout file override the theme (in _config.yml for GH Pages and Gemfile locally)? Or will the layout file I add be used separately from the layout files specified for the theme?

Also, is this the right way to make the favicon work? I would prefer not to clone the repo, and to use moonwalk as a theme, to keep everything lightweight, so how do I add a favicon for my website? Help would be appreciated; thanks.

Running MoonWalk Locally Using Ruby Version 3.1.x on Windows Fails

Problem: Running Moonwalk with Ruby version 3.1.x on Windows 10 on my machine triggers a segmentation fault consistently and doesn't allow launching it locally. I'm hoping that this only applies for my machine but I'm leaving this post in case that is not the case.

Solution: Simply install a version prior, Ruby version 3.0.3 works well with me. Below are more detailed steps for how to setup the entire thing.

Jekyll: Running Moonwalk Theme Locally on Windows

1. Download Ruby Devkit 3.0.3 https://rubyinstaller.org/downloads/ (NOT 3.1.x as it is bugged)
2. Launch an elevated cmd and install the Ruby package manager: `gem install bundler`
3. Clone Moonwalk repository: `git clone https://github.com/abhinavs/moonwalk`
4. Run Moonwalk repository using Ruby: `cd <MOONWALK_DIR>`, `bin/bootstrap`, `bin/start`
5. If successful, you will receive a prompt that the server is being hosted on http://127.0.0.1:4000.

Liquid Exception: undefined method `tainted?' for "/" in _layouts/post.html

bin/start
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Configuration file: /workspaces/Wybert.github.io/_config.yml
            Source: /workspaces/Wybert.github.io
       Destination: /workspaces/Wybert.github.io/_site
 Incremental build: enabled
      Generating... 
       Jekyll Feed: Generating feed for posts
  Liquid Exception: undefined method `tainted?' for "/":String in /workspaces/Wybert.github.io/_layouts/post.html
                    ------------------------------------------------
      Jekyll 4.2.2   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
/usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/variable.rb:124:in `taint_check': undefined method `tainted?' for "/":String (NoMethodError)

      return unless obj.tainted?
                       ^^^^^^^^^
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/variable.rb:89:in `render'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/block_body.rb:103:in `render_node_to_output'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/block_body.rb:80:in `render'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/template.rb:208:in `block in render'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/template.rb:242:in `with_profiling'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/template.rb:207:in `render'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/liquid-4.0.3/lib/liquid/template.rb:220:in `render!'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:39:in `block (3 levels) in render!'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:59:in `measure_counts'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:38:in `block (2 levels) in render!'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:63:in `measure_bytes'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:37:in `block in render!'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:70:in `measure_time'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/liquid_renderer/file.rb:36:in `render!'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:131:in `render_liquid'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:194:in `render_layout'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:163:in `place_in_layouts'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:93:in `render_document'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/renderer.rb:63:in `run'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:547:in `render_regenerated'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:532:in `block (2 levels) in render_docs'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:531:in `each'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:531:in `block in render_docs'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:530:in `each_value'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:530:in `render_docs'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:210:in `render'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/site.rb:80:in `process'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/command.rb:28:in `process_site'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:65:in `build'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/commands/build.rb:36:in `process'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `each'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
        from /usr/local/rvm/gems/ruby-3.2.2/gems/jekyll-4.2.2/exe/jekyll:15:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-3.2.2/bin/jekyll:25:in `load'
        from /usr/local/rvm/gems/ruby-3.2.2/bin/jekyll:25:in `<main>'
        from /usr/local/rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `eval'
        from /usr/local/rvm/gems/ruby-3.2.2/bin/ruby_executable_hooks:22:in `<main>'

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.