version: 1.10.11
Before you read any document of this repo, you have to learn some definition:
-
slug
: This is a human readable key string.slug
must be unique in same level, just like a filename in same folder, or a path of url. Developer can use slug definition key like string in template. For example: you have to make a photo slider with dynamic contents, you need a key to define #id of each slides, this is good situation to use content's slug to make those keys. -
content_type
: Content type define types of different content source. one content can not archive in different content type, just likefolder
withfile
. It's totally different with Category (assume you understand what is category). -
taxonomy
: Just taxonomy. The item of taxonomy call term. Category is a kind of taxonomy. developer may define custom taxonomy other than category as well, that's why use a general name.
- Learn Pyco to know how to start localhost to develop.
- Learn how to write theme config to define your theme.
- Learn Jinja2 template to know how to write template language.
- Learn Peon to know the develop tools.
- If you good engouh, learn Angular template to know how to write template able to use canvas editor view.
- If you nothing other to do, learn markdown template to know how to write template able to use markdown editor view.
- Know more about widget data model.
- Get gitignore file sample.
- file name can be include charector [_-.0-9a-zA-z], otherwise will not working.
- Install tools.
- Prepare folders and files.
html
: for original html files.content
: for content examples.theme
: for theme develop.- Place theme src file into
src
folder. - Place a
pyco
into folder. - Create a
peon.json
into folder.
- Place theme src file into
html/
/styles/
/index.html
/...
content/
/site.json
/index.md
/...
theme/
/src/
/styles/
/g
/index.html
/pyco/
/...
-
Prepare contents. Make
.md
files inpyco/content
, and 'site.json' (learn it form pyco docs.) -
Write basic theme. You don't have to finish it just basic structure. (learn it from jinja2 template docs.)
-
Ready to start.
-
Write peon.json
-
Get in
theme
folder with terminal. -
Run 'peon -w' command in
theme
folder. -
Peon will automatically start watching files change in
theme/src
and also start a localhost server with pico.
{
"watch":{
"src": "src",
"dest": "pyco/themes/dev",
"clean": true,
"server": true,
"pyco": "pyco",
"skip_includes": "html"
}
}
- Continue write your template files and debug it.