From e67df88baad0cabfc6a5949b93f14db710a3e41c Mon Sep 17 00:00:00 2001 From: Ireneusz Szulc Date: Thu, 22 Dec 2022 10:57:12 +0100 Subject: [PATCH] Add option to set custom site title --- README.md | 6 ++++-- sample/content/posts/{http-codes.md => codes-overview.md} | 0 sample/fatman.yaml | 3 +++ src/fatman-2.Dockerfile | 4 ++++ src/hugo_site/config.toml | 2 +- 5 files changed, 12 insertions(+), 3 deletions(-) rename sample/content/posts/{http-codes.md => codes-overview.md} (100%) diff --git a/README.md b/README.md index dd87ea0..b48dcab 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,9 @@ It's a language wrapper converting your code compatible with HUGO standards to a by uploading the zipped plugin file. ## Usage -You can deploy sample Go job by running: +You can deploy sample HUGO job by running: ```bash -racetrack deploy sample-hugo-page +racetrack deploy sample ``` + +See the [example](./sample). diff --git a/sample/content/posts/http-codes.md b/sample/content/posts/codes-overview.md similarity index 100% rename from sample/content/posts/http-codes.md rename to sample/content/posts/codes-overview.md diff --git a/sample/fatman.yaml b/sample/fatman.yaml index f89d735..47fc2cd 100644 --- a/sample/fatman.yaml +++ b/sample/fatman.yaml @@ -5,3 +5,6 @@ lang: hugo:latest git: remote: https://github.com/TheRacetrack/plugin-hugo-job-type directory: sample-hugo-site + +wrapper_properties: + site_title: 'Hub of the Internet' diff --git a/src/fatman-2.Dockerfile b/src/fatman-2.Dockerfile index 74aa7ee..1670088 100644 --- a/src/fatman-2.Dockerfile +++ b/src/fatman-2.Dockerfile @@ -1,4 +1,8 @@ FROM {{ base_image }} +{% if manifest.wrapper_properties and manifest.wrapper_properties['site_title'] %} +RUN sed -i '/title =/s/= .*/= "{{ manifest.wrapper_properties['site_title'] }}"/' /src/hugo_site/config.toml +{% endif %} + COPY . /src/hugo_site/ RUN chmod -R a+rw /src/hugo_site/ diff --git a/src/hugo_site/config.toml b/src/hugo_site/config.toml index b46c5b5..f48e258 100644 --- a/src/hugo_site/config.toml +++ b/src/hugo_site/config.toml @@ -1,5 +1,5 @@ baseURL = '/' languageCode = 'en-us' -title = 'My New Hugo Site' +title = 'Hugo Site' theme = "ananke" relativeURLs = true