all repos — h3rald @ a16f1e80c8c13f66bcd56f97bc7c0be3f6549196

The sources of https://h3rald.com

Added licenses & README.
h3rald h3rald@h3rald.com
Sun, 15 Oct 2017 17:38:43 +0200
commit

a16f1e80c8c13f66bcd56f97bc7c0be3f6549196

parent

f7e100dea0752e29792c3a20b221e097a1118ad3

7 files changed, 64 insertions(+), 35 deletions(-)

jump to
A LICENSE

@@ -0,0 +1,22 @@

+The MIT License (MIT) + +Copyright (c) 2004-2017 Fabio Cevasco + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +
M README.mdREADME.md

@@ -1,17 +1,36 @@

-== H3RALD Web Site +## H3RALD Web Site H3RALD.com was created in 2004 by Fabio Cevasco, a technical writer, programmer and IT enthusiast. It features over a hundred "articles":/articles/ covering a wide range of topics, from programming to writing, productivity and even traveling. -As of version 8, H3RALD.com is a completely static web site, except for a few AJAX calls. All the files are generated automatically thanks to the "nanoc":http://nanoc.stoneship.org/ publishing system, an ingenious creation of "Denis Defreyne":http://www.stoneship.org/. Nanoc can be used to easily create static web sites using Ruby, as explained in "this article":http://www.h3rald.com/articles/take-back-your-site-with-nanoc/. +Currently, this site is fully static (minus a few AJAX calls) and is powered by the [HastySite](https://github.com/h3rald/hastysite/) static site generator and [LiteStore](https://github.com/h3rald/litestore/) (for the archive search functionality). + + +### Licensing +Unless stated otherwise, all the content published on this web site is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. -=== Licensing +The source code of this web site, such as its layout, stylesheets, custom min rules and code is licensed under the terms of the MIT License. + +### How to generate and run this site locally + +1. Download and install [Nim](https://nim-lang.org). +2. Clone [Nifty](https://github.com/h3rald/nifty/), compile it and place the **nifty** executable in your $PATH. +2. Clone [LiteStore](https://github.com/h3rald/litestore/), compile it and place the **litestore** executable in your $PATH. +2. Clone [nimhttpd](https://github.com/h3rald/nimhttpd/), compile it and place the **nimhttpd** executable in your $PATH. +3. Clone [HastySite](https://github.com/h3rald/hastysite/). +4. Run `nifty install` in the hastysite repository folder. +5. Compile hastysite and place its executable in your $PATH. +6. Clone this repository. +7. In the h3rald repository folder, run `hastysite build`. +8. In the h3rald repository folder, run `hastysite index`. +9. Start LiteStore by running **litestore** in the h3rald repository folder. +10. Start the NimHTTPd server by running **nimhttpd** in the output folder of the h3rald repository (create automatically when running `hastysite build`). -TBD -=== Requirements +### Credits -=== Credits +* [David J. Perry](http://scholarsfonts.net/), who designed the [Cardo](http://scholarsfonts.net/cardofnt.html) font used for the H3RALD logo. +* [Matt McInerney](https://www.theleagueofmoveabletype.com/members/matt), who designed the [Raleway](https://www.theleagueofmoveabletype.com/raleway) font, used throughout this web site. +* [Yan Zhu](https://twitter.com/picturepan2), the creator of the [Spectre](https://picturepan2.github.io/spectre/) CSS framework, used as the basis for the styling of this web site. +* [Daniel Bruce](http://www.danielbruce.se/), designer of the [Entypo](http://www.entypo.com/) font, used for the icons on this web site. -* "David J.Perry":http://scholarsfonts.net/, who designed the "Cardo font":http://scholarsfonts.net/cardofnt.html I used for the H3RALD logo. -* The creators of the free "Crimson Text":http://aldusleaf.org/crimson/ font, used throughout the web site.
M assets/js/search.jsassets/js/search.js

@@ -1,7 +1,7 @@

