GithubHelp home page GithubHelp logo

neyo's Introduction

Table of Contents

Chinese README.md

English Introduction

This project is fork from http://github.com/wendal/gor.git

yo -- A static websites and blog generator engine written in Go fork from gor

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:

  1. Speed -- Less than 1 second when compiling all my near 200 blogs on wendal.net
  2. Simple -- Only one single executable file generated after compiling, no other dependence

Installation

==================== 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

Quick Start

======================

Create a new website

yo new example.com cd example.com

After execution, a folder named example.com will be generated, including a scaffold & some sample posts.

Create a new post

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.

Configuration

Open the site.yml file in root folder

  1. Input title, author etc.
  2. Input email etc.

Open the config.yml file in root folder

  1. production_url is your website address, such as http://wendal.net, don't add '/' at last, it will be used to generate rss.xml etc.
  2. summary_lines is the length of abstract on homepage, any number as you like.
  3. latest is how many posts will be shown on homepage
  4. imgs parts is auto img config
    • imgtag:basic format for tag to be insert. the %s part will to replaced by urlperfix/post_name/img_file_name
    • urlperfix:img file url perfix
    • localdir:location inside blog repo for img file storage

Open widgets folder, you can see some widgets here, there is a config.yml file of each widget for configuration.

  1. analytics only support google analytics by now, please input tracking_id here
  2. comments only support disqus by now, please input your short_name of disqus here
  3. google_prettify for code highlighting, normally it's not necessary to change

Compile to generate static web page

yo compile

Finished instantly. A new folder named public will be generated, all website is in it.

Local preview

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

Deployment

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.

Copyright and License

This project is licensed under the BSD license.

Copyright (C) 2013, by NewBlue [email protected]

If you are also using gor, please don't hesitate to tell me by email or open an issue.

neyo's People

Contributors

wendal avatar newblue avatar hugozhu avatar ifq avatar sepher avatar ywjno avatar xvweirong avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.