Skip to content
Snippets Groups Projects
Commit 77404055 authored by Laurent Heirendt's avatar Laurent Heirendt :airplane:
Browse files

Merge branch 'develop' into 'master'

[release] Regular merge of develop

See merge request R3/howto-cards!488
parents b12d81e1 a1fcbc3e
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,7 @@ stages:
variables:
GIT_STRATEGY: clone
GIT_DEPTH: 0
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
GIT_SUBMODULE_STRATEGY: recursive
......@@ -108,6 +109,7 @@ build:pages:
- |
echo "Configuration: " && cat ".ci/_config_$CI_COMMIT_REF_NAME.yml"
# Run Jekyll with custom configuration
- LOGFILE=/dev/stdout ./add-timestamp-to-howtocard.sh external
- bundle exec jekyll build -d build --config "_config.yml,.ci/_config_$CI_COMMIT_REF_NAME.yml"
# check
......
......@@ -12,7 +12,7 @@ gem "jekyll", "~> 4.0"
gem "bundler", "> 2.0"
gem "minima", "~> 2.5"
gem 'jekyll-theme-lcsb-default', '~> 0.4.21'
gem 'jekyll-theme-lcsb-default', '~> 0.5.0'
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
......
......@@ -10,6 +10,10 @@
{% comment %}This is used to generate share URL for howto-pages{% endcomment %}
<div class="footer-text-container">
{% if page.timestamp %}
<p>Last page modification: {{ page.timestamp }}</p>
{% endif %}
{% if page.shortcut %}
<p>
Share this page:
......@@ -44,4 +48,4 @@
</footer>
{% if site.siteID > 0 %}
{%- include gdpr-banner.html -%}
{% endif %}
\ No newline at end of file
{% endif %}
#!/bin/sh
# change this with environment
DEFAULT_NOT_SOURCE_REGEX="/\\/assets\\//"
NOT_SOURCE_REGEX="${NOT_SOURCE_REGEX:-$DEFAULT_NOT_SOURCE_REGEX}"
TIMESTAMP_SUFFIX="${SUFFIX:-.timestamp}"
LOGFILE="${LOGFILE:-/dev/null}"
[ -z "$1" ] && echo "$0: no inputs specified?" >/dev/stderr
while [ -n "$1" ]
do
echo "sourcing directory '$1' ..." >> "$LOGFILE"
find "$1" -type f -name '*.md' | grep -v "$NOT_SOURCE_REGEX" | while read file ; do
fn=`basename "$file"`
dir=`dirname "$file"`
tsfn="$fn.timestamp"
(
echo "making timestamp in '$dir' for file '$fn' ..." >> "$LOGFILE"
cd "$dir"
if [ -f "$tsfn" ]
then echo "... but it already exists; skipping!" >> "$LOGFILE"
else
TIMESTAMP=`git log -n 1 --pretty=format:%cs -- "$fn"`
mv "$fn" "$fn.temporary"
head -n1 "$fn.temporary" > "$fn"
echo "timestamp: \"$TIMESTAMP\"" >> "$fn"
tail -n+2 "$fn.temporary" >> "$fn"
rm -f "$fn.temporary"
fi
)
done
shift
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment