Commit c1513935 authored by whzecomjm's avatar whzecomjm
Browse files

add blog apps.

parent 90a19f12
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -37,6 +37,13 @@
- [Texmacs 笔记](/latex/texmacs.md)
- [Tikzedt](/latex/tikzedt.md)

## 博客程序
- [ ] [gor](/blog/gor.md)
- [hexo](/blog/exo.md)
- [ ] [hugo](/blog/hugo.md)
- [ ] [ink](/blog/ink.md)
- [typecho](/blog/typecho.md)
- [ ] [wiki in box](/blog/wiki.md)

## html-css 
- [301的几种实现方式](/html-css/301.md)

blog/gor.md

0 → 100644
+34 −0
Original line number Diff line number Diff line
# Gor


感谢你使用Gor编写博客。文件开头是当前文章的元数据

1. date为自动生成, 当然,你可以修改,这是你的自由
2. permalink 可以是固定地址,也可以由gor为你自动生成
3. categories 就是分类, 可以多个
4. tags 同理,多个标签也是很常见的

## 使用方法

请确保文件使用UTF8 without BOM编码,使用方法如下:

	gor post 文章标题 // 新建一篇博客
	gor compile //编译
	gor http //预览
	gor preview //监视文章变动的预览

然后打开你的浏览器,访问 http://127.0.0.1:8080 来预览

## 其它隐藏技巧

-  在根目录新建`others`文件夹,放置于此的文件编译后会自动添加到`compiled`文件夹。
-  在文中使用`{:toc}`即可调用目录,在config.yml添加如下代码后可以更改目录名为中文名`目录`
       markdown:
         toc_title: '<h1>目录:</h1>'

你将使用Markdown来编写博客
-------------------------

