Commits

Exaos Lee committed 6e8349e

Update Chinese translation

Comments (0)

Files changed (1)

example/sample-zh.org

 
 #+begin_o_blog_row 8
 
-#+HTML: <div class="hero-unit">
-
+#+begin_o_blog_hero_unit
 #+HTML: <h1>o-blog</h1>
 
 使用 [[http://orgmode.org/][org-mode]] 的独立博客系统。
+#+end_o_blog_hero_unit
 
-#+HTML: </div>
+#+HTML: <h1 style="font-size: 500%;">Quick start guide</h1>
 
 #+o_blog_row_column 4
 
+
 #+HTML: <div class="hero-unit" style="font-size: 200%;">
 
 [[file:{lisp}(ob:path-to-root){/lisp}/features.html][/icon-cog icon-white/ 特性]]
 
-[[https://github.com/renard/o-blog][/icon-github-sign icon-white/ 源代码 (github)]]
+[[https://github.com/renard/o-blog][/icon-github-sign icon-white/ GitHub]]
+
+[[file:{lisp}(ob:path-to-root){/lisp}/testimonials.html][/icon-comments-alt icon-white/ 用户推荐]]
 
 [[file:{lisp}(ob:path-to-root){/lisp}/changelog.html][/icon-pencil icon-white/ 更新记录]]
 
 
 ** 设置
 
-首先,你需要安装有 [[http://www.gnu.org/s/emacs][emacs]] (在版本 23 下测试,在 24 下可能也行) 和 [[http://orgmode.org/][org-mode]] (版本
-7.8 或更高)。然后你有两种方法可以安装 [[https://github.com/renard/o-blog][o-blog]].
+首先,你需要安装有 [[http://www.gnu.org/s/emacs][emacs]] (在版本 24 下测试,在 23 下可能也行) 和 [[http://orgmode.org/][org-mode]] (在版本
+7.8.09 下测试,其它的 /可能/ 也行)。然后你有两种方法可以安装 [[https://github.com/renard/o-blog][o-blog]].
 
 #+begin_o_blog_row 5
 
 #+HTML: <h4>使用 el-get</h4>
 
 要使用 [[https://github.com/dimitri/el-get][el-get]], 安装起来很容易。你所要做的不过是将 =o-blog= 添加到
-=el-get-sources= 中,然后执行 =M-x el-get-install o-blog=.
+=el-get-sources= 中,然后执行:
+
+ =M-x el-get-install o-blog=
+
+如果你使用 =el-get= 4 或更高,你只需要执行:
 
-如果你使用 =el-get= 4 或更高,你只需要执行: =M-x el-get-install o-blog=.
+=M-x el-get-install o-blog=
 
 #+o_blog_row_column 6
 
   :SNIPPET:  t
   :END:
 
-这是个解释 [[https://github.com/renard/o-blog][o-blog]] 工作理的博客样例。
+这是个解释 [[https://github.com/renard/o-blog][o-blog]] 工作理的博客样例。
 
 ** Navigation
   :PROPERTIES:
 
 - [[file:{lisp}(ob:path-to-root){/lisp}/tags/index.html][/icon-tags icon-white/ 标签]]
 
-- [[file:{lisp}(ob:path-to-root){/lisp}/archives.html][/icon-list icon-white/ 归档]]
+- [[file:{lisp}(ob:path-to-root){/lisp}/testimonials.html][/icon-comments-alt icon-white/ 用户推荐]]
+
+- [[file:{lisp}(ob:path-to-root){/lisp}/index.xml][/icon-rss icon-white/ RSS]]
 
-- [[file:{lisp}(ob:path-to-root){/lisp}/index.xml][RSS]]
+- [[file:{lisp}(ob:path-to-root){/lisp}/archives.html][/icon-list icon-white/ 归档]]
 
 - [[file:{lisp}(ob:path-to-root){/lisp}/changelog.html][/icon-pencil icon-white/ 更新记录]]
 
+- [[file:{lisp}(ob:path-to-root){/lisp}/roadmap.html][/icon-tasks icon-white/ 规划]]
+
 - [[file:{lisp}(ob:path-to-root){/lisp}/debug.html][(调试)]]
 
 ** Navigation Footer
 
   - [[file:{lisp}(ob:path-to-root){/lisp}/index.html][/icon-home icon-white/ {lisp}(ob:gettext :home){/lisp}]]
 
-  - [[file:{lisp}(let ((POSTS ALL-POSTS)) (format "%s/%s" (ob:path-to-root) (ob:post-htmlfile (car (ob:get-posts (lambda (x) (equal "Tips" (ob:post-category x)))))))){/lisp}][/icon-file icon-white/ Tips]]
+  - [[file:{lisp}(let%20((POSTS%20ALL-POSTS))%20(format%20"%25s/%25s"%20(ob:path-to-root)%20(ob:post-htmlfile%20(ob:get-last-post%20"Tips")))){/lisp}][/icon-file icon-white/ 近期博文]]
 
-  - [[file:{lisp}(ob:path-to-root){/lisp}/tags/index.html][/icon-tags icon-white/ Tags]]
+  - [[file:{lisp}(ob:path-to-root){/lisp}/tags.html][/icon-tags icon-white/ 标签]]
 
-  - [[file:{lisp}(ob:path-to-root){/lisp}/archives.html][/icon-list icon-white/ Archives]]
+  - [[file:{lisp}(ob:path-to-root){/lisp}/archives.html][/icon-list icon-white/ 归档博文]]
 
-  - [[file:{lisp}(ob:path-to-root){/lisp}/index.xml][RSS]]
+  - [[file:{lisp}(ob:path-to-root){/lisp}/testimonials.html][/icon-comments-alt icon-white/ 用户推荐]]
+
+  - [[file:{lisp}(ob:path-to-root){/lisp}/roadmap.html][/icon-tasks icon-white/ 发展规划]]
+
+  - [[file:{lisp}(ob:path-to-root){/lisp}/index.xml][/icon-rss icon-white/ 订阅摘要]]
+
+** Articles by tags
+  :PROPERTIES:
+  :PAGE:     tags.html
+  :TEMPLATE: blog_post-by-tags.html
+  :END:
 
 * 更新记录
   :PROPERTIES:
   :PAGE:     changelog.html
   :END:
 
+- 2012-06-21
+  - 添加发布排序选项。
+
 - 2012-06-05
-  - Update to
+  - 更新模版
     - Font-Awesome 2.0.0-6-g35fca03
     - bootstrap 2.0.4
 
 - 2012-05-21
-  - Use responsive bootstrap features.
+  - 使用应答式 bootstrap 功能。
 
 - 2012-05-07
-  - Update to:
+  - 更新模版:
     - less.js v1.0-547-ga2df119
-  - Bootstrap widgets:
+  - Bootstrap 插件:
     - label
     - badge
     - progress bar
     - hero unit
 
 - 2012-05-04
-  - Update to:
+  - 更新风格模版:
     - bootstrap v2.0.3-5-gb261f97.
 
 - 2012-04-17
-  - Update to:
+  - 更新风格模版:
     - less 1.3.0.
     - Font-Awesome v1.0.0-7-g563a6f3.
     - bootstrap v2.0.2-3-g6506ede.
 
 - 2012-04-10
-  - Add i18n support.
+  - 添加多国语言 (i18n) 支持。
 
 - 2012-04-06
-  - Add org-mode CUSTOM\_ID.
+  - 添加 org-mode CUSTOM\_ID 支持。
 
 - 2012-03-28
-  - Add support for [[http://en.wikipedia.org/wiki/QR_code][QR-code]].
+  - 添加 [[http://en.wikipedia.org/wiki/QR_code][QR-code]] 二维标识码支持。
 
 - 2012-03-21
   - 合并上述代码,更新中文演示模版,修改 snippet 为中文。
   - 使用 MD5SUM 作为 tags-safe 及 post filename, 解决中文名称的问题 (exaos)
 
 - 2012-03-06
-  - Add support for Font-Awesome
+  - 支持 Font-Awesome
 
 - 2012-02-28
-  - Switched to bootstrap 2.0.1
-  - Switched to lesscss 1.2.2
+  - 切换到 bootstrap 2.0.1
+  - 切换到 lesscss 1.2.2
 
 - 2012-01-23
-  - Change tag system from "Tags" to org tagging system.
+  - 切换标签系统由 "Tags"  org 标签系统。
 
 * 文档
 ** 调试
 
 
 
+** 用户推荐
+  :PROPERTIES:
+  :PAGE:     testimonials.html
+  :TEMPLATE: blog_static_no_title.html
+  :END:
+
+#+begin_o_blog_row 6
+
+
+#+HTML: <h1>用户推荐</h1>
+
+#+begin_quote
+/“o-blog, great static site generator from emacs Org-mode.”/
+
+-- Pierre-Yves Ritschard [[https://twitter.com/pyr/status/160466727195521024][@pyr]] ([[http://openbds.org][OpenBSD]] relayd original author)
+
+-- Sergey Konoplev [[http://twitter.com/gray_hemp][@gray\_hemp]] ([[http://PostgreSQL-Consulting.com][PostgreSQL Consultant]])
+
+-- Olivier Berger [[http://twitter.com/olberger][@olberger]] ([[http://www.april.org][APRIL administrator]])
+
+-- Dimitri Fontaine [[http://twitter.com/tapoueh][@tapoueh]] ([[http://tapoueh.org/projects.html][el-get and other]] author)
+
+-- Julien Danjou [[http://twitter.com/juldanjou][@juldanjou]] ([[http://awesome.naquadah.org/][Awesome window manager]] and [[http://julien.danjou.info/software/][other]] author)
+
+-- Daniel Farina [[http://twitter.com/danfarina][@danfarina]] (member of the [[http://www.heroku.com/][Heroku]] Department of Data)
+#+end_quote
+
+#+begin_quote
+/“o-blog, a cool static blog generator from org-mode markup with some nice
+Bootstrap integration.”/
+
+-- [[http://from-the-cloud.com/en/Random/2012/06/17_sites-back.html][Fabián Ezequiel Gallina]]
+#+end_quote
+
+#+begin_quote
+/“Thank you so much for the truly excellent elisp app. I am learning many
+things from it.”/
+
+-- [[https://github.com/priyadarshan][priyadarshan]]
+#+end_quote
+
+#+begin_quote
+/“o-blog looks awesome!”/
+
+-- [[https://github.com/djcb][Dirk-Jan C. Binnema]] (Author of [[http://www.djcbsoftware.nl/code/mu4e][mu4e]] and [[http://emacs-fu.blogspot.com][emacs-fu]])
+#+end_quote
+
+#+begin_quote
+/“o-blog is amazing. After using Wordpress seemingly since the dawn of time, then Jekyll for a couple of years, this is like a spring breeze after a long, cold winter.”/
+
+-- [[https://github.com/fravashi][Farasha Euker]]
+#+end_quote
+
+
+
+#+o_blog_row_column 6
+
+#+begin_o_blog_hero_unit
+
+#+HTML: <h1>他们在使用 o-blog</h1>
+
+- [[http://renard.github.com/o-blog][O-blog Project]]
+- [[http://docs.chezwam.org][Mes doc à moi]]
+- [[http://from-the-cloud.com/][From the cloud]]
+- [[http://exaos.github.com/o-blog/][exaos]]
+- [[http://mikio.github.com/index.html][Mikio Kun]]
+- [[http://mimes.is/][Journal of the creative imagination]]
+- [[http://www.djcbsoftware.nl][DJCB Software]]
+- [[http://dimilar.com/de/index.html][Erlang Vision]]
+- [[http://pharos-alexandria.github.com][Pharos (Annette von Stockhausen)]]
+
+#+end_o_blog_hero_unit
+
+
+#+begin_o_blog_hero_unit
+如果您也在使用 o-blog, 给作者 [[https://github.com/renard/o-blog/issues/new][留句话]] 吧。
+#+end_o_blog_hero_unit
+
+
+#+end_o_blog_row
+
+
+** 发展规划
+  :PROPERTIES:
+  :PAGE:     roadmap.html
+  :END:
+
+Here are some ideas for future versions
+
+- Use other source engines such as
+  - [[http://www.methods.co.nz/asciidoc/][AsciiDoc]]
+  - [[http://mwolson.org/projects/EmacsMuse.html][Emacs Muse]]
+  - etc...
+
+- Find a other name for the project such as
+  - Web Hypertext Otimized Rendering Easy System
+  - Building the Interweb from Texts Classic Hypermedia
+  - Build All Internet Standard E-documents
+  - Publication Unifiée de Tous E-documents
+  - el-site
+  - el-sitemanage
+  - el-sitepublish
+  - el-sitepress
+
+If you have any ideas please [[https://github.com/renard/o-blog/issues/new][drop me a line]].
+
+
+
+
 ** 问答
   :PROPERTIES:
   :PAGE:     faq.html
 
 其它的替代方法还有使用 [[http://www.emacswiki.org/emacs/Elnode][elnode]], 但它好象更复杂些。
 
+*** Why html pages are not minified?
+
+HTML compression very tricky. Things can easily go wrong. Using a
+[[http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/][GZip
+compression]] would be more efficient.
+
+Anyway if you still want to minify your pages, you can have a look to
+[[http://code.google.com/p/htmlcompressor/][htmlcompressor]],
+[[http://developer.yahoo.com/yui/compressor/][yuicompressor]] and
+[[https://developers.google.com/closure/compiler/][Closure compiler]]. You
+can also read Juriy Zaytsev's articles on
+[[http://perfectionkills.com/optimizing-html/][optimizing HTML]] and
+[[http://perfectionkills.com/experimenting-with-html-minifier/][experimenting
+with html minifier]].
+
+So here is the magic! Once your site is generated, you can run the following command:
+
+#+BEGIN_SRC sh
+htmlcompressor --compress-js --compress-css --recursive --mask '*.js;*.html;*.xml;*.css;*.less' -o /path/to/out/ /path/to/out
+#+END_SRC
+
+
 * Tips
 ** DONE 创建一个博客条目					  :用例:o@blog:
   CLOSED: [2012-01-07 Sat 00:13]
 #+END_SRC
 
 #+end_o_blog_row
+** DONE 在博文中添加图片 					  :用例:o@blog:
+   CLOSED: [2012-08-21 Tue 10:43]
+
+
+#+begin_o_blog_row 8
+
+向博文中添加图片非常简单,因为 [[http://org-mode.org][Org-mode]] 提供了一个特别的链接机制。只要它的路径是
+合法的,图片源文件可以存储在任意位置。在导出页面时,图片文件会被拷贝到与博文相对
+的文件夹下,所有的链接都会修订到新的位置上。
+
+
+#+begin_o_blog_row 5
+
+比如,下面这段代码会将文件 =emacs-logo.png= 从当前路径拷贝到
+=tips/2012/08/21_adding-an-image-into-a-post/emacs-logo.png=.
+
+#+o_blog_row_column 3
+
+
+#+BEGIN_SRC org
+ file:emacs-logo.png
+#+END_SRC
+
+#+end_o_blog_row
+
+
+
+#+o_blog_row_column 4
+[[file:emacs-logo.png]]
+
+#+end_o_blog_row
+
+
+
+HTML 输出结果与下面类似:
+
+#+BEGIN_SRC html
+ <img src="21_adding-an-image-into-a-post/emacs-logo.png"  alt="21_adding-an-image-into-a-post/emacs-logo.png" />
+#+END_SRC
+
+
+最方便的办法是将所有文件都放在一个 =/files/= 文件夹下。然后你可以在其中为每篇博文
+创建一个子目录:
+ - =/files/post1/file1=
+ - =/files/post1/file2=
+ - =/files/post2/file=
+ - ...