当前位置: 首页 > 软件库 > Web应用开发 > >

jekyll-dash

授权协议 Apache-2.0 License
开发语言 JavaScript
所属分类 Web应用开发
软件类型 开源软件
地区 不详
投 递 者 郗缪文
操作系统 未知
开源组织
适用人群 未知
 软件概览

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

Build Tag

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

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.8 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

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!

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.

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可以独立的在本地运行,这样方便构建GitHub个人博客,官方介绍安装完成Jekyll只需要几分钟时间,但实际操作的过程当中发现存在很多问题,记录下来以备参考。 安装依赖工具 安装Jekyll最简单的方式是通过RubyGems安装,但这需要以下的依赖包:Ruby,RubyGems和node.js。以下介绍ubuntu系统安装。 $ sudo apt-get install rub

  • jekyll 的一些函数和技巧 一些函数 循环输出 3 篇文章 for post in site.posts limit:3 endfor 循环输出最近 3 篇 for post in site.posts offset:3 limit:3 endfor 日期 page.date | date:"%B %b, %Y" 分页输出 for post in paginator.posts conte

  • Jekyll是一个静态站点生成器。它采用您最喜欢的标记语言来编写文本,并使用布局创建静态网站。您可以调整网站的外观、URL、页面上显示的数据等等。 必备组件 Jekyll 需要以下这些: Ruby 2.5.0 或更高版本 RubyGems GCC 和 Make 有关指南和详细信息,请参阅要求。 操作指南 安装所有必备组件。 安装 jekyll 和 bundler gems. gem install

  • Problems and Solutions Problem Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org0-------------------

  •   等有空了再提交到官方的User Contributed上去。 下载链接:https://download.csdn.net/download/bokix/12844266

  • jekyll启动时出现的问题 G:\blog\testblog>bundle exec jekyll serve Configuration file: G:/blog/testblog/_config.yml Source: G:/blog/testblog Destination: G:/blog/testblog/_site Incremental b

  • jekyll中文网: https://jekyll.zcopy.site jekyll中文文档:https://jekyll.zcopy.site/docs/

  • jekyll学习总结 1,{{ site.属性名 }} _config.yml文件中添加的任何属性都可以通过site命名空间访问 2,{{ page.属性名 }} 页面前端的任何属性都可以通过page命名空间访问 3,_posts按照标准YYYY-MM-DD-title.md发布文章格式 4,layout多层嵌套 [外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-A

  • Jekyll 浏览您的网站,寻找要处理的文件。任何有 front matter 的文件都要经过处理。对于这些文件中的每一个,Jekyll都会通过 Liquid 提供各种数据。以下是可用数据的参考。 Global Variables Variable Description site Site wide information + configuration settings from _confi

  • 如果您在安装或使用Jekyll时遇到问题,这里有一些小贴士可能会有所帮助。如果您遇到的问题没有在下面介绍,请查看 check out our other help resources 。 安装问题 如果您在gem安装过程中遇到错误,您可能需要安装用于编译 Ruby 2.x 扩展模块的头文件。这可以在 Ubuntu 或 Debian 上通过运行: sudo apt-get install ruby2

  • Jekyll Now Jekyll是一个静态站点生成器,非常适合于GitHub托管的博客([jekyll存储库](https://github.com/jekyll/jekyll))。 Jekyll Now 通过消除大量的预先设置,使创建jekyll博客变得更容易。 不需要触摸命令行 不需要安装/配置ruby、rvm/rbenv、ruby gems:relaxed: 您不需要安装运行时依赖项,如标

  • 前言 本文将介绍lodash-super开源库。 这是一个?lodash?加强版的工具库,因为lodash?只提供了最基础的一些工具方法,当我们在业务上使用时,往往需要对其进行再次封装,比较麻烦。 所以,该库提供了一个在 业务场景中?更加?通用的工具库。 希望对你有所帮助! 希望大家点个star,或者一同共建。 安装 npm install lodash-super?或?yarn add loda

  • 写博客已经嵌入到了 Jekyll 中。你把博客文章写成文本文件,Jekyll提供了把它变成博客所需的一切。 The Posts Folder _posts 文件夹是您的博客文章所在的位置。你通常用 Markdown 写文章,当然也支持HTML。 Creating Posts 要创建一篇文章,请按以下格式将文件添加到 _posts 目录: YEAR-MONTH-DAY-title.MARKUP 其

  • 常用变量 Jekyll 会遍历你的网站搜寻要处理的文件。任何有 YAML 头信息的文件都是要处理的对象。对于每一个这样的文件,Jekyll 都会通过 Liquid 模板工具来生成一系列的数据。下面就是这些可用数据变量的参考和文档。 全局(Global)变量 变量 说明 site 来自_config.yml文件,全站范围的信息+配置。详细的信息请参考下文 page 页面专属的信息 + YAML 头文

 相关资料
  • Jekyll 是一个简单的免费的Blog生成工具,类似WordPress。但是和WordPress又有很大的不同,原因是jekyll只是一个生成静态网页的工具,不需要数据库支持。但是可以配合第三方服务,例如discuz。最关键的是jekyll可以免费部署在Github上,而且可以绑定自己的域名。 快速安装指令: gem install jekylljekyll new my-awesome-sit

  • 中文网站 jekyllcn 快速开始 ~ $ gem install jekyll bundler ~ $ jekyll new my-awesome-site ~ $ cd my-awesome-site ~/my-awesome-site $ bundle install ~/my-awesome-site $ bundle exec jekyll serve # => 打开浏览器 http

  • jekyll-admin 是一个 jekyll 插件,为用户提供了传统 CMS(内容管理系统)风格的图形化界面来创作内容和管理 jekyll 网站。 该项目分为两部分。基于 Ruby 的 HTTP API 处理 jekyll 和文件系统的操作部分,以及在这个 API 基础上的基于 JavaScript 的前端部分。 安装: 就像安装其他插件一样,请参阅 jekyll 文档的插件安装部分安装 jek

  • Jekyll的增强版,使用Markdown来写日志。 Jekyll采用静态文件方式管理,不需要数据库即可支持一个独立博客站点,在github-pages平台上被普遍采用。Jekyll-Bootstrap在Jekyll基础上,集成了twitter-bootstrap界面风格和一些实用的插件,并且易于扩展。

  • Jekyll Docker Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types wi

  • jekyll-katex This is a Jekyll plugin for performing compile-time math rendering via the KaTeX library.KaTeX is a library for rending math on the web using LaTeX, similar to MathJax. KaTeX differs from