taniko / saori
静态网站生成器
v3.1.0
2019-05-16 15:51 UTC
Requires
- php: ^7.1.3
- ext-mbstring: *
- cebe/markdown: ^1.1
- illuminate/support: ^5.3
- illuminate/validation: ^5.3
- mibe/feedwriter: ^1.0
- symfony/console: ^3.1
- symfony/yaml: ^3.2
- twig/twig: ^1.24
Requires (Dev)
- fzaninotto/faker: ^1.6
- mikey179/vfsstream: ^1.6
- phpunit/phpunit: ^5.5
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-09-17 03:19:33 UTC
README
Saori 是用于博客的 PHP 静态网站生成器
安装
composer create-project taniko/saori-skeleton blog
使用
php saori # initialize php saori init # generate draft file php saori draft first_article # edit draft file vim draft/first_article/article.md vim draft/first_article/config.yml # post php saori post first_article # generate static site php saori build # push to GitHub cd public git init ## username is your GitHub account git remote add origin git@github.com:username/username.github.io.git git add --all git commit -m 'Initial commit' git push origin master
如果你没有设置草稿名称,则创建 draft/temp
php saori draft
vim draft/temp/article.md
vim draft/temp/config.yml
# move temp to contents/article/YYYY/MM/DDHHMM
php saori post temp
php saori build
设置
config/env.yml
title: Example Blog author: John local: 'https://:8000' public: 'https://example.com' theme: saori lang: en link: GitHub: 'https://github.com/' Twitter: 'https://twitter.com/' 'Speaker Deck': 'https://speakerdeck.com/' feed: type: atom number: 50 google-analytics : null share: - twitter - pocket
config/theme.yml
saori: color: header : '#A9EEE6' title : '#F7FBFC' body : '#FEFAEC' page-contents : '#FFF1CF' date-format: 'F j, Y'