From 6464a2ee71d32b34cc26f2a91975dd415ea64dd0 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 12 Oct 2022 15:10:07 +0000 Subject: [PATCH] Update to Bluelib 5 --- .gitignore | 1 + Gemfile | 2 -- README.md | 52 ++++++++++++++++-------------- _config.yml | 14 +++++++-- _includes/post-summary.html | 17 ---------- _includes/tag.html | 5 --- _layouts/0_page.html | 21 +++++++++++++ _layouts/1_base.html | 10 ++++++ _layouts/2_blog.html | 63 +++++++++++++++++++++++++++++++++++++ _layouts/base.html | 14 --------- _layouts/box.html | 7 ----- _layouts/default.html | 16 ---------- _layouts/home.html | 56 --------------------------------- _layouts/post.html | 25 --------------- _posts/2021-10-10-test.md | 7 +++-- _posts/2022-10-12-five.md | 6 ++++ index.html | 6 ---- index.md | 8 +++++ 18 files changed, 153 insertions(+), 177 deletions(-) delete mode 100644 _includes/post-summary.html delete mode 100644 _includes/tag.html create mode 100644 _layouts/0_page.html create mode 100644 _layouts/1_base.html create mode 100644 _layouts/2_blog.html delete mode 100644 _layouts/base.html delete mode 100644 _layouts/box.html delete mode 100644 _layouts/default.html delete mode 100644 _layouts/home.html delete mode 100644 _layouts/post.html create mode 100644 _posts/2022-10-12-five.md delete mode 100644 index.html create mode 100644 index.md diff --git a/.gitignore b/.gitignore index 0251f87..26e810b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ .sass-cache _site Gemfile.lock +vendor diff --git a/Gemfile b/Gemfile index 6d6e532..d7ffedc 100644 --- a/Gemfile +++ b/Gemfile @@ -2,5 +2,3 @@ source "https://rubygems.org" gemspec - -gem "webrick", "~> 1.7" diff --git a/README.md b/README.md index d9c431b..15a51ee 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ -# jekyll-theme-bluelib +# Bluelib Jekyll -A theme providing Bluelib themes on Jekyll static sites! - -![Screenshot](screenshot.png) +A *work-in-progress* theme for Jekyll using [Bluelib 5](https://github.com/steffo99/bluelib)! ## Installation @@ -30,41 +28,47 @@ Or install it yourself as: $ gem install jekyll-theme-bluelib ``` -After installing, add to `_config.yml` the name of your preferred bluelib theme: +After installing, add to `_config.yml` your desired config: ```yml -bluelib: "royalblue" +title: "Bluelib Jekyll" + +bluelib: + rulesets: + - base.root + - classic.root + - glass.root + - colors-royalblue.root + - fonts-fira-ghpages.root + +background: >- + url(https://gh.steffo.eu/bluelib/examples/Space_Default.jpg) ``` ## Usage -The theme provides four layouts: `default`, `base`, `box` and `post`. +The theme provides three layouts: `0_default`, `1_base` and `2_blog`. -### `default` +### `0_page` -Default is the simplest layout of the four, and only adds the bluelib stylesheets for the theme to be displayed. +Default is the simplest layout of the three, and creates the page root, containing only **the Bluelib rulesets** sourced from [UNPKG](https://unpkg.com/), and an **empty body**. -In particular, it ``s in the following order: +In particular, it ``s the rulesets using the order specified at `site.bluelib.rulesets`. -1. The `skeleton.root.css` from the latest version of bluelib -2. The bluelib `root` target defined in the `bluelib` variable of `_config.yml` (`site.bluelib`) -3. The bluelib `root` target defined in the `bluelib` variable of the Front Matter of the page (`page.bluelib`) -4. The CSS files specified in the `extra_css` array of `_config.yml` (`site.extra_css`) +### `1_base` -### `base` +Base adds the website title, hyperlinking to the site home, to the `0_page` layout. -Base adds some elements to the `default` layout: +### `2_blog` -- it adds a `layout-threecol` to the page -- it centers the page `contents` by using `layout-threecol-center` -- it renders the `title` defined in `_config.yml` as a `

` element before the contents +Blog creates a panel disposition intended for posting articles in a blog-like fashon. -### `box` +It currently supports the following Jekyll features: -Box wraps the `contents` of the page in a `panel panel-box`. +- [x] Posts + - [ ] Tags + - [ ] Categories -### `post` - -Post extends the `box` layout by adding the `page.title` to the top of the box, rendered as a `

