mirror of
https://github.com/almet/notmyidea.git
synced 2025-04-29 03:52:38 +02:00
95 lines
No EOL
4.6 KiB
HTML
95 lines
No EOL
4.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Pelican, a simple static blog generator in python - Alexis Métaireau</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="https://blog.notmyidea.org/theme/css/main.css" type="text/css" />
|
|
<link href="https://blog.notmyidea.org/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Alexis Métaireau ATOM Feed" />
|
|
</head>
|
|
<body>
|
|
<section id="links">
|
|
<li>
|
|
<a class="" href="https://blog.notmyidea.org/" id="site-title">Blog</a>
|
|
</li>
|
|
<li><a class="" href="https://blog.notmyidea.org/pages/projets.html">Projets</a></li>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<header>
|
|
<h1 class="post-title">Pelican, a simple static blog generator in python</h1>
|
|
<time datetime="2010-10-06T00:00:00+02:00">06 octobre 2010</time>
|
|
|
|
|
|
</header>
|
|
<article>
|
|
|
|
<p>Those days, I’ve wrote a little python application to fit my blogging
|
|
needs. I’m an occasional blogger, a vim lover, I like restructured text
|
|
and DVCSes, so I’ve made a little tool that makes good use of all that.</p>
|
|
<p><a href="http://docs.getpelican.com">Pelican</a> (for calepin) is just a simple
|
|
tool to generate your blog as static files, letting you using your
|
|
editor of choice (vim!). It’s easy to extend, and has a template
|
|
support (via jinja2).</p>
|
|
<p>I’ve made it to fit <em>my</em> needs. I hope it will fit yours, but maybe it
|
|
wont, and it have not be designed to feet everyone’s needs.</p>
|
|
<p>Need an example ? You’re looking at it ! This weblog is using pelican
|
|
to be generated, also for the atom feeds.</p>
|
|
<p>I’ve released it under <span class="caps">AGPL</span>, since I want all the modifications to be
|
|
profitable to all the users.</p>
|
|
<p>You can find a repository to fork at
|
|
<a href="https://github.com/getpelican/pelican/">https://github.com/getpelican/pelican/</a>. feel free to hack it !</p>
|
|
<p>If you just want to get started, use your installer of choice (pip,
|
|
easy_install, …) And then have a look to the help (pelican —help)</p>
|
|
<div class="highlight"><pre><span></span><code>$ pip install pelican
|
|
</code></pre></div>
|
|
|
|
<h2 id="usage">Usage</h2>
|
|
<p>Here’s a sample usage of pelican</p>
|
|
<div class="highlight"><pre><span></span><code>$ pelican .
|
|
writing /home/alexis/projets/notmyidea.org/output/index.html
|
|
writing /home/alexis/projets/notmyidea.org/output/tags.html
|
|
writing /home/alexis/projets/notmyidea.org/output/categories.html
|
|
writing /home/alexis/projets/notmyidea.org/output/archives.html
|
|
writing /home/alexis/projets/notmyidea.org/output/category/python.html
|
|
writing
|
|
/home/alexis/projets/notmyidea.org/output/pelican-a-simple-static-blog-generator-in-python.html
|
|
Done !
|
|
</code></pre></div>
|
|
|
|
<p>You also can use the —help option for the command line to get more informations</p>
|
|
<div class="highlight"><pre><span></span><code><span class="nv">$pelican</span> --help
|
|
usage: pelican <span class="o">[</span>-h<span class="o">]</span> <span class="o">[</span>-t TEMPLATES<span class="o">]</span> <span class="o">[</span>-o OUTPUT<span class="o">]</span> <span class="o">[</span>-m MARKUP<span class="o">]</span> <span class="o">[</span>-s SETTINGS<span class="o">]</span> <span class="o">[</span>-b<span class="o">]</span>
|
|
path
|
|
|
|
A tool to generate a static blog, with restructured text input files.
|
|
|
|
positional arguments:
|
|
path Path where to find the content files <span class="o">(</span>default is
|
|
<span class="s2">"content"</span><span class="o">)</span>.
|
|
|
|
optional arguments:
|
|
-h, --help show this <span class="nb">help</span> message and <span class="nb">exit</span>
|
|
-t TEMPLATES, --templates-path TEMPLATES
|
|
Path where to find the templates. If not specified,
|
|
will uses the ones included with pelican.
|
|
-o OUTPUT, --output OUTPUT
|
|
Where to output the generated files. If not specified,
|
|
a directory will be created, named <span class="s2">"output"</span> <span class="k">in</span> the
|
|
current path.
|
|
-m MARKUP, --markup MARKUP
|
|
the markup language to use. Currently only
|
|
ReSTreucturedtext is available.
|
|
-s SETTINGS, --settings SETTINGS
|
|
the settings of the application. Default to None.
|
|
-b, --debug
|
|
</code></pre></div>
|
|
|
|
<p>Enjoy :)</p>
|
|
</article>
|
|
|
|
</body>
|
|
</html> |