-<p>The wind is blowing at 85km/h outside, followed by rain and snow with low visibility. I couldn't find anything more interesting to do other than contributing to ClojureTO website. The goal today is to write a recursive article that explains how to contribute to this website by publishing itself.</p><h3 id="pre-requisites">Pre-requisites</h3><p>That's what I need to be able to contribute:</p><ol><li><strong>Git</strong>: as a technical person, I have the habit of versioning the work I do. Git is the tool I use for that. This is also the tool needed to manage and publish the website.</li><li><strong>GitHub</strong>: ClojureTO uses GitHub Pages as a hosting service. In short, when we push content to a repository it gets published on the website. To synchronize content with GitHub I need a GitHub account and Git.</li><li><strong>Leiningen</strong>: this is the portal to enter in the Clojure World. A Swiss knife to manage Clojure projects. I use it to tests the changes I make in the website. I was also used it to create the website in the first place.</li><li><strong>Cryogen</strong>: this tool, in combination with Leiningen, built this entire website. We explained how we did it in a <a href='https://clojureto.github.io/posts-output/2019-02-23-website-behind'>previews article</a>. Now, I need it to produce the content, define the layout, the style, and the navigation.</li><li><strong>Passion for Clojure</strong>: to write such long and rich content, a good deal of time and knowledge is required. My passion for Clojure motivates me to do it.</li><li><strong>Community Driven</strong>: a genuine intention to share knowledge and help others is also required.</li></ol><h3 id="forking&#95;the&#95;repository">Forking The Repository</h3><p>Not everybody is a good friend of a ClojureTO's co-organizer to claim push privileges. So, I need to start by forking <a href='https://github.com/ClojureTO/clojureto-website'>clojureto-website</a>. I click on the <strong>Fork</strong> button and get a new repository in my account. My contributions will remain there until it's time for a pull request.</p><p><img src="/img/fork-clojureto-website.png" alt="Forking clojureto-website repository" /></p><p>I clone the repository locally so I can start contributing:</p><pre><code>$ git clone https://github.com/htmfilho/clojureto-website.git</code></pre><h3 id="cryogen&#95;basics">Cryogen Basics</h3><p>Understanding Cryogen is discovering ways of contributing. Its <a href='http://cryogenweb.org'>website</a> covers all details. In summary, those with design skills could jump into <code>resources/templates/themes</code> and redefine how the content is presented, improve navigation, readability, harmonize colors, shapes. I personally have no talent there, so I care more about content, which is located at <code>resources/templates/md</code>. The one place that should not be touched at all is the folder <code>resources/public</code>. Those files are replaced whenever the files in the previously mentioned folders are modified and saved.</p><h3 id="writing&#95;the&#95;contribution">Writing the Contribution</h3><p>I wish I could write the content in Clojure, but that's not practical. So, I stick to <a href='https://daringfireball.net/projects/markdown/'>Markdown</a>, a format supported by Cryogen. Markdown eliminates the pain of writing content in HTML by offering a minimalist markup language for web authoring. All the content in Markdown, including this article, is located at <code>resources/templates/md</code>. I can write <strong>pages</strong>, which are more institutional, and <strong>posts</strong>, which represent facts, perspectives, experiences, and discoveries.</p><p>Apart from Markdown, there is a caveat. At the top of a page or post, there is a Clojure-like map where we define values expected by the theme. For a page, there is something like this:</p><pre><code>{:title &quot;About&quot;
0 commit comments