From 35260e07014c04306a5e55a0b7564ada14c18283 Mon Sep 17 00:00:00 2001 From: Andreas Molzer Date: Mon, 22 Apr 2019 04:44:18 +0200 Subject: [PATCH] Augment the display of projects Each project now gets assigned a weight used in the ordering on the front page listing. Additionally, rendered summaries can be provided to be used in the box. Three links and badges are recognized and automatically embedded into the project page: crates.io, documentation, and the repository url. --- _config.yml | 1 + _layouts/project.html | 16 ++++++++++++++++ _projects/image.md | 6 ++++++ _summaries/image.md | 6 ++++++ assets/css/style.scss | 10 ++++++++++ index.html | 6 ++++-- 6 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 _summaries/image.md diff --git a/_config.yml b/_config.yml index e093aac..cc6d40f 100644 --- a/_config.yml +++ b/_config.yml @@ -1,4 +1,5 @@ theme: jekyll-theme-slate collections: + summaries: projects: output: true diff --git a/_layouts/project.html b/_layouts/project.html index 4f43f66..0e0775b 100644 --- a/_layouts/project.html +++ b/_layouts/project.html @@ -3,6 +3,22 @@ ---
+ +

{{ page.title }}

diff --git a/_projects/image.md b/_projects/image.md index 7801b66..454be66 100644 --- a/_projects/image.md +++ b/_projects/image.md @@ -1,6 +1,12 @@ --- layout: project name: "image" +weight: 1000 +crates_io: "https://crates.io/crates/image" +crates_io_badge: "https://img.shields.io/crates/v/image.svg" +github: "https://github.com/image-rs/image" +docs: "https://docs.rs/image" +docs_badge: "https://docs.rs/image/badge.svg" --- The `image` project. diff --git a/_summaries/image.md b/_summaries/image.md new file mode 100644 index 0000000..ff3e852 --- /dev/null +++ b/_summaries/image.md @@ -0,0 +1,6 @@ +--- +name: "image" +--- + +Aggregates major image formats into a coherent interface for reading, writing +and editing. diff --git a/assets/css/style.scss b/assets/css/style.scss index e695b39..9aa5a7a 100644 --- a/assets/css/style.scss +++ b/assets/css/style.scss @@ -49,3 +49,13 @@ a:hover { max-width: 100%; } } + +.external-sites { + float: right; +} + +.external-sites>p { + margin-top: 1px; + margin-bottom: 1px; + padding: unset; +} diff --git a/index.html b/index.html index 5d953a8..90044a8 100644 --- a/index.html +++ b/index.html @@ -4,10 +4,12 @@ ---
-{% for project in site.projects %} +{% assign sorted_projects = site.projects | sort: "weight" | reverse %} +{% for project in sorted_projects %} + {% assign summary = site.summaries | where: "name",project.name | first %} {% endfor %}