From 467f9187fd95ff156551eada03a373c2a29cebec Mon Sep 17 00:00:00 2001 From: hotoo Date: Mon, 21 Jul 2014 18:08:51 -0800 Subject: [PATCH 1/3] Update documentation --- .gitignore | 2 - Makefile | 10 --- README.md | 20 ------ content/index.md | 67 ------------------ content/spec.md | 76 -------------------- content/usage.md | 40 ----------- index.html | 103 ++++++++++++++++++++++++++++ nico.js | 32 --------- spec.html | 79 +++++++++++++++++++++ {theme/static => static}/one.css | 0 {theme/static => static}/one.js | 0 {theme/static => static}/site.css | 0 {theme/static => static}/syntax.css | 0 {theme/static => static}/yue.css | 0 theme/Makefile | 2 - theme/README.md | 70 ------------------- theme/templates/_disqus.html | 10 --- theme/templates/_duoshuo.html | 12 ---- theme/templates/archive.html | 41 ----------- theme/templates/feed.html | 20 ------ theme/templates/layout.html | 66 ------------------ theme/templates/page.html | 17 ----- theme/templates/post.html | 32 --------- theme/templates/tagcloud.html | 33 --------- theme/theme.js | 10 --- usage.html | 71 +++++++++++++++++++ 26 files changed, 253 insertions(+), 560 deletions(-) delete mode 100644 .gitignore delete mode 100644 Makefile delete mode 100644 README.md delete mode 100644 content/index.md delete mode 100644 content/spec.md delete mode 100644 content/usage.md create mode 100644 index.html delete mode 100644 nico.js create mode 100644 spec.html rename {theme/static => static}/one.css (100%) rename {theme/static => static}/one.js (100%) rename {theme/static => static}/site.css (100%) rename {theme/static => static}/syntax.css (100%) rename {theme/static => static}/yue.css (100%) delete mode 100644 theme/Makefile delete mode 100644 theme/README.md delete mode 100644 theme/templates/_disqus.html delete mode 100644 theme/templates/_duoshuo.html delete mode 100644 theme/templates/archive.html delete mode 100644 theme/templates/feed.html delete mode 100644 theme/templates/layout.html delete mode 100644 theme/templates/page.html delete mode 100644 theme/templates/post.html delete mode 100644 theme/templates/tagcloud.html delete mode 100644 theme/theme.js create mode 100644 usage.html diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 33232bc..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.DS_Store -_site/ diff --git a/Makefile b/Makefile deleted file mode 100644 index 4df16c6..0000000 --- a/Makefile +++ /dev/null @@ -1,10 +0,0 @@ - -watch: - @nico server --watch -build: - @nico build -publish: clear build - @ghp-import _site - @git push origin gh-pages -clear: - @rm -rf _site diff --git a/README.md b/README.md deleted file mode 100644 index a17b4dd..0000000 --- a/README.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Vim 中文计划 - ----- - -Vim 中文文档计划旨在翻译 Vim 软件及其优秀插件的文档,为中文用户提供些许便利。 - -## 如何贡献 - -1. fork 有兴趣的仓库,并提交 Pull Request. -1. 提交 Issues -1. Code Review 并给出建议。 -1. 如果翻译新的插件,请提交 [Issues](https://github.com/vimcn/vimcn.github.com/issues) - 申请创建新仓库,我将会尽快准备好新的仓库,并授权给你。申请格式: - - ``` - 插件名称: - 插件地址: - 贡献者列表:默认只添加提交 Issues 者。 - ``` diff --git a/content/index.md b/content/index.md deleted file mode 100644 index 3397892..0000000 --- a/content/index.md +++ /dev/null @@ -1,67 +0,0 @@ - -# Vim 中文计划 - ----- - -这是个业余的兴趣项目,主要是由各个成员翻译自己熟悉、喜爱推荐的优秀脚本的帮助文档, -也可以附上介绍,和一些小技巧之类。 - -欢迎有兴趣的朋友加入翻译或推荐脚本。参加方法:(建议使用自己的Gmail) -邮件你的 github id 到 `hotoo.cn+vimdocs[AT]gmail.com` - -Vim Script 即 Vim 脚本,又称 Vim 插件(Plugin),以下统称“脚本”。 - -* [项目源码](https://github.com/vimcn) -* [翻译规范 & 约定](spec.md) -* [安装 & 使用](usage.md) -* [翻译计划](https://github.com/vimcn/vimcn.github.com/wiki/PLAN) - -## 广告 - -* [Vim 资料收集](http://wiki.hotoo.me/Vim.html) -* [欢迎加入 Vim 的 Gtalk 群](http://blog.hotoo.me/Gtalk-group-for-Vim.html) - - -## 项目 - - -
- - - - diff --git a/content/spec.md b/content/spec.md deleted file mode 100644 index 21dbec1..0000000 --- a/content/spec.md +++ /dev/null @@ -1,76 +0,0 @@ - -# 文档翻译规范 & 约定 - ----- - -为了规范文档,提高文档质量和一致性,文档格式建议如下: - -## 翻译方法 - -文件结构: - -``` -+- /doc -| +- {script_name}.cnx -| `- {script_name}.txt -`- /README.md -``` - -* 翻译的文档与原始文档同名,后缀改为 `.cnx` -* 保留(一般是英文)原始文档 `.txt` 文件。 -* 文件放置到 `/doc` 目录中(如 `/doc/vimwiki.cnx`)。 - -## 规范 & 约定 - -* 每行不超过 80 列。 -* 中文与英文之间用英文空格间隔。 -* 恰当的使用中文标点,如逗号(,),句号(。),引号(“”)。 -* 使用空格而不是 <Tab> -* 尽量保持原始文档的风格。 - -## 文档相关 - -Vim 文档由 tags 来链接各个相关的帮助信息,tags 是包含在两个星号之间的关键字, -在 Vim 中使用 :helptags 命令会根据这些信息生成 tags: - -``` -*help-tags* -``` - -要链接到这些 tags,则将关键字放置在两条竖线之间: - -``` -|help-tags| -``` - -Vim 文档中如果有代码,可以放置在两个相对的尖括号间,起始括号之后不能有其他字符, -每行代码也需要有空白开始。 - -``` -下面是实例代码: > -this is code. -more codes. -< -``` - -除代码外,标点符号建议使用全角的中文标点,如“,”,“。”等。 - -## 署名 - -建议在自己参与的文档上署名。署名一般是留下自己的真实姓名或者虚拟的昵称,和自己 -常用的邮箱地址。这一个是对自己所作付出的认可,也是对自己的工作负责,另外如果其 -他人有问题,可以方便和你联系。一般格式为: - -``` -闲耘™ (hotoo.cn[AT]gmail.com) -``` - -或者: - -``` -闲耘™ -``` - -中间的 `[AT]` 是为了防止垃圾邮件,你也可以直接使用 `@` 或者其他容易识别的字符。 - -如果你有建议,请联系 `hotoo.cn[AT]gmail.com` diff --git a/content/usage.md b/content/usage.md deleted file mode 100644 index dce4f1b..0000000 --- a/content/usage.md +++ /dev/null @@ -1,40 +0,0 @@ - -# 安装 & 使用 - ----- - -## 如果安装了 Vundle - -* 在 vimrc 中写入 `Plugin "vimcn/{script_name}.cnx"`。 -* 执行 `:PluginInstall` 命令即可。 - -## 手工方式 - -* 下载(或 git clone) [Vim script 中文文档(*.cnx)](https://github.com/vimcn) -* 放至 Vim 用户目录下的 doc 目录中 - - * for Windows: `$VIM/vimfiles/doc` - * for Unix-like(Linux, Mac OSX): `~/.vim/doc` - > 以下统称 `$VIM/vimfiles` 和 `~/.vim` 目录为 `runtime` 目录。 -* 在 Vim 环境中运行 `helptags` 命令生成 tags: - - for Windows: - - ``` - :helptags $Vim/vimfiles/doc - ``` - - for Unix-like: - - ``` - :helptags ~/.vim/doc - ``` - -* 设置 Vim 使用的文档语言,默认是英文。 - - ``` - :set helplang=cn - ``` - - 如果在 vimrc 设置无效,可以查看并修改 `runtime/plugin/vimcdoc.vim` - 中的设置,之前安装有 Vim 中文帮助则可以忽略这步。 diff --git a/index.html b/index.html new file mode 100644 index 0000000..274beb2 --- /dev/null +++ b/index.html @@ -0,0 +1,103 @@ + + + + + + + + Vim 中文计划 + + + + + +
+
+

