-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeed.xml
62 lines (60 loc) · 8.92 KB
/
feed.xml
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
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><atom:link href="https://clojure.tw" rel="self" type="application/rss+xml"/><title>Clojure Tutorial</title><link>https://clojure.tw</link><description>This blog is awesome</description><lastBuildDate>Wed, 12 Jun 2019 12:59:19 +0800</lastBuildDate><generator>clj-rss</generator><item><guid>https://clojure.tw/tutorial/posts-output/2015-01-01-docs</guid><link>https://clojure.tw/tutorial/posts-output/2015-01-01-docs</link><title>old </title><description><h2 id="features">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><li>Klipse Integration</li></ul><h2 id="prerequisites">Prerequisites</h2><p>You will need <a href="https://github.com/technomancy/leiningen">Leiningen</a> 2.5.0 or above installed.</p><h2 id="usage">Usage</h2><h3 id="creating_a_new_site">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 id="running_the_server">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 id="site_configuration">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 "My Awesome Blog"
:author "Bob Bobbert"
:description "This blog is awesome"
:site-url "http://blogawesome.com/"
:post-root "posts"
:page-root "pages"
:post-root-uri "posts-output"
:page-root-uri "pages-output"
:tag-root-uri "tags-output"
:author-root-uri "authors-output"
:blog-prefix "/blog"
:rss-name "feed.xml"
:rss-filters ["cryogen"]
:recent-posts 3
:post-date-format "yyyy-MM-dd"
:archive-group-format "yyyy MMMM"
:sass-src []
:sass-path "sass"
:compass-path "compass"
:theme "blue"
:resources ["img"]
:keep-files [".git"]
:disqus? false
:disqus-shortname ""
:ignored-files [#"\.#.*" #".*\.swp$"]
:posts-per-page 5
:blocks-per-preview 2
:previews? false
:clean-urls? true
:hide-future-posts? true
:klipse {}
:debug? 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 id="switching_between_markdown_and_asciidoc">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 id="selecting_a_theme">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 id="customizing_layouts">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 relevant 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 "templates/html/layouts/base.html" %}
{% block content %}
&lt;div id="posts-by-tag"&gt;
&lt;h2&gt;Posts tagged {{name}}&lt;/h2&gt;
&lt;ul&gt;
{% for post in posts %}
&lt;li&gt;
&lt;a href="{{post.uri}}"&gt;{{post.title}}&lt;/a&gt;
&lt;/li&gt;
{% endfor %}
&lt;/ul&gt;
&lt;/div&gt;
{% endblock %}
</code></pre><h3 id="code_syntax_highlighting">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();&lt;/script&gt;
</code></pre><h2 id="deploying_your_site">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_server;
listen [::]:80 default_server ipv6only=on;
server_name localhost &lt;yoursite.com&gt; &lt;www.yoursite.com&gt;;
access_log /var/log/blog_access.log;
error_log /var/log/blog_error.log;
location / {
alias /var/blog/;
error_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 id="some_sites_made_with_cryogen">Some Sites Made With Cryogen</h2><ul><li><a href="http://carmenla.me/blog/archives">My personal 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.agynamix.de">AGYNAMIX Site &amp; Blog</a></li><li><a href="http://www.chadstovern.com">Chad Stovern's blog</a></li><li><a href="http://lambdax.io/blog/">LambdaX</a></li><li><a href="http://www.szcz.org/">szcz</a></li><li><a href="https://blog.isvit.info">ISvit blog</a></li><li><a href="http://lambdafunk.com">Lambda Funk</a></li><li><a href="https://ddft.wiki">DDFT.wiki</a></li></ul></description><pubDate>Thu, 01 Jan 2015 00:00:00 +0800</pubDate></item></channel></rss>