Giter Club home page Giter Club logo

Blog Demo Generic Demo

The source of the generic demo is available here: https://github.com/andreondra/simplex-demo

Simplex

A simple yet neat blogging theme. Developed for the golas blog project.

πŸ‘“ Preview

Preview

πŸ’Ž Features

Responsive

Responsivity preview

Dark mode

Dark mode preview

Buttons

Buttons preview

Lity Lightbox

Supports images, videos, iFrames and more. See below for syntax.

Open Graph tags

β„Ή Installation

Add this line to your Jekyll site's Gemfile:

gem "jekyll-theme-simplex"

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

theme: jekyll-theme-simplex

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-theme-simplex

βœ” Usage

βš™ Setting up the template

Add following to the _config.yml:

logo_img: /assets/img/icons/golasblog_logo.svg #Absolute path to the logo. If not specified, the title will be displayed instead.
copyright: Β© Golasowski 2020 #Your copyright.

collections:
    category:
        output: true
    authors:
        output: false

defaults:
  -
    scope:
      path: ""
      type: category
    values:
      layout: "category"

✨ Defining categories

Create a _category folder in the root directory of the blog. Create a .md file for every category with the contents:

---
category: [design] #Category ID.
hue: var(--c-themeHueOrange) #Category hue. See note [1].
title: Design #Category title.
description: Lorem ipsum dolor sit amet.
---

🀡 Defining authors

Create a _authors folder in the root directory. Create a .md file for every author with the contents:

---
nick: golas #Author's nick.
full_name: Andrew Golasowski #Author's full name.
photo_dir: assets/img/authors/golas.png #Path to the author's pic.
---

πŸ“° Defining the menu

Create a _data folder in the root directory. In the folder, create a nav.yaml file. Here's an example:

- title: Programming #Menu item title.
  url: category/programming.html #Menu item url.
  icon: assets/img/icons/programming.svg #Menu item icon.
  hue: "var(--c-themeHueRed)" #Menu item hue - see note [1].
  subnav: #Subnav. See note [2].
      - title: C++ #Submenu item title.
        url: category/cpp.html #Submenu item url.
        hue: "var(--c-themeHueOrange)" #Submenu item hue.
        subnav: #Another subnav
            - title: Libraries
              url: libs.html
              hue: "var(--c-themeHueBlue)"
- title: Design
  url: category/design.html
  icon: assets/img/icons/design.svg
  hue: "var(--c-themeHueRed)"

Pro tip:

Use color icons with the same hue as the menu items. Icons will be black and on hover the color will be shown.

βœ’ Creating posts

Posts are created in the _posts directory. Following front matter attributes are supported:

---
layout: post #Do not change.
category: [programming, testing] #One, more categories or no at all.
title: "Lorem ipsum" #Article title.
author: andy #Author's nick.
nextPart: _posts/2021-01-30-example.md #Next part.
prevPart: _posts/2021-01-30-example.md #Previous part.
og_image: assets/example.png #Open Graph preview image.
og_description: "Example description." #Open Graph description.
fb_app_id: example
---
Your markdown content here.

⚑ Syntax highlighting

The theme uses Pygments CSS created by @richleland. If you want to modify the highlighting styles, just download different CSS or create your own - see Jekyll docs.

Note - @media is used to manage different styles for light and dark web browser mode. See _variables.scss file for details.

πŸ“· Inserting pictures

Classic Markdown syntax is supported. However, to be able to use the lightbox feature, you have to use HTML syntax. Minimal example:

<a href="/assets/example.jpg" data-lity>
  <img src="/assets/example_thumbnail.jpg"/>
</a>

To provide image description use this syntax:

<div class="sx-picture">
  <a href="/assets/example.jpg" data-lity>
    <img src="/assets/example_thumbnail.jpg"/>
  </a>
  <span class="sx-subtitle">My picture description.</span>
</div>

Do not forget the data-lity attribute.

↔ Centering

To center pictures, put the code inside a div with sx-center class like this:

<div markdown=1 class="sx-center">
  ![My picture](/assets/example.jpg)
</div>

πŸ”˜ Buttons