[Markdown 语法中文版](http://wowubuntu.com/markdown/) 能让你快速入门其语法,相信[MarkdownPad](http://markdownpad.com)[liteide](http://code.google.com/p/liteide/)会是你的编写博客的好帮手。

用gor编写博客将会是一件很开心的事,如果有任何意见或建议,欢迎到 [gor的官网](http://github.com/wendal/gor) 提交issue。

blog/hexo.md

0 → 100644
+49 −0
Original line number Diff line number Diff line
# Hexo

以下是 Hexo 的常用链接:

- [使用文档](http://hexo.io/docs/)
- [Bug 反馈](http://hexo.io/docs/troubleshooting.html) 
- [GitHub 项目](https://github.com/hexojs/hexo).

## 常用指令

``` bash
$ hexo new "My New Post" //创建一个新文章
$ hexo server //调试
$ hexo generate //生成静态文件
$ hexo deploy //发布
$ hexo clean //清空缓存 (更换主题以后常用到)
```

## 安装 Hexo 详细指南

- <http://wsgzao.github.io/post/hexo-guide/>
- <http://c4fun.cn/blog/2014/03/03/use-hexo-blog/>

## Hexo 主题推荐

在这里我推荐一些好看的 Hexo 主题,列表如下:

* Air
* Alex
* Alberta 
* Apollo
* [Codeland](https://github.com/xing5/hexo-theme-codeland)
* [FreeMind](https://github.com/wzpan/hexo-theme-freemind)
* [icarus](https://github.com/ppoffice/hexo-theme-icarus)
* [Landscape plus](https://github.com/xiangming/landscape-plus)
* Light
* Lightum
* [Next](https://github.com/iissnan/hexo-theme-next)
* Noderce
* Oishi
* Phase 
* [Strict](https://github.com/17/hexo-theme-strict) 
* Tyrant 
* TKL 
* Winterland
* [Wixo](https://github.com/wzpan/hexo-theme-wixo)
* Yilia

blog/hugo.md

0 → 100644
+73 −0
Original line number Diff line number Diff line
# Hugo

[toc]

[Hugo](https://gohugo.io/)是一个用Go语言编写的静态网站生成器,它使用起来非常简单,相对于Jekyll复杂的安装设置来说,Hugo仅需要一个二进制文件hugo(hugo.exe)即可轻松用于本地调试和生成静态页面。Hugo生成静态页面的效率很高,比同类的静态网站生成器Jekyll甚至Hexo都要快不少。

- Hugo只有一个二进制文件(比如Windows里只是一个hugo.exe)
- Hugo可以将你写好的MarkDown格式的文章自动转换为静态的网页。
- Hugo内置web服务器,可以方便的用于本地调试。

## 开始使用
下载Hugo.exe以后就可以使用了,不需要其他的任何环境。不过为了能方便使用,首先将hugo的地址添加到系统环境变量Path中。之后可以新建hugo博客目录了。

    hugo new site path/to/site

Hugo默认生成的网站是没有任何皮肤模板的,需要先下载主题皮肤。可以下载所有皮肤,也可以只下载单个皮肤,下载后将他们放在 themes 文件夹内。为了方便起见,可以在 config.toml 添加一条主题信息。新建博客页面或者日志,之后输入`hugo`就能生成静态文件了,如果需要预览,hugo也提供本地服务器预览:

    git clone --recursive "https://github.com/spf13/hugoThemes" themes #下载主题
    hugo new about.md #创建一个页面
    hugo new post/first.md  #创建一个博客日志
    hugo server --theme="theme name" --buildDrafts --watch # –watch或者-w 监控到文章的改动自动刷新浏览器,--buildDrafts 是为了将草稿也纳入预览的范围中。

需要注意一个问题,预览也会生成静态文件,并且里面的baseurl为`http://localhost:1313/`,所以在部署之前,一定要记得使用指令`hugo`

## 网站配置文件

config.toml是网站的配置文件,这是一个TOML文件,如果你不喜欢这种格式,你可以将config.toml替换为YAML格式的config.yaml,或者json格式的config.json。hugo都支持。以下是我的维基站用的 config.toml 文件:

```
baseurl = "http://wiki.whzecomjm.com"
languageCode = "en-us"
title = "Whziki"
disablerss = true
theme = "doc"
DisablePathToLower = true
publishdir = "public/public"

[params]
  description = "这里是whzecomjm的Wiki站—— Whziki。"
  author = "whzecomjm"
```

## 文档结构

执行`hugo new`完后,会在content/post目录自动生成一个MarkDown格式的first.md文件:

    +++
    date = "2015-01-08T08:36:54-07:00"
    draft = true
    title = "first"
    +++

`+++`可以替换为Jekyll/Hexo一样的`---`,里面的内容是这篇文章的一些信息。

## 官方资料

- 官方文档:https://gohugo.io/overview/introduction/
- 皮肤列表:https://github.com/spf13/hugoThemes

常用文档:

* [Configuring Hugo](https://gohugo.io/overview/configuration/)
* [Front Matter](https://gohugo.io/content/front-matter/)
* [Menus](https://gohugo.io/extras/menus/)
* [Template Variables](https://gohugo.io/templates/variables/)
* [Hosting on GitHub Pages](https://gohugo.io/tutorials/github-pages-blog/)

## 常见问题

1. 默认URL全部被转成了小写,使用`DisablePathToLower = true`可以保留区分大小写url。
2. 从hexo迁移到hugo,markdown文件只需要在第一行加上`---`即可。

参考:[使用hugo搭建个人博客站点](http://blog.coderzh.com/2015/08/29/hugo/)
 No newline at end of file

blog/ink.md

0 → 100644
+95 −0
Original line number Diff line number Diff line
# 简洁的静态博客构建工具 —— 纸小墨

[toc]

## 纸小墨简介

纸小墨(InkPaper)是一个使用GO语言编写的静态博客构建工具,可以快速搭建博客网站。优点是无依赖跨平台,配置简单构建快速,注重于简洁易用与排版优化。

![纸小墨 - 简洁的静态博客构建工具](http://www.inkpaper.io/blog/images/example.png)

### 开始上手
- 下载并解压 [Ink](http://www.inkpaper.io/),运行命令 `ink preview` (linux 系统下使用`./ink preview`即可)
- 使用浏览器访问 `http://localhost:8000` 预览

### 配置网站
编辑`config.yml`,使用如下格式

``` yaml
site:
    title: 网站标题
    subtitle: 网站子标题
    limit: 每页可显示的文章数目
    theme: 网站主题目录
    disqus: Disqus评论插件账户名
    root: 网站根路径 #可选
    lang: 网站语言 #支持en, zh,可在theme/lang.yml配置
authors:
    作者ID:
        name: 作者名称
        intro: 作者简介
        avatar: 作者头像路径
build:
    port: 预览端口
    copy:
        - 构建时将会复制的目录/文件
    publish: |
        ink publish 命令将会执行的脚本
```

### 创建文章
`source`目录中建立任意`.md`文件(可置于子文件夹),使用如下格式

``` yaml
title: 文章标题
date: 年-月-日 时:分:秒 #创建时间,可加时区如" +0800"
update: 年-月-日 时:分:秒 #更新时间,可选,可加时区如" +0800"
author: 作者ID
cover: 题图链接 #可选
draft: false #草稿,可选
top: false #置顶文章,可选
preview: 文章预览,也可在正文中使用<!--more-->分割 #可选
tags: #可选
    - 标签1
    - 标签2

---

Markdown格式的正文
```

### 发布博客
- 在博客目录下运行`ink publish`命令自动构建博客并发布
- 或运行`ink build`命令将生成的`public`目录下的内容手动部署

> Tips: 当使用`ink preview`命令时,`source`目录中文件发生变化,会自动重新构建博客,刷新浏览器以更新

## 定制支持

### 修改主题

默认主题使用coffee, less编写,修改对应文件后,需要在`theme`目录下运行`gulp`命令重新编译,使用`ink build`命令构建时默认将会复制js, css目录到`public`目录下。

页面包含`page.html`(文章列表)及`article.html`(文章)等,所有页面均支持[GO语言HTML模板](http://golang.org/pkg/html/template/)语法,可引用变量。

### 添加页面

`source`目录下创建的任意`.html`文件将被复制,这些文件中可引用`config.yml`中site字段下的所有变量。

### 博客迁移(Beta)

Ink提供简单的Jeklly/Hexo博客文章格式转换,使用命令:
``` shell
ink convert /path/_posts
```

## 主题

- Pure: [https://github.com/Xdatk/ink-pure](https://github.com/Xdatk/ink-pure)
- Werttin: [https://github.com/Skimige/ink_Werttin](https://github.com/Skimige/ink_Werttin)

## 反馈建议

请报告至 [https://github.com/InkProject/ink/issues](https://github.com/InkProject/ink/issues)

Loading