8000 GitHub - meskarune/Letterpress: A minimal, Markdown based blogging system written in Python.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

meskarune/Letterpress

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Meskarune's Letterpress Fork

Letterpress is a minimal, Markdown based blogging system written in Python.

#Arch Linux Installation

Install required dependancies, save blog template files to ~/Documents/letterpress and save the letterpress.py file to /usr/local/bin.

pacman -S python-pyinotify python-pygments python-markdown

mkdir ~/Documents/letterpress

cd ~/git
git clone https://github.com/meskarune/Letterpress.git

cp ~/git/Letterpress.git/press/* ~/Documents/letterpress
cp ~/git/Letterpress.git/code/letterpress.py /usr/local/bin/letterpress.py

Edit the configuration file in ~/Documents/letterpress/letterpress.conf

###Systemd Unit File:

[Unit]
Description=Letterpress Blog Post Listener

[Service]
ExecStart=/usr/bin/python /usr/local/bin/letterpress.py /home/meskarune/Documents/letterpress

[Install]
WantedBy=multi-user.target

How It Works

After launch, Letterpress monitors Markdown files(recognized by the filename extension specified in letterpress.config) in press_folder. When an new Markdown file is detected Letterpress generates a new HTML file from that Markdown file. Similarly, when an existing Markdown file is updated or deleted, Letterpress updates or deletes the corresponding HTML file.

Letterpress also monitors templates. If any change is detected in any of the template files, Letterpress rebuilds the whole site.

Letterpress also monitors subfolders and other files in press_folder but treat them as assets. It maps them directly into site_dir. It means if you make an assets folder and put images there you can reference them in your posts, e.g., ![Big Headshot](/assets/big_headshot.jpg).

Letterpress builds these indices automatically:

  • Home index
  • Archive indices
  • Monthly indices
  • Yearly indices
  • Tag indices

Letterpress writes logs into press_folder so you can easily review what is going on.

Writing

You write posts in such a natural format:

title: Post Title
date: Publishing date in the format specified in letterpress.config. The default format is 01/31/2013.
excerpt: Summary of the post.
tags: math, web

Content of the post…

### Let's have fun with math & physics

$E=m*c^2$

Refer to press/sample_post.md for a complete example.

Naming

The recommended naming scheme for post files is to use post title, directly or shortened. Adding date to file names would result in redundant path segment in permalinks since Letterpress already puts the HTML files under folders named after their publish dates.

Credits

So I hardly did any thing but glue these awesome things together.

About

A minimal, Markdown based blogging system written in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0