Buttons can be inserted with the following syntax. Just replace theme with red, green, blue, orange, purple or brown, specify the target link in href attribute and the icon in src attribute.

<div class='sx-button'>
  <a href='https://your.link.here.example.com/' class='sx-button__content theme'>
    <img src='/assets/img/icons/example_icon.svg'/>#{text}
  </a>
</div>

Markdown attribute can be omitted if you don't use markdown inside the block (e.g. by using the lightbox syntax).

β„Ή Notes

[1] Hue can be either one of the predefined colors or any of the CSS color attribute supported values (hex, rgb...).

[2] Submenus are generated recursively, so any menu (and submenu) can have its own submenu.

Predefined colors

You can use following predefined colors:

--c-themePrimaryLight: #EFEFEF;
--c-themePrimaryDark:  #101010;
--c-themeSecondaryLight: #DADADA;
--c-themeSecondaryDark: #252525;
--c-themeTerniaryLight: #AEAEAE;
--c-themeTerniaryDark: #515151;
--c-themeQuaternaryLight: #919191;
--c-themeQuaternaryDark: #888888;

--c-themeHueRed: #C02717;
--c-themeHueGreen: #8EA604;
--c-themeHueBlue: #2E86AB;
--c-themeHueOrange: #E59500;
--c-themeHuePurple: #9F00CE;
--c-themeHueBrown: #230007;

These colors are CSS variables, usage: var(--var-name)

Add-ons

Add-ons are distributed as Jekyll plugins. Just download any desired .rb file from the repository _plugin folder and put it in your _plugin folder.

Buttons (button.rb)

Adds a tag to simplify insertion of buttons:

{% button red|https://www.example.com/|/assets/img/icons/cog.svg %}
Download binary
{% endbutton %}

🀝 Contributing

Bug reports and pull requests are welcome on GitHub.

βš™ 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. If you recieve an error stating, "require': cannot load such file -- webrick (LoadError)' Simply run bundle add webrick and this will install the dependencies for running the Jekyll and then you may repeat Step 2!

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-theme-simplex.gemspec accordingly.

Credits

Includes icons by uxwing.

The lightbox feature is provided by Lity licensed under the MIT License.

Uses jQuery JavaScript plugin licensed under the MIT License.

βš– License

Β© Ondrej Golasowski. The theme is available as open source under the terms of the MIT License.

eve-lover's Projects

doitflutter2.0 icon doitflutter2.0

2.0 λ²„μ „μ—…λœ Doit Flutter μ½”λ“œμž…λ‹ˆλ‹€.

flutter_naver_map icon flutter_naver_map

넀이버 지도λ₯Ό ν”ŒλŸ¬ν„°μ—μ„œ λ„μšΈ 수 μžˆλŠ” ν”ŒλŸ¬κ·ΈμΈμž…λ‹ˆλ‹€.

flutterfire icon flutterfire

πŸ”₯ A collection of Firebase plugins for Flutter apps.

git icon git

Git Source Code Mirror - This is a publish-only repository but pull requests can be turned into patches to the mailing list via GitGitGadget (https://gitgitgadget.github.io/). Please follow Documentation/SubmittingPatches procedure for any of your improvements.

git-reference icon git-reference

Online Git Reference at http://git.github.io/git-reference/

hondicamping icon hondicamping

μ˜€ν”ˆμ†ŒμŠ€κ°œλ°œλ°©λ²•λ‘  κ°•μ˜μ—μ„œ ν”„λ‘œμ νŠΈλ₯Ό μ§„ν–‰ν•˜κΈ° μœ„ν•œ μ €μž₯μ†Œμž…λ‹ˆλ‹€.

mlkit icon mlkit

A collection of sample apps to demonstrate how to use Google's ML Kit APIs on Android and iOS

portalservice icon portalservice

2023-1ν•™κΈ° ν¬ν„Έμ„œλΉ„μŠ€κ°œλ°œλ°©λ²•λ‘ 

speech_to_text icon speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.

workshop-library icon workshop-library

A library of workshops written by and for Microsoft Learn Student Ambassadors and Cloud Advocates and their local communities

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.