From c96d9659b2cf1315a9730de427c79aafabe96b8b Mon Sep 17 00:00:00 2001 From: Kwangjin Lee <k.lee-5@student.tudelft.nl> Date: Fri, 23 Aug 2024 11:07:22 +0200 Subject: [PATCH] created two separate config for jekyll --- .gitlab-ci.yml | 7 +++- _config.yml | 2 +- _config_draft.yml | 102 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 2 deletions(-) create mode 100644 _config_draft.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8e85e76..3e08eb5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,7 +18,12 @@ before_script: build-page: stage: build script: - - JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public + - | + if [[ "$CI_COMMIT_BRANCH" == "main" ]]; then + JEKYLL_ENV=production bundle exec jekyll build --config _config_draft.yml --destination public + if [[ "$CI_COMMIT_BRANCH" == "publish" ]]; then + JEKYLL_ENV=production bundle exec jekyll build --config _config.yml --destination public + fi - echo "Listing contents of public directory:" - ls -laR public artifacts: diff --git a/_config.yml b/_config.yml index 1162361..13c2846 100644 --- a/_config.yml +++ b/_config.yml @@ -17,7 +17,7 @@ title: MUDE 2024 website tagline: CEGM1000 Modelling, Uncertainty, and Data Analysis for Engineers description: Course website for TU Delft CEGM1000, or Modelling, Uncertainty, and Data Analysis for Engineers author: By MUDE Teachers and the Student Army -baseurl: /2024/draft # the subpath of your site, e.g. /blog +baseurl: /2024 # the subpath of your site, e.g. /blog url: https://mude.citg.tudelft.nl # the base hostname & protocol for your site, e.g. http://example.com exclude: [ diff --git a/_config_draft.yml b/_config_draft.yml new file mode 100644 index 0000000..1162361 --- /dev/null +++ b/_config_draft.yml @@ -0,0 +1,102 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole site, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing these this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'jekyll serve'. If you change this file, please restart the server process. + +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.github_repo }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. +title: MUDE 2024 website +tagline: CEGM1000 Modelling, Uncertainty, and Data Analysis for Engineers +description: Course website for TU Delft CEGM1000, or Modelling, Uncertainty, and Data Analysis for Engineers +author: By MUDE Teachers and the Student Army +baseurl: /2024/draft # the subpath of your site, e.g. /blog +url: https://mude.citg.tudelft.nl # the base hostname & protocol for your site, e.g. http://example.com +exclude: + [ + "Gemfile", + "Gemfile.lock", + "LICENSE", + vendor, + "README.md", + "build-local.sh", + files, + "build-page.sh", + "_config.yml.bak", + ] +logo: "/assets/logo/MUDE Logo.png" + +# Theme settings +theme: just-the-docs +color_scheme: wider +search_enabled: true +heading_anchors: true +permalink: pretty +aux_links: + Brightspace: + - "https://brightspace.tudelft.nl/d2l/home/680254" + Answers: + - "https://answers.citg.tudelft.nl" + Files: + - "https://mude.citg.tudelft.nl/2024/files" + Textbook: + - "https://mude.citg.tudelft.nl/2024/book" + Home: + - "https://mude.citg.tudelft.nl" +aux_links_new_tab: true +footer_content: 'The MUDE Team © 2024 <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>' + +# Collections for website data +collections: + staffers: + modules: + schedules: + announcements: + questions: +# Default layouts for each collection type +defaults: + - scope: + path: "" + type: staffers + values: + layout: staffer + height: 300 + subpath: "/assets/images/" + width: 300 + - scope: + path: "" + type: modules + values: + layout: module + - scope: + path: "" + type: schedules + values: + layout: schedule + - scope: + path: "" + type: announcements + values: + layout: announcement + - scope: + path: "" + type: questions + values: + layout: question + +compress_html: + clippings: all + comments: all + endings: all + startings: [] + blanklines: false + profile: false + +draft_banner: "This is the DRAFT version of the MUDE 2024 website. Content may change frequently." -- GitLab