-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeed.xml
More file actions
136 lines (130 loc) · 11.2 KB
/
feed.xml
File metadata and controls
136 lines (130 loc) · 11.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0' xmlns:atom='http://www.w3.org/2005/Atom'>
<channel>
<atom:link href='http://davidself.github.com/' rel='self' type='application/rss+xml'/>
<title>
从心所欲
</title>
<link>
http://davidself.github.com/
</link>
<description>
This blog is awesome
</description>
<lastBuildDate>
Tue, 12 Jan 2016 15:20:52 +0800
</lastBuildDate>
<generator>
clj-rss
</generator>
<item>
<guid>
http://davidself.github.com/posts/2016-01-07-docs.html
</guid>
<link>
http://davidself.github.com/posts/2016-01-07-docs.html
</link>
<title>
Quick Start Guide
</title>
<description>
<p>This intro only documents a subset of Cryogen's features. For additional documentation please see the <a href='http://cryogenweb.org'>cryogen site</a>.</p><h2><a name="features"></a>Features</h2><ul><li>Blog posts and pages with Markdown (default) or AsciiDoc</li><li>Tags</li><li>Table of contents generation</li><li>Plain HTML page templates</li><li>Code syntax highlighting</li><li>Disqus support</li><li>Sitemap generation</li><li>RSS feed generation</li><li>Sass/SCSS compilation</li></ul><h2><a name="prerequisites"></a>Prerequisites</h2><p>You will need <a href='https://github.com/technomancy/leiningen'>Leiningen</a> 2.5.0 or above installed.</p><h2><a name="usage"></a>Usage</h2><h3><a name="creating&#95;a&#95;new&#95;site"></a>Creating a New Site</h3><p>A new site can be created using the Cryogen template as follows:</p><pre><code>lein new cryogen my-blog
</code></pre><h3><a name="running&#95;the&#95;server"></a>Running the Server</h3><p>The web server can be started from the <code>my-blog</code> directory using the <code>lein-ring</code> plugin:</p><pre><code>lein ring server
</code></pre><p>The server will watch for changes in the <code>resources/templates</code> folder and recompile the content automatically.</p><h3><a name="site&#95;configuration"></a>Site Configuration</h3><p>The site configuration file is found at <code>templates/config.edn</code>, this file looks as follows:</p><pre><code class="clojure">{:site-title &quot;My Awesome Blog&quot;
:author &quot;Bob Bobbert&quot;
:description &quot;This blog is awesome&quot;
:site-url &quot;http://blogawesome.com/&quot;
:post-root &quot;posts&quot;
:page-root &quot;pages&quot;
:post-root-uri &quot;posts-output&quot;
:page-root-uri &quot;pages-output&quot;
:tag-root-uri &quot;tags-output&quot;
:blog-prefix &quot;/blog&quot;
:rss-name &quot;feed.xml&quot;
:rss-filters &#91;&quot;cryogen&quot;&#93;
:recent-posts 3
:post-date-format &quot;yyyy-MM-dd&quot;
:sass-src nil
:sass-dest nil
:theme &quot;blue&quot;
:resources &#91;&quot;img&quot;&#93;
:keep-files &#91;&quot;.git&quot;&#93;
:disqus? false
:disqus-shortname &quot;&quot;
:ignored-files &#91;#&quot;\.#.&#42;&quot; #&quot;.&#42;\.swp$&quot;&#93;
:posts-per-page 5
:blocks-per-preview 2
:previews? false}
</code></pre><p>For information about each key please see the <a href='http://cryogenweb.org/docs/configuration.html'>"Configuration"</a> portion of the Cryogen documentation site.</p><h3><a name="switching&#95;between&#95;markdown&#95;and&#95;asciidoc"></a>Switching between Markdown and AsciiDoc</h3><p>Cryogen comes with Markdown support as default. If you want to use AsciiDoc instead, open the <code>project.clj</code> in your created blog (e.g. <code>my-blog</code>), and change the line in <code>:dependencies</code> that says <code>cryogen-markdown</code> to <code>cryogen-asciidoc</code>. Instead of looking for files ending in <code>.md</code> in the <code>resources/templates/md</code> directory, the compiler will now look for files ending in <code>.asc</code> in the <code>resources/templates/asc</code> directory.</p><h3><a name="selecting&#95;a&#95;theme"></a>Selecting a Theme</h3><p>The Cryogen template comes with two themes in the <code>resources/templates/themes</code> folder. To change your blog's theme, change the value of the <code>:theme</code> key in <code>config.edn</code>.</p><h3><a name="customizing&#95;layouts"></a>Customizing Layouts</h3><p>Cryogen uses <a href='https://github.com/yogthos/Selmer'>Selmer</a> templating engine for layouts. Please refer to its documentation to see the supported tags and filters for the layouts.</p><p>The layouts are contained in the <code>resources/templates/themes/{theme}/html</code> folder of the project. By default, the <code>base.html</code> layout is used to provide the general layout for the site. This is where you would add static resources such as CSS and JavaScript assets as well as define headers and footers for your site.</p><p>Each page layout should have a name that matches the <code>:layout</code> key in the page metadata and end with <code>.html</code>. Page layouts extend the base layout and should only contain the content relaveant to the page inside the <code>content</code> block. For example, the <code>tag</code> layout is located in <code>tag.html</code> and looks as follows:</p><pre><code class="xml">{% extends &quot;templates/html/layouts/base.html&quot; %}
{% block content %}
&lt;div id=&quot;posts-by-tag&quot;&gt;
&lt;h2&gt;Posts tagged {{name}}&lt;/h2&gt;
&lt;ul&gt;
{% for post in posts %}
&lt;li&gt;
&lt;a href=&quot;{{post.uri}}&quot;&gt;{{post.title}}&lt;/a&gt;
&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;
&lt;/div&gt;
{% endblock %}
</code></pre><h3><a name="code&#95;syntax&#95;highlighting"></a>Code Syntax Highlighting</h3><p>Cryogen uses <a href='https://highlightjs.org/'>Highlight.js</a> for code syntax highlighting. You can add more languages by replacing <code>templates/js/highlight.pack.js</code> with a customized package from <a href='https://highlightjs.org/download/'>here</a>.</p><p>The <code> initHighlightingOnLoad</code> function is called in <code>{theme}/html/base.html</code>.</p><pre><code class="xml">&lt;script&gt;hljs.initHighlightingOnLoad&#40;&#41;;&lt;/script&gt;
</code></pre><h2><a name="deploying&#95;your&#95;site"></a>Deploying Your Site</h2><p>The generated static content will be found under the <code>resources/public</code> folder. Simply copy the content to a static folder for a server such as Nginx or Apache and your site is now ready for service.</p><p>A sample Nginx configuration that's placed in <code>/etc/nginx/sites-available/default</code> can be seen below:</p><pre><code class="javascript">server {
listen 80 default&#95;server;
listen &#91;::&#93;:80 default&#95;server ipv6only=on;
server&#95;name localhost &lt;yoursite.com&gt; &lt;www.yoursite.com&gt;;
access&#95;log /var/log/blog&#95;access.log;
error&#95;log /var/log/blog&#95;error.log;
location / {
alias /var/blog/;
error&#95;page 404 = /404.html;
}
}
</code></pre><p>Simply set <code>yoursite.com</code> to the domain of your site in the above configuration and ensure the static content is available at <code>/var/blog/</code>. Finally, place your custom error page in the <code>/var/blog/404.html</code> file.</p><p>More information on deployment can be found <a href='http://cryogenweb.org/docs/deploying-to-github-pages.html'>here</a>.</p><h2><a name="some&#95;sites&#95;made&#95;with&#95;cryogen"></a>Some Sites Made With Cryogen</h2><ul><li><a href='http://carmenla.me/blog/index.html'>Creator's blog</a></li><li><a href='http://cryogenweb.org'>Cryogen Documentation Site</a></li><li><a href='http://yogthos.net/'>Yogthos' blog</a></li><li><a href='http://www.clojure.tn'>Clojure :in Tunisia</a></li><li><a href='http://dl1ely.github.io'>dl1ely.github.io</a></li><li><a href='http://jonase.github.io/nil-recur'>nil/recur</a></li><li><a href='http://tangrammer.github.io/'>on the clojure move</a></li><li><a href='http://blog.jethrokuan.com/'>cognizance</a></li><li><a href='http://www.agynamix.de'>AGYNAMIX Site & Blog</a></li><li><a href='http://eresident.me'>e-Resident Me</a></li><li><a href='http://www.chadstovern.com'>Chad Stovern's blog</a></li><li><a href='https://greative.jp/'>Greative</a></li></ul>
</description>
<enclosure>
</enclosure>
<pubDate>
Thu, 07 Jan 2016 00:00:00 +0800
</pubDate>
</item>
<item>
<guid>
http://davidself.github.com/posts/2014-11-04-second-post.html
</guid>
<link>
http://davidself.github.com/posts/2014-11-04-second-post.html
</link>
<title>
Yet Another Post
</title>
<description>
<h3><a name="this&#95;post&#95;so&#95;fetch"></a>This Post So Fetch</h3><p>some more stuff happened</p>
</description>
<enclosure>
</enclosure>
<pubDate>
Tue, 04 Nov 2014 00:00:00 +0800
</pubDate>
</item>
<item>
<guid>
http://davidself.github.com/posts/2014-03-10-first-post.html
</guid>
<link>
http://davidself.github.com/posts/2014-03-10-first-post.html
</link>
<title>
A Post
</title>
<description>
<h3><a name="this&#95;post&#95;not&#95;fetch&#95;enough"></a>This Post Not Fetch Enough</h3><p>some stuff happened</p>
</description>
<enclosure>
</enclosure>
<pubDate>
Mon, 10 Mar 2014 00:00:00 +0800
</pubDate>
</item>
</channel>
</rss>