Vim 中文计划

+

这是个业余的兴趣项目,主要是由各个成员翻译自己熟悉、喜爱推荐的优秀脚本的帮助文档, +也可以附上介绍,和一些小技巧之类。

+

欢迎有兴趣的朋友加入翻译或推荐脚本。参加方法:(建议使用自己的Gmail) +邮件你的 github id 到 hotoo.cn+vimdocs[AT]gmail.com

+

Vim Script 即 Vim 脚本,又称 Vim 插件(Plugin),以下统称“脚本”。

+ +

广告

+

项目

+
+ + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/nico.js b/nico.js deleted file mode 100644 index 0cfd554..0000000 --- a/nico.js +++ /dev/null @@ -1,32 +0,0 @@ -exports = module.exports = { - "sitename": "Vim 中文计划", - "source": "content", - "output": "_site", - "theme": "theme", - "permalink": "{{directory}}/{{filename}}", - "navigation":[ - { "link":"/spec.html", "title":"翻译规范 & 约定" }, - { "link":"/usage.html", "title":"安装 & 使用" }, - { "link":"https://github.com/vimcn/vimcn.github.com/wiki/PLAN", "title":"翻译计划" } - ], - "google": { - "id": "UA-15922433-1", - "domain": "vimcn.github.io" - }, - "github": "https://github.com/vimcn", - "writers": [ - "nico.PageWriter", - "nico.PostWriter", - "nico.FileWriter", - "nico.StaticWriter" - ] -} - - -exports.filters = { - fixlink: function(html) { - // format permalink, ends without .html - html = html.replace(/(href="[^"]+)\.md(">)/ig, "$1$2"); - return html; - } -} diff --git a/spec.html b/spec.html new file mode 100644 index 0000000..5ec8a11 --- /dev/null +++ b/spec.html @@ -0,0 +1,79 @@ + + + + + + + + 文档翻译规范 & 约定 + + + + + +
+
+

文档翻译规范 & 约定

+

为了规范文档,提高文档质量和一致性,文档格式建议如下:

+

翻译方法

文件结构:

+
+- /doc
+|  +- {script_name}.cnx
+|  `- {script_name}.txt
+`- /README.md
    +
  • 翻译的文档与原始文档同名,后缀改为 .cnx
  • +
  • 保留(一般是英文)原始文档 .txt 文件。
  • +
  • 文件放置到 /doc 目录中(如 /doc/vimwiki.cnx)。
  • +
+

规范 & 约定

    +
  • 每行不超过 80 列。
  • +
  • 中文与英文之间用英文空格间隔。
  • +
  • 恰当的使用中文标点,如逗号(,),句号(。),引号(“”)。
  • +
  • 使用空格而不是 <Tab>
  • +
  • 尽量保持原始文档的风格。
  • +
+

文档相关

Vim 文档由 tags 来链接各个相关的帮助信息,tags 是包含在两个星号之间的关键字, +在 Vim 中使用 :helptags 命令会根据这些信息生成 tags:

+
*help-tags*

要链接到这些 tags,则将关键字放置在两条竖线之间:

+
|help-tags|

Vim 文档中如果有代码,可以放置在两个相对的尖括号间,起始括号之后不能有其他字符, +每行代码也需要有空白开始。

+
下面是实例代码: >
+this is code.
+more codes.
+<

除代码外,标点符号建议使用全角的中文标点,如“,”,“。”等。

+

署名

建议在自己参与的文档上署名。署名一般是留下自己的真实姓名或者虚拟的昵称,和自己 +常用的邮箱地址。这一个是对自己所作付出的认可,也是对自己的工作负责,另外如果其 +他人有问题,可以方便和你联系。一般格式为:

+
闲耘™ (hotoo.cn[AT]gmail.com)

或者:

+
闲耘™ <hotoo.cn[AT]gmail.com>

中间的 [AT] 是为了防止垃圾邮件,你也可以直接使用 @ 或者其他容易识别的字符。

+

如果你有建议,请联系 hotoo.cn[AT]gmail.com

+
+
+
+ + + + + \ No newline at end of file diff --git a/theme/static/one.css b/static/one.css similarity index 100% rename from theme/static/one.css rename to static/one.css diff --git a/theme/static/one.js b/static/one.js similarity index 100% rename from theme/static/one.js rename to static/one.js diff --git a/theme/static/site.css b/static/site.css similarity index 100% rename from theme/static/site.css rename to static/site.css diff --git a/theme/static/syntax.css b/static/syntax.css similarity index 100% rename from theme/static/syntax.css rename to static/syntax.css diff --git a/theme/static/yue.css b/static/yue.css similarity index 100% rename from theme/static/yue.css rename to static/yue.css diff --git a/theme/Makefile b/theme/Makefile deleted file mode 100644 index 38aa22a..0000000 --- a/theme/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -build-css: - @cat static/yue.css static/syntax.css static/site.css > static/one.css diff --git a/theme/README.md b/theme/README.md deleted file mode 100644 index 514c3e1..0000000 --- a/theme/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# One Theme - -The One Theme for [nico](http://lab.lepture.com/nico/) - -This theme requires nico 0.4.6+ now. - -## Configuration - -The basic configuration for a blog: - -``` -{ - "source": "content", - "output": "_site", - "theme": "_themes/one", - "sitename": "Nico", - "siteurl": "http://lab.lepture.com/nico/", - "permalink": "{{directory}}/{{filename}}.html", - "writers": [ - "nico.PostWriter", - "nico.PageWriter", - "nico.FileWriter", - "nico.StaticWriter", - "nico.ArchiveWriter", - "nico.YearWriter", - "nico.TagWriter", - "nico.DirectoryWriter", - "nico.FeedWriter" - ] -} -``` - -Additional configuration this theme: - -- tagline: A description of your site. -- touchIcon: Link of Apple Touch Icon. -- hideNico: Hide nico copyright at bottom. -- github: Github link, a github fork badge will display. -- navigation: A array of items of navigation. - -Navigation example: - -``` -{ - "navigation": [ - {"title": "Life", "link": "/life/"}, - {"title": "Work", "link": "/work/"} - ] -} -``` - -## Comment - -Comment is available for posts. This theme support disqus and duoshuo. - -Configure a disqus short name: - -``` -{ - "disqus": "short name" -} -``` - -If you prefer duoshuo: - -``` -{ - "duoshuo": "short name" -} -``` diff --git a/theme/templates/_disqus.html b/theme/templates/_disqus.html deleted file mode 100644 index ea44796..0000000 --- a/theme/templates/_disqus.html +++ /dev/null @@ -1,10 +0,0 @@ -
- diff --git a/theme/templates/_duoshuo.html b/theme/templates/_duoshuo.html deleted file mode 100644 index 88f0c0e..0000000 --- a/theme/templates/_duoshuo.html +++ /dev/null @@ -1,12 +0,0 @@ -
- diff --git a/theme/templates/archive.html b/theme/templates/archive.html deleted file mode 100644 index 9e6792c..0000000 --- a/theme/templates/archive.html +++ /dev/null @@ -1,41 +0,0 @@ -{%- extends "layout.html" -%} -{%- block title %}{{pagination.title}}{% endblock %} - -{%- block document %} -

{{pagination.title}}

-
- {%- set year = 0 %} - - {%- for item in pagination.items %} - - {%- if config.writers|enabled('YearWriter') %} - {%- if year != item.pubdate.year %} - {%- set year = item.pubdate.year %} - {{ year }} - {%- endif %} - {%- endif %} - -
-

- - {{item.title}} -

- {% if item.meta.description %} -
- {{ item.meta.description }} -
- {% endif %} -
- {%- endfor %} - - -
-{% endblock -%} diff --git a/theme/templates/feed.html b/theme/templates/feed.html deleted file mode 100644 index 85e7289..0000000 --- a/theme/templates/feed.html +++ /dev/null @@ -1,20 +0,0 @@ - - - {{ config.sitename }} - - - {{ content_url(config.siteurl, feed.filepath) }} - {% for post in feed.posts -%} - - <![CDATA[{{ post.title }}]]> - {%- set permalink = permalink_url(post) %} - - {{ post.pubdate|xmldatetime }} - {{ post.pubdate|xmldatetime }} - {{ content_url(config.siteurl, permalink) }} - - - - - {%- endfor %} - diff --git a/theme/templates/layout.html b/theme/templates/layout.html deleted file mode 100644 index 580f837..0000000 --- a/theme/templates/layout.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - {% block title%}{% endblock %} - {%- if config.touchIcon %} - - {%- endif %} - {%- if config.feedurl %} - - {%- endif %} - - {%- block afterstyle %}{% endblock %} - {%- if config.google %} - - {%- endif %} - - -
-
-
- {{config.sitename}} - {%- if config.tagline %} - - {{ config.tagline }} - {%- endif %} -
- {%- if config.navigation %} - - {%- endif %} -
-
-
- {%- block document %} - {%- endblock %} -
- - {%- if config.github %} - - {%- endif %} - - - diff --git a/theme/templates/page.html b/theme/templates/page.html deleted file mode 100644 index 4071171..0000000 --- a/theme/templates/page.html +++ /dev/null @@ -1,17 +0,0 @@ -{%- extends "layout.html" -%} -{%- block title %}{{post.title}}{% endblock %} - -{%- block document %} -
-

{{post.title}}

- {%- if post.description %} -
{{post.description}}
- {%- endif %} -
{{post.html | fixlink}}
- {%- if post.meta.source %} - - {%- endif %} -
-{% endblock -%} diff --git a/theme/templates/post.html b/theme/templates/post.html deleted file mode 100644 index b681fff..0000000 --- a/theme/templates/post.html +++ /dev/null @@ -1,32 +0,0 @@ -{%- extends "layout.html" -%} -{%- block title %}{{post.title}}{% endblock %} - -{%- block document %} -
-

{{post.title}}

- {%- if post.meta.description %} -
{{post.meta.description}}
- {%- endif %} -
{{post.html | fixlink}}
- - - {%- if config.disqus %} - {%- include "_disqus.html" %} - {%- endif %} - {%- if config.duoshuo %} - {%- include "_duoshuo.html" %} - {%- endif %} -
-{% endblock -%} diff --git a/theme/templates/tagcloud.html b/theme/templates/tagcloud.html deleted file mode 100644 index 429286e..0000000 --- a/theme/templates/tagcloud.html +++ /dev/null @@ -1,33 +0,0 @@ -{%- extends "layout.html" -%} -{%- block title %}{{title}}{% endblock %} - -{%- block document %} -

{{ title }}

- -
- {%- for items in tags %} - {{ loop.key }} ({{items|length}}) - {%- endfor %} -
- -
- {%- for items in tags %} - {{ loop.key }} - - {%- for item in items %} -
-

- - {{item.title}} -

- {% if item.meta.description %} -
- {{ item.meta.description }} -
- {% endif %} -
- {%- endfor %} - {%- endfor %} - -
-{% endblock -%} diff --git a/theme/theme.js b/theme/theme.js deleted file mode 100644 index c4f55f5..0000000 --- a/theme/theme.js +++ /dev/null @@ -1,10 +0,0 @@ -exports.name = 'one'; -exports.version = '0.2'; - -exports.filters = { - enabled: function(writers, name) { - return writers.filter(function(writer) { - return ~writer.indexOf(name) - }).length; - } -}; diff --git a/usage.html b/usage.html new file mode 100644 index 0000000..21eee0c --- /dev/null +++ b/usage.html @@ -0,0 +1,71 @@ + + + + + + + + 安装 & 使用 + + + + + +
+
+

安装 & 使用

+

如果安装了 Vundle

    +
  • 在 vimrc 中写入 Plugin "vimcn/{script_name}.cnx"
  • +
  • 执行 :PluginInstall 命令即可。
  • +
+

手工方式

    +
  • 下载(或 git clone) Vim script 中文文档(*.cnx)
  • +
  • 放至 Vim 用户目录下的 doc 目录中

    +
      +
    • for Windows: $VIM/vimfiles/doc
    • +
    • for Unix-like(Linux, Mac OSX): ~/.vim/doc
      +

      以下统称 $VIM/vimfiles~/.vim 目录为 runtime 目录。

      +
      +
    • +
    +
  • +
  • 在 Vim 环境中运行 helptags 命令生成 tags:

    +

    for Windows:

    +
    :helptags $Vim/vimfiles/doc

    for Unix-like:

    +
    :helptags ~/.vim/doc
  • +
  • 设置 Vim 使用的文档语言,默认是英文。

    +
    :set helplang=cn

    如果在 vimrc 设置无效,可以查看并修改 runtime/plugin/vimcdoc.vim +中的设置,之前安装有 Vim 中文帮助则可以忽略这步。

    +
  • +
+
+
+
+ + + + + \ No newline at end of file From dc5542a767bbacdf5a5fcba3412aff52046953a1 Mon Sep 17 00:00:00 2001 From: hotoo Date: Mon, 21 Jul 2014 18:12:26 -0800 Subject: [PATCH 2/3] Update documentation --- index.html | 2 +- spec.html | 2 +- usage.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 274beb2..493a373 100644 --- a/index.html +++ b/index.html @@ -95,7 +95,7 @@

项目