项目作者: taniko

项目描述 :
PHP static site generator for blog
高级语言: PHP
项目地址: git://github.com/taniko/saori.git
创建时间: 2016-04-23T14:03:50Z
项目社区:https://github.com/taniko/saori

开源协议:MIT License

下载


Saori

Build Status

Saori is PHP static site generator for blog

Installation

  1. composer create-project taniko/saori-skeleton blog

Usage

  1. php saori
  2. # initialize
  3. php saori init
  4. # generate draft file
  5. php saori draft first_article
  6. # edit draft file
  7. vim draft/first_article/article.md
  8. vim draft/first_article/config.yml
  9. # post
  10. php saori post first_article
  11. # generate static site
  12. php saori build
  13. # push to GitHub
  14. cd public
  15. git init
  16. ## username is your GitHub account
  17. git remote add origin git@github.com:username/username.github.io.git
  18. git add --all
  19. git commit -m 'Initial commit'
  20. git push origin master

if you not set draft name, create draft/temp

  1. php saori draft
  2. vim draft/temp/article.md
  3. vim draft/temp/config.yml
  4. # move temp to contents/article/YYYY/MM/DDHHMM
  5. php saori post temp
  6. php saori build

Setting

config/env.yml

  1. title: Example Blog
  2. author: John
  3. local: 'http://localhost:8000'
  4. public: 'https://example.com'
  5. theme: saori
  6. lang: en
  7. link:
  8. GitHub: 'https://github.com/'
  9. Twitter: 'https://twitter.com/'
  10. 'Speaker Deck': 'https://speakerdeck.com/'
  11. feed:
  12. type: atom
  13. number: 50
  14. google-analytics : null
  15. share:
  16. - twitter
  17. - pocket

config/theme.yml

  1. saori:
  2. color:
  3. header : '#A9EEE6'
  4. title : '#F7FBFC'
  5. body : '#FEFAEC'
  6. page-contents : '#FFF1CF'
  7. date-format: 'F j, Y'

my blog and repository