This project is fork from http://github.com/wendal/gor.git
Transform your plain text into static websites and blogs.
yo(fork gor)
is a Ruhoh like websites and blog generator engine written in Go. It's almost compatible to ruhoh 1.x specification. You can treat yo as a replacement of the official implementation what is written in Ruby.
Why reinvent a wheel? yo
has following awesome benefits:
- Speed -- Less than 1 second when compiling all my near 200 blogs on wendal.net
- Simple -- Only one single executable file generated after compiling, no other dependence
==================== To install:
go get github.com/newblue/neyo/yo
If you use brew on Mac, and you didn't set $GOROOT
and $GOPATH
environment variable
Please using this command:
ln -s /usr/local/Cellar/go/1.0.3/bin/yo /usr/local/bin
======================
yo new example.com cd example.com
After execution, a folder named example.com will be generated, including a scaffold & some sample posts.
yo post "goodday" [dir/to/img/files]
Generate a new post file: post/goodday.md, open it with your markdown editor to write.
[dir/to/img/files]
is optionl. If it's provided, all files in that dir will be copy into blog dir(configurable dir), and insert <img>
tag into post file.
Open the site.yml
file in root folder
- Input title, author etc.
- Input email etc.
Open the config.yml file in root folder
production_url
is your website address, such ashttp://wendal.net
, don't add'/'
at last, it will be used to generaterss.xml
etc.summary_lines
is the length of abstract on homepage, any number as you like.latest
is how many posts will be shown on homepageimgs
parts is auto img config
Open widgets
folder, you can see some widgets here, there is a config.yml
file of each widget for configuration.
analytics
only supportgoogle analytics
by now, please inputtracking_id
herecomments
only supportdisqus
by now, please input yourshort_name
of disqus heregoogle_prettify
for code highlighting, normally it's not necessary to change
yo compile
Finished instantly. A new folder named public will be generated, all website is in it.
gor also comes with a built-in development server that will allow you to preview what the generated site will look like in your browser locally.
yo http
Open your favorite web browser and visit: http://127.0.0.1:8080
You can deploy it to GitHub Pages, or put it to your own VPS
, because there are only static files(HTML, CSS, js etc.), no need of php/mysql/java
etc.
This project is licensed under the BSD license.
Copyright (C) 2013, by NewBlue newblue@gmail.com
If you are also using gor, please don't hesitate to tell me by email or open an issue.