Jekyll build -source $TMP_GIT_CLONE -destination $PUBLIC_WWW To get git working with this create the git repository, go into the hooks subdirectory and create a post-receive script like this (again from ) #!/bin/bash -l Or skip the serve bit and check in the _site subdirectory. Jekyll will build your blog, and after a few seconds you should be able to visit in your browser. This will create an awesomeblog directory containing the configuration files, posts directory and other required bits. Quick test – (from ) jekyll new awesomeblog
#GEM INSTALL JEKYLL FFI FROZEN INSTALL#
Install Jekyll gem install -http-proxy jekyll Install ruby-ffi apt-get install ruby-ffi Install ruby-full: sudo apt-get install ruby-full Posted on 7th February 2019 7th February 2019 Categories Applications, Linux Tags Apache, Debian, Jekyll, Scripting, SVN, Web publishing Installing Jekyll on Debian 8 (Jessie) Of course, the professionals would use something like a combination of GitLab and Jenkins to automate this stuff properly… Build the site in the background (although you’d have to tweak how the logging output works in that case).Unify the setup for the commit email and build email scripts.This works for our current needs, although it isn’t optimised. Also, when troubleshooting remember that on Debian 9 the Apache process is configured by default to use a private /tmp directory! Note that the build process runs under the Apache user account, so set permissions appropriately. usr/bin/jekyll build -source "$TMP_SVN_EXPORT" -destination "$PUBLIC_WWW" usr/bin/svn export -quiet file:///"$REPOS" "$TMP_SVN_EXPORT" Needed as plain text email expects CRLF line terminators as specified in RFC 2822.)
![gem install jekyll ffi frozen gem install jekyll ffi frozen](https://dunder-img.gigmagic.io/games/thumbs/dr-jekyll-goes-wild.jpg)
(Note that on Debian you need to install the dos2unix package. LOGVAR=$(/export0/svn_config/jekyll_build.sh "$REPOS" $REV "$TMP_SVN_EXPORT" "$PUBLIC_WWW" 2>&1)Įcho "$LOGVAR" | /usr/bin/unix2dos | mail -s "$REPOS_BASENAME build $REV" "$BUILD_EMAIL" # These two need commit "$REPOS" $REV "$REPOS"/hooks/nf REPOS_BASENAME=$(/usr/bin/basename "$REPOS") Once that’s all working, set up the post-commit hook script to automatically build the site on a commit. Test by pointing a webserver at server:8081 (Remember to change nf to listen on the new port!)
![gem install jekyll ffi frozen gem install jekyll ffi frozen](https://www.luckymobileslots.com/wp-content/uploads/2015/05/cool_jewels_logo-160x107.jpg)
Jekyll build -source /tmp/buildfiles /var/www/sitenameĬonfigure Apache to serve from /var/This can be a handy testing configuration – you don’t have to worry about fiddling with the other website settings. On the server, create the actual website file location by exporting from the SVN via a temporary location: svn export file:///path/to/repository /tmp/buildfiles jekyll new /tmp/newsiteĬommit these files to the SVN repository (I normally check out the repository on my local workstation, copy the directory in /tmp from the server into the working directory on the workstation, add them and commit). Install SVN and Apache and set up accordingly.Ĭreate an SVN repository for the site files.Ĭreate new project directories at a temporary location, e.g. Set up system to use email server (campus smarthost in our case).
![gem install jekyll ffi frozen gem install jekyll ffi frozen](https://media.bingosys.net/production/platform/_common-assets/images/instant-games/2780/253x252.png)
Server – Debian 9 Stretch, normal command-line only install. Now I’ve got this working to some extent here are some notes about setting up Jekyll with SVN and Apache: Posted on 11th May 2020 Categories Applications, Linux Tags ANSI, Debian, Jekyll, SVN, text, Ubuntu Publishing websites with Jekyll, Apache and SVN
![gem install jekyll ffi frozen gem install jekyll ffi frozen](https://wiki.termux.com/images/2/25/GemServer.png)
The last line in the hook script then becomesĮcho "$LOGVAR" | /usr/bin/ansi2txt | /usr/bin/unix2dos | mail -s "$REPOS_BASENAME build $REV" "$BUILD_EMAIL" On Debian this comes with the dos2unix package.) (After this I pipe it through unix2dos to convert to CRLF line endings, as this appears to be the standard for email. This strips out all ANSI control codes making the string email safe. To fix this pipe the text through ansi2txt (comes with the colorized-logs package in Debian and Ubuntu). In this case the mail command (Debian 9 default exim) was only sending text up to the first ANSI code, which meant that the jekyll build error messages (which are yellow and red) were missing. If you send console output via email (like, say the output of jekyll build as part of a SVN post-commit hook script) if there are ANSI control characters in the string (e.g. Also see Publishing websites with Jekyll, Apache and SVN