ForProgramPersonnel or entrepreneurial teams, it is still necessary to have a blog of their own. WordPress once made it easy for individuals or companies to build blogs. However, we think WordPress is still a heavyweight, so we chose Toto, a very lightweight tool with only over 200 lines.Code.
Prerequisites
Toto is simple because it uses some good tools and services. To use Toto, you must understand this.
1 Ruby on Rails
Rails is the ideal development tool for internet startups. It is suitable for agile development and can quickly develop applications.
2 git
Git is an efficient version management tool. You will fall in love with her and have no choice.
3 Heroku
You need to register a Heroku account and install the Heroku tool locally.
Heroku is a rails application hosting platform. The ideal toto deployment platform is Heroku. With Heroku, you can focus on Rails application development and hand over issues such as server environment and deployment backup to Heroku.
Blog creation in one minute
After the environment is ready, we can start. Follow the Toto installation documentation to build a blog with only four commands. (Replace myblog with your custom name)
$ Git clone git: // Github.com/cloudhead/dorothy.git myblog
$ CD myblog
$ Heroku create myblog
$ Git push Heroku master
So you can access your blog: http://myblog.heroku.com.
How to update a blog?
Let's take a look at the Toto directory structure.
Each blog is a file stored in the articles directory. Creating a blog is to create a file in this directory.
Toto provides a command to help us create a blog
Rake new
Enter the title: Hello World
You can refer to the naming rules of a file. The generated file name is 2011-06-07-hello-world.txt. By default, Toto uses this rule to establish a link. This may be a problem in Chinese, because we generally do not want to use Chinese as the file name.
The solution is as follows. For example, if the blog is the world famous, the file name can also be hello-world.txt. You only need to add a line in the file:
--- Title: Hello world date: 07/06/2011 slug: hello-world # Add this line
Toto is defined using markdown tag syntaxArticleFormat. For detailed syntax rules, see http://en.wikipedia.org/wiki/markdown.
After the article is edited, submit it to Heroku
Rake publish
Refresh to see the update.
This is the blog http://blog.workxp.info built by Toto.