Giter Club home page Giter Club logo

jekyll-dash's Introduction

logo

A dark and light theme for Jekyll, inspired by Dash UI for Atom. 🌒☀

Build Tag license Gem Downloads

This theme for Jekyll has been inspired by dash-ui, a dark theme for Atom.

design

Features

🌓 Dark/Light Mode

⬅️ Right-to-Left (RTL) Support

🔖 Tags

📙 Pagination

💻 Syntax Highlighting

👋 Customisable Avatar Box

💕 Social Links

Installation

Add this line to your Jekyll site's Gemfile:

For Jekyll 3:

gem 'jekyll-dash', '~> 1'

Keep in mind: Github pages generation only supports Jekyll 3.9.x right now.

For Jekyll 4:

gem 'jekyll-dash', '~> 2'

And add this line to your Jekyll site's _config.yml:

theme: jekyll-dash

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-dash -v version

Configuration

Add the following configuration to your site. Customise it to your needs!

# required by disqus to display comments
url: https://your-site-url

# jekyll-paginate
paginate: 5
paginate_path: "/blog/page:num/"

# jekyll-tagging (optional)
tag_permalink_style: pretty
tag_page_layout: tag_page
tag_page_dir: tag

# for github pages custom domains:
# include: [CNAME]

dash:
  # the way how dates should be displayed
  date_format: "%b %-d, %Y"

  # (optional) discqus comment configuration
  disqus:
    shortname: <your-disqus-shortname>  

  # the animation speed of the post scroll-in effect
  animation_speed: 50

  # wether to enable Right-to-Left support or not
  rtl: false

  # Replaces the default avatar provider (gravatar)
  #avatar_source: github
  #github_username: bitbrain
  #avatar_source: local
  #avatar_path: /assets/avatar.png

  # generate social links in footer
  # supported colors: green, red, orange, blue, cyan, pink, teal, yellow, indigo, purple
  social_links:
    - url: https://twitter.com/bitbrain_
      icon: twitter-square
      color: cyan
    - url: https://bitbrain.itch.io
      icon: itch-io
      color: red
    - url: https://github.com/bitbrain
      icon: github-square
      color: purple
  
  # wether the author box should be displayed or not
  show_author: true

Using this theme directly on Github Pages

Please keep in mind that Github Pages does only support a limited list of Jekyll plugins. You will be able to use this theme on Github Pages but some functionality might not be available, for example displaying tags. In order to use this theme to a full extend, you have to generate the _site separately via Github Actions.

  • <username>.github.io - contains main source branch and orphan gh-pages branch (see example)

I have created a guide on how to set this up here.

You are not required to do this, but keep in mind that some functionality might not be available when using the Jekyll generator on Github directly!

If you are using a custom domain add in your main branch a file named CNAME with your domain there and uncomment this line in your config file:

include: [CNAME]

For more information about how to configure your CNAME file, read the official documentation.

Additional Features

Tagging add the jekyll/tagging plugin to your _config.yml file to enable tagging. Do not forget to also add the following to your Gemfile:

gem "jekyll-tagging"

Gravatar if you want to display your gravatar picture, add the liquid-md5 to your _config.yml file. Do not forget to also add the following to your Gemfile:

gem "liquid-md5"

FAQ

I have configured posts but no posts are showing?

Solution: You most probably forgot to configure jekyll-paginate in your _config.yml! Make sure you have the correct configuration as described above!

I have added the correct configuration for jekyll-paginate but it is now complaining about a missing index.html file. What do I do?

Solution pagination only works with HTML files! Markdown is not supported there. Simply rename your index.md into index.html - that should do the trick!

I have configured Disqus via _config.yml but Disqus fails to load on the page?

Solution: Make sure you configure the correct url within your _config.yml. Also make sure that your domain is trusted by Disqus. This can be configured within Disqus by adding a trusted domain.

I am using this theme but I don't see any tags?

Solution: as described above you have to add the tagging plugin. Additionally, tags do not work natively by Github Pages. You have to build your site on an external CI and push the _site artifacts to a hosting repository.

I am getting an error that Bundler could not find compatible versions for gem

Solution

Make sure you are using a version of this theme that is compatible with Jekyll. Version 1.x is only compatible with Jekyll 3.x while Version 2.x is only compatible with Jekyll 4.x.

