• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

samarsault/plainwhite-jekyll: A configurable portfolio-style jekyll theme for wr ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

samarsault/plainwhite-jekyll

开源软件地址:

https://github.com/samarsault/plainwhite-jekyll

开源编程语言:

SCSS 66.8%

开源软件介绍:

plainwhite

Simplistic jekyll portfolio-style theme for writers.

Demo: samarsault.com

plainwhite theme preview

Installation on Github Pages

Add this line to your site's _config.yml:

remote_theme: samarsault/plainwhite-jekyll

Installation

Add this line to your Jekyll site's Gemfile:

gem "plainwhite"

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

theme: plainwhite

And then execute:

$ bundle

Or install it yourself as:

$ gem install plainwhite

Usage

The "plainwhite" key in _config.yml is used to customize the theme data.

plainwhite:
  name: Adam Denisov
  tagline: Developer. Designer
  date_format: "%b %-d, %Y"

  social_links:
    twitter: samarsault
    github: samarsault
    linkedIn: in/samarsault # format: locale/username

Updating Placeholder Image

The placeholder portfolio image can be replaced by the desired image by placing it as assets/portfolio.png in your jekyll website, or by changing the following line in _config.yaml

plainwhite:
  portfolio_image:  "assets/portfolio.png" # the path from the base directory of the site to the image to display (no / at the start)

To use a different image for dark mode, e.g. with different colors that work better in dark mode, add a portfolio_image_dark entry in addition to the portfolio_image.

plainwhite:
  portfolio_image:      "assets/portfolio.png"
  portfolio_image_dark: "assets/portfolio_dark.png"

Comments (Disqus)

Comments on posts can be enabled by specifying your disqus_shortname under plainwhite in _config.yml. For example,

plainwhite:
  disqus_shortname: games

Google Analytics

It can be enabled by specifying your analytics id under plainwhite in _config.yml

plainwhite:
  analytics_id: "< YOUR ID >"

Sitemap

It can be toggled by the following line to under plainwhite in _config.yml

plainwhite:
  sitemap: true

Excerpts

Excerpts can be enabled by adding the following line to your _config.yml

show_excerpts: true

Layouts

  • Home
  • Page
  • Post

Navigation

Navigation can be enabled by adding the following line to your _config.yml

plainwhite:
  navigation:
    - title: My Work
      url: "/my-work"
    - title: Resume
      url: "/resume"

Mobile

By default, Plainwhite places the sidebar (logo, name, tagline etc.) above the content on mobile (narrow screens). To condense it (moving some things to the bottom of the page and making the rest smaller) so it takes up less space, add the following to your _config.yml:

plainwhite:
  condensed_mobile:
    - home
    - post
    - page

This chooses which layouts (types of page) should be condensed on mobile screens. E.g. if you want everything but the landing page to be condensed, remove home from the list. This option does not affect rendering on wider screens.

Dark mode

Dark mode can be enabled by setting the dark_mode flag in your _config.yml

The website will check the OS preferred color scheme and set the theme accordingly, the preference will then be saved in a cookie

plainwhite:
  dark_mode: true

plainwhite dark theme previe

Multiline tagline

Tagline can be multiline in this way

plainwhite:
  tagline: |
  First Line. 

  Second Line. 

  Third Line.

Search-bar

Search-bar can be enabled by adding the following line to config.yml

plainwhite:
  search: true

Search is powered by Simple-Jekyll-Search Jekyll plugin. A search.json containing post meta and contents will be generated in site root folder. Plugin JavaScript will then match for posts based on user input. More info and search.json customization documentation can be found in plugin repository.

Base URL

You can specify a custom base URL (eg. example.com/blog/) by adding the following line to _config.yaml. Note that there is no trailing slash on the URL.

baseurl: "/blog"

Language

You can set the lang attribute of the <html> tag on your pages by changing the following line in _config.yml:

plainwhite:
  html_lang: "en"

See here for a full list of available language codes

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/samarsault/plainwhite-jekyll. 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 plainwhite.gemspec accordingly.

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

License

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

More themes




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
wowthemesnet/mundana-theme-jekyll: Mundana is a free Jekyll theme, Medium styled ...发布时间:2022-07-07
下一篇:
volny/creative-theme-jekyll发布时间:2022-07-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap