_site -only-4xx -allow-hash-href -assume-extension -check-opengraph -url-ignore "feed.xml" ![]() npm install -g Cellane/node-markdown-spellcheck sudo apt-get install -y aspell aspell-en travis.yml configuration file provided sufficient: language: ruby How would such Travis configuration look like? For me, this. This time, on top of all the checks mentioned before, Travis would yet again compile the site from Markdown to HTML, remove any unnecessary files, checkout the gh-pages branch and force-push the finished site into that branch, as GitHub Pages serves the content from the gh-pages branch as the website. Only after these checks would pass, a merge back to master would be allowed.Īnd speaking of merging to master, doing so would also trigger Travis one more time. Why? Because each commit that’s a part of a pull request would be processed by Travis, whom I’d instruct to check the spelling and grammar for any modified Markdown files and check all hyperlinks in the resulting HTML pages for any dead links – and put the results of these checks as a comment in the pull request. and perhaps most importantly, I could not have GitHub Pages compile the site for me – I’ll get back to this point in a bit.Īfter forking the template’s repository, I decided how my Git workflow would look like: I’d protect the master branch from pushing any commits into it directly and force myself to instead have a pull request for any group of changes I intended to do on the site, including writing a new article.I had to start using npm run local instead of bundle exec jekyll serve to preview the site locally.I had to run npm run setup to configure my environment.I had to fork the template’s repository and build my work on top of that instead of creating an empty Jekyll project from the command line. ![]() That means I had to adjust the typical Jekyll workflow a little bit: GitHub Pages automatically converts your Jekyll project into a HTML site, with one caveat: it supports only a limited number of Jekyll plug-ins and templates unfortunately for me, the template I chose, a beautifully simple template called Chalk, was not one of the supported ones. This post, however, does not intend to focus on Jekyll directly, so if you’re interested in that topic, I recommend checking out their documentation, it’s truly comprehensive. The process of transformation is performed by a program called Jekyll and every step of it can be customized. ![]() In layman’s terms, it allows you to transform your Markdown documents into a full-fledged HTML pages that can be presented to the end user. Let’s quickly go over what GitHub Pages actually is. I like to have my Ruby versions maintained by rbenv so I can theoretically switch to another Ruby version in different directory, if needed. Obviously, in order to work with a Jekyll project, I had to install the Jekyll binary itself, and a few more dependencies that were required by the particular template I used. It’s definitely not a solution for everyone as it’s quite geeky at times, but maybe someone will find the description of my journey interesting or even decides to follow in my footsteps. There’s at least a hundred different ways to create your own blog/personal site, whether it’s using shared hosting with any of the myriad of free content management systems, using an existing platform such as Medium or Tumblr (although who in their right mind would do that? □□), but why not try something more extravagant?įor rebooting my site, I chose a solution based on GitHub Pages. Automatic spell and grammar check included! And not just host, but also set your site up to work on a custom domain and automate deployment using Travis CI.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |