diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:43:13 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-07-01 21:48:28 +0200 |
| commit | 95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4 (patch) | |
| tree | 0f6dc99d031a499befbbcbb301b7fd1a62af125b /app/helpers | |
| parent | 28399cd9a549cc4edf8c557883c940532821c28d (diff) | |
| download | operum-95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4.tar.gz operum-95e5fe8b8fb1e16c71ffbed6681ab8b2203249d4.zip | |
Add subtitles to pages
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/layout_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
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 <title> HTML tag. + def page_title + title = ENV.fetch('OPERUM_BASE_TITLE', 'Operum') + + if @subtitle + "#{@subtitle} - #{title}" + else + title + end + end +end |
