From 5bc43c517bae04d4afd36e809210457411a7eff5 Mon Sep 17 00:00:00 2001 From: Crola1702 Date: Fri, 16 Aug 2024 12:15:32 -0500 Subject: [PATCH] Make index layouts actual html content. And remove preprocessor Signed-off-by: Crola1702 --- Rules | 39 ++----------------- .../documentation/index.html.erb | 2 +- content/documentations.md | 11 ------ .../projects/index.html.erb | 2 +- .../repos.erb => content/repos/index.html.erb | 0 .../team.erb => content/team/index.html.erb | 2 +- layouts/index.erb | 2 +- 7 files changed, 7 insertions(+), 51 deletions(-) rename layouts/documentation.erb => content/documentation/index.html.erb (79%) delete mode 100644 content/documentations.md rename layouts/projects-all.erb => content/projects/index.html.erb (89%) rename layouts/repos.erb => content/repos/index.html.erb (100%) rename layouts/team.erb => content/team/index.html.erb (92%) diff --git a/Rules b/Rules index 494cc01..98ffbfe 100644 --- a/Rules +++ b/Rules @@ -1,20 +1,5 @@ #!/usr/bin/env ruby -preprocess do - projects = @items.find_all '/projects/*.md' - members = @items.find_all '/team/*.md' - - # Add index extra data - index = @items['/index.md'] - index[:projects] = projects - index[:members] = members - - @items.create('', { projects: projects }, '/projects/index.html') - @items.create('', { members: members }, '/team/index.html') - @items.create('', { projects: projects }, '/documentation/index.html') - @items.create('', {}, '/repos/index.html') -end - # Individual pages compile '/projects/*.md' do filter :kramdown @@ -36,28 +21,10 @@ compile '/repos/*.md' do end # Index pages -compile '/projects/index.html' do - layout '/projects-all.erb' - layout '/default.erb' - write item.identifier -end - -compile '/team/index.html' do - layout '/team.erb' - layout '/default.erb' - write item.identifier -end - -compile '/documentation/index.html' do - layout '/documentation.erb' - layout '/default.erb' - write item.identifier -end - -compile '/repos/index.html' do - layout '/repos.erb' +compile '/**/index.html.erb' do + filter :erb layout '/default.erb' - write item.identifier + write item.identifier.without_ext end compile '/index.md' do diff --git a/layouts/documentation.erb b/content/documentation/index.html.erb similarity index 79% rename from layouts/documentation.erb rename to content/documentation/index.html.erb index 2cb8dc1..7f13766 100644 --- a/layouts/documentation.erb +++ b/content/documentation/index.html.erb @@ -2,7 +2,7 @@

Check the documentation

diff --git a/content/documentations.md b/content/documentations.md deleted file mode 100644 index ba382c9..0000000 --- a/content/documentations.md +++ /dev/null @@ -1,11 +0,0 @@ -# Documentation - -Here you can check the documentation of our projects: - -## Bloom - -Bloom is a release automation tool, designed to make generating platform specific release artifacts from source projects easier. - -Documentation: [Bloom Documentation](https://bloom.readthedocs.io/) - - diff --git a/layouts/projects-all.erb b/content/projects/index.html.erb similarity index 89% rename from layouts/projects-all.erb rename to content/projects/index.html.erb index 131473e..0a80f01 100644 --- a/layouts/projects-all.erb +++ b/content/projects/index.html.erb @@ -1,6 +1,6 @@