Skip to content
This repository was archived by the owner on Oct 23, 2020. It is now read-only.

Commit e3ac894

Browse files
committed
Update docs
1 parent c6a7b7d commit e3ac894

File tree

3 files changed

+81
-28
lines changed

3 files changed

+81
-28
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Catsup
44
.. image:: https://pypip.in/d/catsup/badge.png
55
:target: https://pypi.python.org/pypi/catsup/
66

7-
.. image:: https://travis-ci.org/whtsky/catsup.png?branch=develop
8-
:target: https://travis-ci.org/whtsky/catsup
7+
.. image:: https://travis-ci.org/whtsky/Catsup.png?branch=develop
8+
:target: https://travis-ci.org/whtsky/Catsup
99

1010
.. image:: https://coveralls.io/repos/whtsky/catsup/badge.png?branch=develop
1111
:target: https://coveralls.io/r/whtsky/catsup?branch=develop

docs/install.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ If you are using OS X , make sure you have installed the *Command Line Tools* .
1010

1111
Install using pip
1212
-------------------------
13-
Install catsup via pip is easy ::
13+
Install Catsup via pip is easy ::
1414

1515
(sudo) pip install catsup
1616

1717

1818
Upgrade from older version
1919
-------------------------------
20-
It's also easy to upgrade your catsup ::
20+
It's also easy to upgrade your Catsup ::
2121

2222
(sudo) pip install catsup --upgrade
2323

@@ -38,7 +38,7 @@ Install with git can always have the latest code ::
3838

3939
Cann’t find Python.h ?
4040
-----------------------
41-
Catsup uses misaka as the markdown engine.It requires C compiler.On Ubuntu, you may run ::
41+
Catsup uses misaka as the markdown engine. It requires C compiler.On Ubuntu, you may run ::
4242

4343
(sudo) apt-get install python-dev
4444

docs/post.rst

Lines changed: 76 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,17 @@
33
Post Syntax
44
=============
55

6+
Catsup currently supports 3 types of post: :ref:`Markdown <post-markdown-syntax>`, :ref:`Text <post-text-syntax>` and :ref:`HTML <post-html-syntax>`.
7+
8+
.. _post-markdown-syntax:
9+
10+
Markdown Post
11+
--------------
12+
613
Overview
7-
-----------
14+
~~~~~~~~~
815

9-
A post's extension should be either ``.md`` or ``.markdown`` .
16+
Post's extension should be either ``.md`` or ``.markdown`` .
1017

1118
A sample post looks like ::
1219

@@ -29,21 +36,80 @@ A sample post looks like ::
2936
A post consists of three parts:
3037

3138
+ Title
32-
+ Meta
39+
+ :ref:`Meta <post-meta>`
3340
+ Content
3441

3542
Title
36-
--------
43+
~~~~~~~~~~~~~~~~~~~~~~
3744

3845
Title should always on the first line and starts with ``#``
3946

47+
Content
48+
~~~~~~~~~~~~~~~~~~~~~~
49+
50+
Everything below the separator is the content. Content should be written in Markdown.
51+
52+
Code Highlight
53+
~~~~~~~~~~~~~~~~~~~~~~
54+
55+
Catsup supports GitHub's style code highlight, like this ::
56+
57+
```python
58+
print("Hello World!")
59+
```
60+
61+
.. _post-text-syntax:
62+
63+
Text Post
64+
--------------
65+
66+
Sometimes you may just want to write something without considering the syntax. Then you should use Text Post.
67+
68+
Text post's extension should be ``.txt`` .
69+
70+
The simplest text post looks like ::
71+
72+
Hello!
73+
This is a text post.
74+
75+
If you want to write meta in a text post, write the meta in YAML format ::
76+
77+
---
78+
title: Hello, World!
79+
tags: Hello, World
80+
time: 2014-01-04 20:56
81+
---
82+
83+
Hello, World! I'm a text post.
84+
85+
86+
.. _post-html-syntax:
87+
88+
HTML Post
89+
--------------
90+
91+
HTML post is like :ref:`Text <post-text-syntax>`, but you can use HTML in the content.
92+
93+
HTML post's extension should be ``.txt`` .
94+
95+
A HTML post looks like ::
96+
97+
---
98+
title: Hello, World!
99+
tags: Hello, World
100+
time: 2014-01-04 20:56
101+
---
102+
103+
<p>I'm writing HTML in catsup</p>
104+
105+
40106
.. _post-meta:
41107

42108
Meta
43-
-------
44-
45-
Meta is some information about the post. It's below title and above the separator.
109+
--------
46110

111+
Meta is some information about the post.
112+
Note that meta is optional, and if your post have meta, remember to put a :ref:`separator <post-separator>` below the meta.
47113

48114
+ time: When the post is written. like ``2013-08-25 11:10``
49115
+ tags: Tags of the post. Separated by comma, like ``Python, Program``
@@ -52,8 +118,10 @@ Meta is some information about the post. It's below title and above the separato
52118
+ comment: Set to ``disabled`` to forbid comment
53119
+ permalink: Permalink to the post, link ``/this-post``
54120

121+
.. _post-separator:
122+
55123
The separator
56-
---------------
124+
----------------
57125

58126
The separator separates meta and content. It should be at least *three* ``-`` ::
59127

@@ -63,21 +131,6 @@ It's okay to make it longer ::
63131

64132
----------------
65133

66-
Content
67-
-----------
68-
69-
Everything below the separator is the content. Content should be written in Markdown.
70-
71-
Code Highlight
72-
-----------------
73-
74-
Catsup supports GitHub's style code highlight, like this ::
75-
76-
```python
77-
print("Hello World!")
78-
```
79-
80-
81134
Page
82135
--------
83136

0 commit comments

Comments
 (0)