Skip to content

Commit

Permalink
fix(shokunin): updating tags feature
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Sep 3, 2023
1 parent 590cadd commit 92d0cf3
Show file tree
Hide file tree
Showing 21 changed files with 520 additions and 223 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clap = "4.4.2"
comrak = "0.18.0"
minify-html = "0.11.1"
quick-xml = "0.30.0"
regex = "1.9.4"
regex = "1.9.5"
reqwest = { version = "0.11.20", features = ["blocking", "json"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.105"
Expand Down
15 changes: 2 additions & 13 deletions benches/bench_json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extern crate criterion;
use std::path::Path;

use criterion::{black_box, Criterion};
use ssg::data::{ManifestData, TxtData, CnameData, HumansData, SiteMapData, TagsData};
use ssg::json::{manifest, txt, cname, human, tags, sitemap};
use ssg::data::{ManifestData, TxtData, CnameData, HumansData, SiteMapData};
use ssg::json::{manifest, txt, cname, human, sitemap};

pub fn bench_json(c: &mut Criterion) {
let manifest_data = ManifestData {
Expand Down Expand Up @@ -49,13 +49,6 @@ pub fn bench_json(c: &mut Criterion) {
lastmod: String::from("2022-01-01"),
};

let tags_data = TagsData {
titles: String::from("Test Titles"),
descriptions: String::from("Test Descriptions"),
permalinks: String::from("Test Permalinks"),
keywords: String::from("Test Keywords"),
};

let dir = Path::new("./");

c.bench_function("manifest", |b| {
Expand All @@ -72,10 +65,6 @@ pub fn bench_json(c: &mut Criterion) {
b.iter(|| human(black_box(&humans_data)))
});

c.bench_function("tags_data", |b| {
b.iter(|| tags(black_box(&tags_data)))
});

c.bench_function("sitemap", |b| {
b.iter(|| sitemap(black_box(sitemap_data.clone()), black_box(dir)))
});
Expand Down
2 changes: 2 additions & 0 deletions content/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro"
charset: "utf-8"
cname: "kaishi.one"
copyright: "© 2023 Kaishi. All rights reserved."
date: "July 12, 2023"
description: "The page may have been removed or renamed. Please visit our homepage for more information."
download: ""
format-detection: "telephone=no"
Expand Down Expand Up @@ -38,6 +39,7 @@ robots: "index, follow"
short_name: "404"
subtitle: "Sorry we can't find that page."
theme_color: "rgb(143, 250, 111)"
tags: "404, page not found, not available"
title: "404"
url: "https://kaishi.one/404/"
viewport: "width=device-width, initial-scale=1, shrink-to-fit=no"
Expand Down
2 changes: 2 additions & 0 deletions content/contact.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "2023-07-12" ## The date of the page.
description: "You can contact us using the contact form below." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand Down Expand Up @@ -38,6 +39,7 @@ revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "How can we help you today?" ## The subtitle of the page. (max 64 characters)
tags: "contact us, contact form, get in touch, contact page, contact information, customer service, support, feedback, questions, inquiries, help" ## The tags of the site. (max 160 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Contact Us" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
Expand Down
2 changes: 2 additions & 0 deletions content/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Everything You Need to Build a Stunning Website." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand All @@ -37,6 +38,7 @@ revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
tags: "kaishi starter templates, shokunin static site generator, static site generator, starter templates, bootstrap, bootstrap css, bootstrap javascript, content security policy, open graph meta tags, responsive navigation bar, schema.org meta tags" ## The tags of the site. (max 160 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Features" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
Expand Down
2 changes: 2 additions & 0 deletions content/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Make beautiful websites with Kaishi, a Shokunin Static Site Generator starter template." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand Down Expand Up @@ -38,6 +39,7 @@ robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
tags: "kaishi, shokunin static site generator, static site generator, minimalist website template, modern website template, responsive website template, website starter template, freelance creative, startup founder, small business owner, online presence" ## The tags of the site. (comma separated, max 10 tags)
title: "Kaishi, a Shokunin Static Site Generator Starter Template" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewport of the site.
Expand Down
2 changes: 2 additions & 0 deletions content/offline.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Make beautiful websites with Kaishi, a Shokunin Static Site Generator starter template." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand All @@ -37,6 +38,7 @@ revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
tags: "offline, starter, templates, static, site, generator, rust, shokunin, kaishi" ## The tags of the site. (comma separated, max 10 tags)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Kaishi, a Shokunin Static Site Generator Starter Template" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
Expand Down
2 changes: 2 additions & 0 deletions content/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Make beautiful websites with Kaishi, a Shokunin Static Site Generator starter template." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand All @@ -37,6 +38,7 @@ revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
tags: "privacy policy, kaishi, shokunin static site generator, static site generator, user data, google analytics, microsoft clarity, tracking tools, personal information, rights, changes" ## The tags of the site. (max 160 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Kaishi, a Shokunin Static Site Generator Starter Template" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
Expand Down
108 changes: 108 additions & 0 deletions content/tags.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
---

# Front Matter (YAML)

author: "Jane Doe" ## The author of the page. (max 64 characters)
banner_alt: "MacBook Pro on white surface" ## The banner alt of the site.
banner_height: "398" ## The banner height of the site.
banner_width: "1440" ## The banner width of the site.
banner: "https://kura.pro/unsplash/images/banners/sean-stratton-ObpCE_X3j6U-unsplash.jpg" ## The banner of the site.
cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Delve deeper into the Kaishi website by exploring topics and tags, and get to the subjects that matter most to you." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
hreflang: "en" ## The hreflang of the site. (default: en-gb)
icon: "https://kura.pro/kaishi/images/logos/kaishi.svg" ## The icon of the site in SVG format.
id: "https://kaishi.one" ## The id of the site.
image_alt: "Logo of Kaishi, a starter template for static sites" ## The image alt of the site.
image_height: "630" ## The image height of the site.
image_width: "1200" ## The image width of the site.
image: "https://kura.pro/kaishi/images/banners/banner-kaishi.webp" ## The main image of the site in SVG format.
keywords: "terms of use, intellectual property" ## The keywords of the site. (max 160 characters)
language: "en-GB" ## The language of the site. (default: en-GB)
layout: "page" ## The layout of the site.
locale: "en_GB" ## The locale of the site.
logo_alt: "Logo of Kaishi, a starter template for static sites" ## The logo alt of the site.
logo_height: "33" ## The logo height of the site.
logo_width: "100" ## The logo width of the site.
logo: "https://kura.pro/kaishi/images/banners/banner-kaishi.webp" ## The logo of the site in SVG format.
name: "Kaishi" ## The name of the website. (max 64 characters)
permalink: "https://kaishi.one/terms" ## The url of the site.
rating: "general" ## The rating of the site.
referrer: "no-referrer" ## The referrer of the site.
revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
tags: "terms of use, kaishi, shokunin static site generator, static site generator, intellectual property, linked sites, liability, privacy, governing law, changes, contact us" ## The tags of the site. (max 160 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Explore by tag" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewport of the site.

# RSS - The RSS feed front matter (YAML).
atom_link: https://kaishi.one/rss.xml
category: "Technology"
docs: https://validator.w3.org/feed/docs/rss2.html
generator: "Shokunin 🦀 (version 0.0.16)"
item_description: RSS feed for the site
item_guid: https://kaishi.one/rss.xml
item_link: https://kaishi.one/rss.xml
item_pub_date: "Thu, 12 Jul 2023 15:15:15 GMT"
item_title: "Tags"
last_build_date: "Thu, 12 Jul 2023 15:15:15 GMT"
managing_editor: [email protected]
pub_date: "Thu, 12 Jul 2023 15:15:15 GMT"
ttl: "60"
type: "website"
webmaster: [email protected]

# Apple - The Apple front matter (YAML).
apple_mobile_web_app_orientations: "portrait" ## The Apple mobile web app orientations of the page.
apple_touch_icon_sizes: "192x192" ## The Apple touch icon sizes of the page.
apple-mobile-web-app-capable: "yes" ## The Apple mobile web app capable of the page.
apple-mobile-web-app-status-bar-inset: "black" ## The Apple mobile web app status bar inset of the page.
apple-mobile-web-app-status-bar-style: "black-translucent" ## The Apple mobile web app status bar style of the page.
apple-mobile-web-app-title: "Kaishi" ## The Apple mobile web app title of the page.
apple-touch-fullscreen: "yes" ## The Apple touch fullscreen of the page.

# MS Application - The MS Application front matter (YAML).

msapplication-navbutton-color: "rgb(143, 250, 111)"

# Twitter Card - The Twitter Card front matter (YAML).

## twitter_card - The Twitter Card type of the page.
twitter_card: "summary"
## twitter_creator - The Twitter Card creator of the page.
twitter_creator: "janedoe"
## twitter_description - The Twitter Card description of the page.
twitter_description: "Delve deeper into the Kaishi website by exploring topics and tags, and get to the subjects that matter most to you."
## twitter_image - The Twitter Card image of the page.
twitter_image: "https://kura.pro/kaishi/images/logos/kaishi.svg"
## twitter_image:alt - The Twitter Card image alt of the page.
twitter_image_alt: "Logo of Kaishi, a starter template for static sites"
## twitter_site - The Twitter Card site of the page.
twitter_site: "janedoe"
## twitter_title - The Twitter Card title of the page.
twitter_title: "Kaishi, a Shokunin Static Site Generator Starter Template"
## twitter_url - The Twitter Card url of the page.
twitter_url: "https://kaishi.one"

# Humans.txt - The Humans.txt front matter (YAML).
author_website: "https://kura.pro" ## The author website of the page.
author_twitter: "@wwdseb" ## The author twitter of the page.
author_location: "London, UK" ## The author location of the page.
thanks: "Thanks for reading!" ## The thanks of the page.
site_last_updated: "2023-07-05" ## The last updated of the site.
site_standards: "HTML5, CSS3, RSS, Atom, JSON, XML, YAML, Markdown, TOML" ## The standards of the site.
site_components: "Kaishi, Kaishi Builder, Kaishi CLI, Kaishi Templates, Kaishi Themes" ## The components of the site.
site_software: "Shokunin, Rust" ## The software of the site.

---

[[content]]
6 changes: 4 additions & 2 deletions content/terms.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ cdn: "https://kura.pro" ## The CDN of the site.
charset: "utf-8" ## The charset of the site. (default: utf-8)
cname: "kaishi.one" ## The cname value of the site. (Only required for the index page.)
copyright: "© 2023 Kaishi. All rights reserved." ## The copyright of the site.
date: "July 12, 2023"
description: "Make beautiful websites with Kaishi, a Shokunin Static Site Generator starter template." ## The description of the site. (max 160 characters)
download: "" ## The download url for the product.
format-detection: "telephone=no" ## The format detection of the site.
Expand All @@ -21,7 +22,7 @@ image_alt: "Logo of Kaishi, a starter template for static sites" ## The image al
image_height: "630" ## The image height of the site.
image_width: "1200" ## The image width of the site.
image: "https://kura.pro/kaishi/images/banners/banner-kaishi.webp" ## The main image of the site in SVG format.
keywords: "terms of use, kaishi, shokunin static site generator, static site generator, intellectual property, linked sites, liability, privacy, governing law, changes, contact us" ## The keywords of the site. (max 160 characters)
keywords: "terms of use, intellectual property" ## The keywords of the site. (max 160 characters)
language: "en-GB" ## The language of the site. (default: en-GB)
layout: "page" ## The layout of the site.
locale: "en_GB" ## The locale of the site.
Expand All @@ -37,8 +38,9 @@ revisit-after: "7 days" ## The revisit after of the site.
robots: "index, follow" ## The robots of the site.
short_name: "kaishi" ## The short name of the site. (max 12 characters)
subtitle: "Build Amazing Websites with Minimal Effort using Kaishi Starter Templates" ## The subtitle of the page. (max 64 characters)
tags: "terms of use, kaishi, shokunin static site generator, static site generator, intellectual property, linked sites, liability, privacy, governing law, changes, contact us" ## The tags of the site. (max 160 characters)
theme_color: "rgb(143, 250, 111)" ## The theme color of the site.
title: "Kaishi, a Shokunin Static Site Generator Starter Template" ## The title of the page. (max 64 characters)
title: "Terms of Use" ## The title of the page. (max 64 characters)
url: "https://kaishi.one" ## The url of the site.
viewport: "width=device-width, initial-scale=1, shrink-to-fit=no" ## The viewport of the site.

Expand Down
Loading

0 comments on commit 92d0cf3

Please sign in to comment.