(function(window){ var axios = window.axios; var hostname = window.location.hostname; - var endpoint = '/search/'; + var endpoint = '/litestore/'; var searchInput = window.document.getElementsByClassName('search-input')[0]; var searchButton = window.document.getElementsByClassName('search-button')[0]; var clearButton = window.document.getElementsByClassName('clear-button')[0];
A contents/LICENSE

@@ -0,0 +1,3 @@

+All content within this folder and subfolders is licensed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. + +For more information, see https://creativecommons.org/licenses/by-nc-sa/4.0/
D contents/about.html

@@ -1,18 +0,0 @@

------ -title: "About" -content-type: page ------ -<p>H3RALD.com was created in 2004 by Fabio Cevasco, a system architect, technical writer, programmer and IT enthusiast. It features over a hundred <a href="/archives/">articles</a> covering a wide range of topics, from programming to writing, productivity and traveling.</p> -<p>As of version 8, H3RALD.com is a completely static web site, except for a few <span class="caps">AJAX</span> calls. All the files are generated automatically thanks to the <a href="http://nanoc.stoneship.org/">nanoc</a> publishing system, an ingenious creation of <a href="http://www.stoneship.org/">Denis Defreyne</a>. Nanoc can be used to easily create static web sites using Ruby, as explained in <a href="http://www.h3rald.com/articles/take-back-your-site-with-nanoc/">this article</a>.</p> -<p>The following ruby libraries (gems) are used to compile this web site:</p> -<ul> - <li><a href="https://rubygems.org/gems/nanoc">nanoc</a>, to generate the entire web site</li> - <li><a href="https://rubygems.org/gems/extlib">Extlib</a>, in some custom Rake tasks</li> - <li><a href="https://rubygems.org/gems/bb-ruby">BB-Ruby</a>, for BBCode support</li> - <li><a href="https://rubygems.org/gems/builder/">Builder</a>, to create <span class="caps">RSS</span> and <span class="caps">ATOM</span> feeds</li> - <li><a href="https://rubygems.org/gems/less/">Less</a>, for the <span class="caps">SASS</span> filter</li> - <li><a href="https://rubygems.org/gems/therubyracer">The Ruby Racer</a>, to execute Javascript code (needed by Less)</li> - <li><a href="https://rubygems.org/gems/redcloth/">RedCloth</a>, for Textile support</li> - <li><a href="https://rubygems.org/gems/rdiscount">RDiscount</a>, for Markdown support</li> - <li><a href="https://rubygems.org/gems/glyph">Glyph</a>, for Glyph support</li> -</ul>
M rules.minrules.min

@@ -324,13 +324,16 @@

; Process all contents contents ( =content - content /id :id - content - (/content-type "project" ==) (content PROJECTS append #PROJECTS content) when - process-tags - process-timestamp - process-content - (id "index" !=) 'output-fwrite when + (content ?content-type) + ( + content /id :id + content + (/content-type "project" ==) (content PROJECTS append #PROJECTS content) when + process-tags + process-timestamp + process-content + (id "index" !=) 'output-fwrite when + ) when ) foreach ; Generate tag pages
M templates/home.mustachetemplates/home.mustache

@@ -106,7 +106,7 @@ <li>

<a href="https://www.theleagueofmoveabletype.com/members/matt">Matt McInerney</a>, who designed the <a href="https://www.theleagueofmoveabletype.com/raleway">Raleway</a> font, used throughout this web site. </li> <li> - <a href="https://twitter.com/picturepan2">Yan Zhu</a>, the creator of the <a href="https://picturepan2.github.io/spectre/">Spectre</a> CSS framework. + <a href="https://twitter.com/picturepan2">Yan Zhu</a>, the creator of the <a href="https://picturepan2.github.io/spectre/">Spectre</a> CSS framework, used as the basis for the styling of this web site. </li> <li> <a href="http://www.danielbruce.se/">Daniel Bruce</a>, designer of the <a href="http://www.entypo.com/">Entypo</a> font, used for the icons on this web site.