diff --git a/.gitignore b/.gitignore index fcfdd9b7238cb767a36a59950deff864a9cf3773..79f4ed341d7248defeb2130d0f3eb10c9ebb6650 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,15 @@ -*.gem -.bundle +# IDE-generated files +.idea/* + +# Jekyll's files .sass-cache _site + +# Ruby related files +.bundle +*.gem Gemfile.lock -.DS_Store \ No newline at end of file + +# OS-related files +.DS_Store +test/* diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d26fd066fff2d2883acebc4e4e4d89a2d93ca3f..4736ee6b1ad8062beeb772583008e930b01c1e82 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,7 @@ stages: before_script: - bundle install +# This will test whether the webpage builds test: stage: test script: @@ -21,6 +22,7 @@ test: except: - master +# This will actually deploy the webpage when pushing to master pages: stage: deploy script: @@ -31,6 +33,7 @@ pages: only: - master +# This will push the gem to ruby-gems when tagged release: stage: release script: diff --git a/_config.yml b/_config.yml index acb03e0867b8273874e9ade2f193c6d4411c3a0e..046f058b289f5de5374e08d7dbcdc95e2c9525c0 100644 --- a/_config.yml +++ b/_config.yml @@ -47,6 +47,15 @@ pagination: before: 2 after: 2 +# Use this setting in your repository +# which part of the URL would you like to use to generate sharing link +# (see _includes/footer.html) +include_link_index: 2 + +# Use this setting in your repository +# Which URL would you like to use to display as share URL +share_url: https://howto.lcsb.uni.lu/? + # Exclude from processing. # The following items will not be processed, by default. Create a custom list # to override the default setting. @@ -68,4 +77,4 @@ kramdown: hard_wrap: false footnote_nr: 1 show_warnings: true - # parse_block_html: true \ No newline at end of file + # parse_block_html: true diff --git a/_includes/footer.html b/_includes/footer.html index 1d673532fe0095c59be3cf042e93dbe115117bb9..678c686e1b02385256407ae604e671065a883d06 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -1,4 +1,3 @@ -<footer class="site-footer h-card"> <footer class="site-footer h-card"> <div class="wrapper footer-wrapper"> <data class="u-url" href="{{ "/" | relative_url }}"></data> @@ -10,14 +9,24 @@ type="image/svg+xml" /> </div> - <p> - - © <a href="https://wwwen.uni.lu/" target="_parent">Université du Luxembourg </a>{{ 'now' | date: "%Y" }}. All rights reserved. + {% comment %}This is used to generate share URL for howto-pages{% endcomment %} + {% if page.include_link %} + <p class="site-footer-share">Share this page: + <a href="{{ site.share_url }}{{ page.url }}"> + {% assign parts = page.url | absolute_url | replace: ".html", "" | replace: "http://", "" | replace: "https://", "" | split: "/" %} + {{ site.share_url }}{{ parts[site.include_link_index] }} + </a> + </p> + {% endif %} - {%- include social.html -%} + <p> + © <a href="https://wwwen.uni.lu/" target="_parent"> + <strong>Université du Luxembourg</strong>, + </a> + {{ 'now' | date: "%Y" }}. All rights reserved. + {%- include social.html -%} </p> </div> </div> -</div> </footer> diff --git a/_sass/minima/_layout.scss b/_sass/minima/_layout.scss index b5b27389d7cea99aa64c1787eda8bbaf7f482069..9457eda93d1dc7eef684c9def595e368b7732869 100644 --- a/_sass/minima/_layout.scss +++ b/_sass/minima/_layout.scss @@ -295,6 +295,10 @@ html { } } +.site-footer-share { + margin-bottom: 4px; +} + /** @@ -394,4 +398,4 @@ html { .center-image { margin: 0 auto; display: block; -} \ No newline at end of file +} diff --git a/jekyll-theme-lcsb-default.gemspec b/jekyll-theme-lcsb-default.gemspec index 12a803593972b06c1ca94617064f7c1cbd6779af..4f6eca2ee310ec5e9a019c3ada9cbac2b6d87b21 100644 --- a/jekyll-theme-lcsb-default.gemspec +++ b/jekyll-theme-lcsb-default.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-lcsb-default" - spec.version = "0.2.21" + spec.version = "0.2.22" spec.authors = ["Trefex", "jaceklebioda_lux"] spec.email = ["lcsb-sysadmins@uni.lu"] @@ -18,5 +18,3 @@ Gem::Specification.new do |spec| spec.add_development_dependency "bundler", ">= 1.16.1" spec.add_development_dependency "rake", "~> 12.3" end - -