mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
ghost: add disqus
This commit is contained in:
parent
d0d38e6628
commit
1bf3dbd5a2
@ -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
|
||||
|
15
ghost/disqus.conf
Normal file
15
ghost/disqus.conf
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
var disqus_shortname = '<SHORTNAME>';
|
||||
var disqus_identifier = '{{post.id}}';
|
||||
|
||||
/* * * DON'T EDIT BELOW THIS LINE * * */
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
|
@ -37,6 +37,12 @@ if [ "$ENABLE_ISSO" == "True" ] && ! grep -q 'isso' /ghost/content/themes/casper
|
||||
-e "s/<VOTE>/$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/<SHORTNAME>/$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
|
||||
|
Loading…
x
Reference in New Issue
Block a user