From ab113b6cb9fca8706d3072bb5ca3ee6eb2fef702 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Sun, 15 Oct 2023 00:33:30 +0900 Subject: [PATCH] Extract rails versions menu and cache it for the faster build --- src/_includes/rails-versions.html | 9 +++++++++ src/_layouts/default.html | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 src/_includes/rails-versions.html diff --git a/src/_includes/rails-versions.html b/src/_includes/rails-versions.html new file mode 100644 index 0000000000..b621794d2c --- /dev/null +++ b/src/_includes/rails-versions.html @@ -0,0 +1,9 @@ +{% for rails_version in site.rails_versions %} + {% assign version = rails_version[0] %} + {% assign detail = rails_version[1] %} + {% if detail.latest %} + v{{ version }} + {% else %} + v{{ version }} + {% endif %} +{% endfor %} diff --git a/src/_layouts/default.html b/src/_layouts/default.html index 2540722085..90ceef6ec1 100644 --- a/src/_layouts/default.html +++ b/src/_layouts/default.html @@ -38,15 +38,7 @@ v{{ page.version }}