diff --git a/Gemfile b/Gemfile index 382ad4c..41efa5d 100644 --- a/Gemfile +++ b/Gemfile @@ -14,6 +14,7 @@ group :jekyll_plugins do gem 'jekyll-plantuml', '~> 1.4', '>= 1.4.2' gem 'jekyll-node-module', '~> 0.1.3' gem 'jekyll_picture_tag', '~> 2.1' + gem 'jekyll-inline-svg', '~> 1.1', '>= 1.1.5' end # Tests diff --git a/Gemfile.lock b/Gemfile.lock index 7305163..beb1f45 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,6 +47,9 @@ GEM safe_yaml (~> 1.0) terminal-table (>= 1.8, < 4.0) webrick (~> 1.7) + jekyll-inline-svg (1.1.5) + jekyll (>= 3.3, < 5.0) + svg_optimizer (~> 0.3.0) jekyll-node-module (0.1.3) jekyll (>= 2.0, < 5.0) jekyll-plantuml (1.4.2) @@ -121,6 +124,8 @@ GEM safe_yaml (1.0.5) sass-embedded (1.78.0-x86_64-linux-gnu) google-protobuf (~> 4.27) + svg_optimizer (0.3.0) + nokogiri temple (0.10.3) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -134,6 +139,7 @@ PLATFORMS DEPENDENCIES jekyll (~> 4.3, >= 4.3.3) + jekyll-inline-svg (~> 1.1, >= 1.1.5) jekyll-node-module (~> 0.1.3) jekyll-plantuml (~> 1.4, >= 1.4.2) jekyll-postcss (~> 0.5.0) diff --git a/_config.yml b/_config.yml index 4b1f3b3..0e4f758 100644 --- a/_config.yml +++ b/_config.yml @@ -16,6 +16,10 @@ plugins: - jekyll-plantuml - jekyll-postcss - jekyll-node-module + - jekyll-inline-svg + +svg: + optimize: true node_modules: copy: diff --git a/_data/i18n.yml b/_data/i18n.yml index a46b96f..9062192 100644 --- a/_data/i18n.yml +++ b/_data/i18n.yml @@ -23,6 +23,10 @@ home: en: New projects ru: Новые проекты tt: Яңа проектлар + subscribe-posts: + en: Subscribe to the posts feed! + ru: Подпишись на ленту постов! + tt: Язма каналына языл! about: links-and-contacts: diff --git a/_includes/post_card.html b/_includes/post_card.html index 3b15b95..ecd9aaf 100644 --- a/_includes/post_card.html +++ b/_includes/post_card.html @@ -3,7 +3,7 @@ {{ include.post.title | escape }} diff --git a/_layouts/bare.html b/_layouts/bare.html index 779f64e..23e1c4d 100644 --- a/_layouts/bare.html +++ b/_layouts/bare.html @@ -19,6 +19,11 @@ {% endfor %} + {% assign feed_posts_multilang = site.pages | where: "ref", "feed-posts-multilang" | first %} + {% assign feed_posts = site.pages | where: "ref", "feed-posts" | where: "lang", page.lang | first %} + + + {% seo %} diff --git a/_layouts/blog_home.html b/_layouts/blog_home.html index 7bd8802..cb7e92a 100644 --- a/_layouts/blog_home.html +++ b/_layouts/blog_home.html @@ -4,7 +4,12 @@

{{ site.data.i18n.blog.posts[page.lang] }}

-
+{% assign feed_posts = site.pages | where: "ref", "feed-posts" | where: "lang", page.lang | first %} + + {% svg feed-icon.svg class="inline h-4 w-4"%} + {{ site.data.i18n.home.subscribe-posts | t }} + + {% include posts.html limit=nil hlevel=2 %} diff --git a/_layouts/feed.html b/_layouts/feed.html new file mode 100644 index 0000000..8c65514 --- /dev/null +++ b/_layouts/feed.html @@ -0,0 +1,40 @@ +--- +layout: none +--- + + + + Jekyll + {{ page.title | xml_escape }} | {{ site.title }} + + + {{ page.url | absolute_url | xml_escape }} + {{ site.time | date_to_xmlschema}} + + {% assign posts = site.posts | sort: "date" | reverse %} + {% if page.lang %} + {% assign posts = posts | where: "lang", page.lang %} + {% endif %} + {% for post in posts limit: 10 %} + + {% assign post_title = post.title | strip_html | normalize_whitespace | xml_escape %} + {{ post_title }} + + {{ post.date | date_to_xmlschema }} + {% assign post_updated = post.last_modified_at | default: post.date %} + {{ post_updated | date_to_xmlschema }} + {{ post.id | absolute_url | xml_escape }} + + + + + + + + + {{ post.author.name }} + {{ post.author.url | xml_escape }} + + + {% endfor %} + diff --git a/_layouts/home.html b/_layouts/home.html index 7403e5c..d86545a 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -47,6 +47,12 @@

{{ site.data.i18n.home.all-posts[page.lang] }} + + {% assign feed_posts = site.pages | where: "ref", "feed-posts" | where: "lang", page.lang | first %} + + {% svg feed-icon.svg class="inline h-4 w-4"%} + {{ site.data.i18n.home.subscribe-posts | t }} +
diff --git a/assets/css/main.css b/assets/css/main.css index 502916f..bbe8745 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -19,7 +19,6 @@ object.plantuml { .vlink { @apply visited:text-[revert]; @apply underline; - @apply hover:underline; @apply text-clink; } } diff --git a/feed-icon.svg b/feed-icon.svg new file mode 100755 index 0000000..b325149 --- /dev/null +++ b/feed-icon.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/feed-multilang.xml b/feed-multilang.xml new file mode 100644 index 0000000..83b686b --- /dev/null +++ b/feed-multilang.xml @@ -0,0 +1,7 @@ +--- +layout: feed +include_in_sitemap: false +title: Posts in all languages +lang: false +ref: feed-posts-multilang +--- diff --git a/feed.xml b/feed.xml new file mode 100644 index 0000000..8e54170 --- /dev/null +++ b/feed.xml @@ -0,0 +1,6 @@ +--- +layout: feed +include_in_sitemap: false +title: Posts in English +ref: feed-posts +--- diff --git a/ru/feed.xml b/ru/feed.xml new file mode 100644 index 0000000..5318273 --- /dev/null +++ b/ru/feed.xml @@ -0,0 +1,6 @@ +--- +layout: feed +include_in_sitemap: false +title: Посты на русском +ref: feed-posts +--- diff --git a/tt/feed.xml b/tt/feed.xml new file mode 100644 index 0000000..b1847fa --- /dev/null +++ b/tt/feed.xml @@ -0,0 +1,6 @@ +--- +layout: feed +include_in_sitemap: false +title: Татарча язмалар +ref: feed-posts +---