I am getting an error 'cannot load such file --webrick' when trying to run bundle exec jekyll serve

Solution

As explained here this seems to be a bug with some recent Jekyll 4 version. To solve this simply run:

bundle add webrick

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/bitbrain/jekyll-dash. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

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 jekyll-dash.gemspec accordingly.

If you want to learn how Jekyll Dash gets deployed via Github Actions, feel free to read this article written by me.

License

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

jekyll-dash's People

Contributors

batshalregmi avatar bitbrain avatar guylewin avatar hatsat32 avatar hlindqvist avatar itrich avatar m4rcix avatar nighmared avatar ran-dall avatar riddletime avatar sadiecat avatar stampylongr avatar theamanrawat avatar viniciuspereiras 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

jekyll-dash's Issues

Font Awesome rendering issues on Arch Linux, Chrome latest version

Describe the bug
When using number bullets inside an indented block, it inserts an extra character that can't be viewed and shows a crossed box instead.

To Reproduce
Steps to reproduce the behavior:
Use the following content in a post -

> _References:_  
>    
> 1. _[https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting/server-side-xss-dynamic-pdf](https://book.hacktricks.xyz/pentesting-web/xss-cross-site-scripting/server-side-xss-dynamic-pdf)_     
> 2. _[https://www.noob.ninja/2017/11/local-file-read-via-xss-in-dynamically.html](https://www.noob.ninja/2017/11/local-file-read-via-xss-in-dynamically.html)_

The behavior can be observed at the bottom of this post - https://blog.dixitaditya.com/2020/10/09/leveraging-xss-to-read-internal-files.html

Expected behavior
There should not be extra character according to the markdown.

Screenshots
image

Desktop (please complete the following information):

  • Arch Linux, Chrome latest version

can't install jekyll-dash with jekyll 4.1.1

Hi.

I have some issues with installing jekyll-dash. I create new fresh blog using jekyll new something. After that I try to add gem "jekyll-dash" to my gemfile. Then I try to run this command bundle. But gives me errors.

$ bundle
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll":
  In snapshot (Gemfile.lock):
    jekyll (= 4.1.1)

  In Gemfile:
    jekyll (~> 4.1.1)

    jekyll-dash was resolved to 1.3.4, which depends on
      jekyll (~> 3.5)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

I tried bundle update and some google stuff but did not work. I can't continue installation. any help would be great.

My System:

  • jekyll 4.1.1
  • ubuntu 20.04
  • Bundler version 2.1.4
  • ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]

Show preview on social links

Currently, when sharing blogposts made with this theme on social media (such as Twitter) there is no preview available:

Screenshot 2021-10-12 at 16 09 55

Describe the solution you'd like
Generate a preview for the page based on either the profile avatar or some other preview? To be discussed.

Famous social networks are

  • Reddit
  • Twitter
  • Facebook
  • Discord

Cannot load webrick

Describe the bug
When trying to serve the site locally, it runs into an error - C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/jekyll-4.2.1/lib/jekyll/commands/serve/servlet.rb:3:in 'require': cannot load such file -- webrick (LoadError)

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. Go to the directory and do bundle install
  3. Run bundle exec jekyll serve

Expected behavior
The server should build the site and serve it.

Screenshots
jekyll-dash_error

Desktop:

  • OS: Windows 10
  • Browser: Chrome
  • Version: 94.0.4606.81 (Official Build) (64-bit)

Additional context
Seems to be fixed by bundle add webrick

I can't integrate telegram

@bitbrain I cannot embed the telegram comments for the website. Not shown in any way .. some ideas? 😔

This is the code:

<script 
async src="https://comments.app/js/widget.js?3" 
data-comments-app-website="code-widget"
data-limit="40" 
data-color="F95C54" 
data-outlined="1" 
data-colorful="1" 
data-dark="1">
</script>

Publishing Release Events

When releasing a new version of this theme I manually have to re-run my blog to apply the latest changes. Find a way to automatically trigger a build when a new theme version is available.

Describe the solution you'd like

There is an interesting solution mentioned here https://github.community/t/triggering-by-other-repository/16163 however, this seems to be based on Github tokens and I need a solution that is available to everyone.

If anyone has any ideas on how to achieve this, that's appreciated. Also, if you want to learn how Jekyll Dash is currently getting released, read up on this article I have written: https://bitbra.in/2021/10/05/workflow-of-releasing-gem-based-jekyll-theme.html

Async site loading

Right now, clicking a link results flickering and the entire page re-rendering.

Introduce a new option in this theme:

dash:
   async: true

The default value of this can be decided while implementing it.

Developer notes

Use something like Jekyll-AJAX to implement this.

Page build warning

Hi,

I have problem when I push to master branch. Please help me!
Thanks

The page build completed successfully, but returned the following warning for the master` branch:

You are attempting to use a Jekyll theme, "jekyll-dash", which is not supported by GitHub Pages. Please visit https://pages.github.com/themes/ for a list of supported themes. If you are using the "theme" configuration variable for something other than a Jekyll theme, we recommend you rename this variable throughout your site. For more information, see https://help.github.com/en/github/working-with-github-pages/adding-a-theme-to-your-github-pages-site-using-jekyll.

For information on troubleshooting Jekyll see:

https://help.github.com/articles/troubleshooting-jekyll-builds`

New avatar source: urlpath

Can I use it like Avatar1.png in Dark Theme and Avatar2.png in Light Theme?
Oh, and the automatic distribution of the blog I asked last time worked well
Thanks :D

How to display post tags?

i fork your jekyll-dash and i see my blog
when i can't see my post tags in mainpage
what the problem?
스크린샷 2020-08-13 오전 1 36 17
this is my post code
스크린샷 2020-08-13 오전 1 36 28
and this is my blog site
스크린샷 2020-08-13 오전 1 37 23
this is your blog
how can i fix this problem?
thanks

no posts are showing up

first of all, im pretty new to jekyll. i've played around with it the last couple of days. i tried to install this theme, but no posts are showing up. i did a made a new fresh site with the default theme just to make sure nothing was wrong from my side - and the (first original) post shows up, then i install the theme, and i see "no posts yet.". as this was a new install im sure i didnt change anything to make them disappear, but do i need to make any change for them to show? i also want to add that the post is in the _site-folder, which makes it even more strange in my eyes.

this is on my computer, but im gonna use it on my vps when i get it working. so its not on github pages, if that does matter

Bundler cannot continue

I have problem when I run "bundle" command. Please help me!
Thanks

Your Gemfile lists the gem jekyll-dash (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once (per group).
While it's not a problem now, it could cause errors if you change the version of one of them later.

[!] There was an error parsing `Gemfile`: You cannot specify the same gem twice coming from different sources.
You specified that jekyll-dash (>= 0) should come from an unspecified source and source at `.`
. Bundler cannot continue.

 #  from /../hqcthunders.github.io/Gemfile:8
 #  -------------------------------------------
 #  
 >  gemspec
 #  -------------------------------------------

Integrate with Github actions

Motivation

We are currently using TravisCI to publish new versions of the theme. That process is flawed for various reasons:

  • manual scripts to push to rubygems
  • manual authentication
  • difficult to set up
  • less visibility on the project (external CI)

Solution

Implement two actions:

  • build gem and push it as an artifact release to Github
  • push the gem received from a new release to rubygems

Tag report doesnt work on github

Describe the bug
When I compile with bundle exec jekyll serve everything just work fine, i have the issue when i push the repo, the tagging system doesn't work
I tried with jekyll 3 and 4 version, alse with 1 ans 2 version of the theme.

Bug about fonts scss

@include font('Varela Round', '/assets/fonts/VarelaRound-Regular');

Seems here need a subpath to config it

Open images in a new tab on click

Hi, Its better to make images openable on click

If we have one image in our blog and we want it to be open in full screen when we click on it so it would be better for user to view image clearly.

Thank you

Adding tags causes errors.

When I run jekyll serve localy, I get the following error:

  Liquid Exception: no implicit conversion of nil into String in /_layouts/post.html
jekyll 3.8.5 | Error:  no implicit conversion of nil into String

I do not know much about ruby, but after some googling I found that something needs to be converted to a string, however I do not know what.

The header variables I assigned to a post are:

---
layout: "post"
title: "A Programmer stuck in a rut"
author: "Zanark"
tags : Tips
---

Can you please help me out with this, I am unable to find a solution for this.

The code in /_layouts/post.html is exactly the same as the one in the repository on master branch

document feature set better

The README currently does not really suggest what exact features this theme offers. Improve the wording and structure of the README.md to highlight those.

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.