From 1bf3dbd5a2519b312c4eea750d88cca1e6ccde86 Mon Sep 17 00:00:00 2001 From: Wonderfall Date: Sat, 16 Apr 2016 09:49:12 +0200 Subject: [PATCH] ghost: add disqus --- ghost/Dockerfile | 5 ++++- ghost/disqus.conf | 15 +++++++++++++++ ghost/run.sh | 6 ++++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 ghost/disqus.conf diff --git a/ghost/Dockerfile b/ghost/Dockerfile index 00adce0..b8393b9 100644 --- a/ghost/Dockerfile +++ b/ghost/Dockerfile @@ -18,7 +18,9 @@ ENV GHOST_NODE_VERSION_CHECK=false \ ENABLE_ISSO=False \ ISSO_HOST=isso.domain.tld \ ISSO_AVATAR=false \ - ISSO_VOTE=false + ISSO_VOTE=false \ + ENABLE_DISQUS=False \ + DISQUS_SHORTNAME=shortname VOLUME /ghost/content @@ -44,6 +46,7 @@ RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/re COPY run.sh /usr/local/bin/run.sh COPY smtp.conf /usr/local/etc/smtp.conf COPY isso.conf /usr/local/etc/isso.conf +COPY disqus.conf /usr/local/etc/disqus.conf COPY prism_light.js /ghost/prismjs/light/prism.js COPY prism_light.css /ghost/prismjs/light/prism.css COPY prism_dark.js /ghost/prismjs/dark/prism.js diff --git a/ghost/disqus.conf b/ghost/disqus.conf new file mode 100644 index 0000000..9761bcb --- /dev/null +++ b/ghost/disqus.conf @@ -0,0 +1,15 @@ + + + +comments powered by Disqus + diff --git a/ghost/run.sh b/ghost/run.sh index 28be4c0..ab02ddd 100644 --- a/ghost/run.sh +++ b/ghost/run.sh @@ -37,6 +37,12 @@ if [ "$ENABLE_ISSO" == "True" ] && ! grep -q 'isso' /ghost/content/themes/casper -e "s//$ISSO_VOTE/g" /ghost/content/themes/casper/post.hbs fi +if [ "$ENABLE_DISQUS" == "True" ] && ! grep -q 'disqus' /ghost/content/themes/casper/post.hbs; then + cd /usr/local/etc + sed -i -e "/\/author/r disqus.conf" /ghost/content/themes/casper/post.hbs + sed -i -e "s//$DISQUS_SHORTNAME/g" /ghost/content/themes/casper/post.hbs +fi + if [ "$SYNTAX_HIGHLIGHTING" == "True" ] && [ ! -f /ghost/content/themes/casper/assets/js/prism.js ]; then cp /ghost/prismjs/$HIGHLIGHTER_COLOR/prism.css /ghost/content/themes/casper/assets/css cp /ghost/prismjs/$HIGHLIGHTER_COLOR/prism.js /ghost/content/themes/casper/assets/js