From 95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 1 Jul 2025 21:43:13 +0200 Subject: Add subtitles to pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miquel Sabaté Solà --- app/helpers/layout_helper.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 app/helpers/layout_helper.rb (limited to 'app/helpers/layout_helper.rb') diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb new file mode 100644 index 0000000..03917d5 --- /dev/null +++ b/app/helpers/layout_helper.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module LayoutHelper + # Returns a strign containing the string to be used for the HTML tag. + def page_title + title = ENV.fetch('OPERUM_BASE_TITLE', 'Operum') + + if @subtitle + "#{@subtitle} - #{title}" + else + title + end + end +end -- cgit v1.2.3