` element. +It is an adequate index page layout as well! ## Development diff --git a/_config.yml b/_config.yml index 410219d..7969d96 100644 --- a/_config.yml +++ b/_config.yml @@ -1,2 +1,12 @@ -title: "Please set a site title in _config.yml!" -bluelib: "royalblue" +title: "Bluelib Jekyll" + +bluelib: + rulesets: + - base.root + - classic.root + - glass.root + - colors-royalblue.root + - fonts-fira-ghpages.root + +background: >- + url(https://gh.steffo.eu/bluelib/examples/Space_Default.jpg) \ No newline at end of file diff --git a/_includes/post-summary.html b/_includes/post-summary.html deleted file mode 100644 index 8bc37fa..0000000 --- a/_includes/post-summary.html +++ /dev/null @@ -1,17 +0,0 @@ -
- -
- -
-
- {% for tag in post.tags %} - {% include tag.html %} - {% endfor %} -
-
diff --git a/_includes/tag.html b/_includes/tag.html deleted file mode 100644 index 7f5ee86..0000000 --- a/_includes/tag.html +++ /dev/null @@ -1,5 +0,0 @@ - \ No newline at end of file diff --git a/_layouts/0_page.html b/_layouts/0_page.html new file mode 100644 index 0000000..4515973 --- /dev/null +++ b/_layouts/0_page.html @@ -0,0 +1,21 @@ + + + + + {{ page.title }} - {{ site.title }} + + + {% for ruleset in site.bluelib.rulesets %} + + {% endfor %} + + + {{ content }} + + diff --git a/_layouts/1_base.html b/_layouts/1_base.html new file mode 100644 index 0000000..875544a --- /dev/null +++ b/_layouts/1_base.html @@ -0,0 +1,10 @@ +--- +layout: 0_page +--- + +

+ + {{ site.title }} + +

+{{ content }} diff --git a/_layouts/2_blog.html b/_layouts/2_blog.html new file mode 100644 index 0000000..41145db --- /dev/null +++ b/_layouts/2_blog.html @@ -0,0 +1,63 @@ +--- +layout: 1_base +--- + + + +
+
+
+ {% if page.title %} +

+ {{ page.title }} +

+ {% endif %} + {{ content }} +
+
+ {% if site.posts %} + + {% endif %} +
diff --git a/_layouts/base.html b/_layouts/base.html deleted file mode 100644 index 33a8eee..0000000 --- a/_layouts/base.html +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: default ---- - -
-
-

- - {{ site.title }} - -

- {{ content }} -
-
diff --git a/_layouts/box.html b/_layouts/box.html deleted file mode 100644 index 6aebfd9..0000000 --- a/_layouts/box.html +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: base ---- - -
- {{ content }} -
diff --git a/_layouts/default.html b/_layouts/default.html deleted file mode 100644 index b43312e..0000000 --- a/_layouts/default.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - {% for css in site.extra_css %} - - {% endfor %} - {{ page.title }} - {{ site.title }} - - - {{ content }} - - diff --git a/_layouts/home.html b/_layouts/home.html deleted file mode 100644 index 4774cde..0000000 --- a/_layouts/home.html +++ /dev/null @@ -1,56 +0,0 @@ ---- -layout: base ---- - -
-

- {{ page.title }} -

- {{ content }} -
- -{% if site.posts %} -
-

- Posts -

-

- These are the latest posts in the site in reverse chronological order. -

- {% for post in site.posts %} - {% include post-summary.html %} - {% endfor %} -
-
-

- Posts by tag -

-

- These are all the posts in the blog, grouped by their tag. -

-
- {% for tag_pair in site.tags %} -
-

- {{ tag_pair[0] }} -

- {% for post in tag_pair[1] %} - {% include post-summary.html %} - {% endfor %} -
- {% endfor %} -
-
-{% else %} -
-

- Pages -

-

- These are the pages in the site in alphabetical order. -

- {% for post in site.posts %} - {% include page-summary.html %} - {% endfor %} -
-{% endif %} diff --git a/_layouts/post.html b/_layouts/post.html deleted file mode 100644 index 0abb3f9..0000000 --- a/_layouts/post.html +++ /dev/null @@ -1,25 +0,0 @@ ---- -layout: base ---- - -
-
- -
-
- {% for tag in page.tags %} - {% include tag.html %} - {% endfor %} -
-
- -
-

- - {{ page.title }} - -

- {{ content }} -
diff --git a/_posts/2021-10-10-test.md b/_posts/2021-10-10-test.md index 21a7ed1..8af1b85 100644 --- a/_posts/2021-10-10-test.md +++ b/_posts/2021-10-10-test.md @@ -1,7 +1,8 @@ --- -layout: post +layout: 2_blog title: "Hello world!" -tags: example first hello-world --- -This is a sample post made to display posts made using `jekyll-theme-bluelib`. +This is an example post created to show an example of posts created using Bluelib Jekyll! + +You can go back to the home by clicking the website title at the top. diff --git a/_posts/2022-10-12-five.md b/_posts/2022-10-12-five.md new file mode 100644 index 0000000..433646e --- /dev/null +++ b/_posts/2022-10-12-five.md @@ -0,0 +1,6 @@ +--- +layout: 2_blog +title: "Say hello to Bluelib 5" +--- + +This theme has been updated to [Bluelib 5](https://gh.steffo.eu/bluelib/examples/)! diff --git a/index.html b/index.html deleted file mode 100644 index 1ad837b..0000000 --- a/index.html +++ /dev/null @@ -1,6 +0,0 @@ ---- -layout: home -title: "jekyll-theme-bluelib" ---- - -This is the example home page of jekyll-theme-bluelib. diff --git a/index.md b/index.md new file mode 100644 index 0000000..f6fd0e0 --- /dev/null +++ b/index.md @@ -0,0 +1,8 @@ +--- +layout: 2_blog +title: "Example" +--- + +Welcome to the **Bluelib Jekyll** example website! + +What is going on?!