Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

添加md语法规范 #39

Merged
merged 4 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/content-guide.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# 内容管理指南
## 内容管理指南

本站除主页外的所有内容都是用 Markdown 格式文档编写,然后由 Hugo 渲染出 HTML 页面。所有的 Markdown 内容都保存在 `content` 目录下。

## 默认模板
Markdown规则与翻译规范参考[Markdown 语法规范](./markdown-guide.md)。

### 默认模板

创建博客的默认模版位于 `archetypes/default.md`。

Expand Down Expand Up @@ -46,7 +48,7 @@ keywords: [""]

注意:页面右侧的“分类”和“标签“显示的是所有博客的,而非当前博客页面的”分类“和”标签“。

## 创建新的博客
### 创建新的博客

如果需要创建新的博客,只需要运行下面的命令:

Expand All @@ -57,7 +59,7 @@ touch content/blog/new-blog/index.md

打开 Markdown 文件,修改文档的元数据,然后就可以欢快的编辑内容了。

## 创建新的 tab 页面
### 创建新的 tab 页面

使用下面的命令创建新的 tab 页面:

Expand All @@ -71,9 +73,9 @@ hugo new new-tab.md

```toml
[[menu.main]]
name = "新的页面"
url = "/new-tab/"
weight = 6
name = "新的页面"
url = "/new-tab/"
weight = 6
```

- name:tab 显示在主页上的名称
Expand Down
227 changes: 227 additions & 0 deletions docs/markdown-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
## Markdown �﷨�淶

### ������½�
```
---
title: This is the title ���±���
---

## This is heading 2 / ��������

### This is heading 3 / ��������

#### This is heading 4 / �ļ�����

```

- ���±���ֻ���ĵ� front matter ��ʹ�� `title` ���Զ��塣��ʹ�� heading 1 (`#`)��
- �½ڱ���ʹ�� heading 2��3 �� 4����������ʹ�� heading 5 (`#####`) �����㼶�ı��⡣
- �������㼶ʹ�ã��� heading 2 �����µ��ӱ���Ӧʹ�� heading 3 ������ 4��
- �����ֶ����������ӱ�š��ֶ��������ά���ɱ���
- Ӣ�ı���ʹ�� sentence case��ֻ������ĸ��ר�����ʴ�д��


### ����

```
������� **�Ӵ�** ��Ҳ�������� __�Ӵ�__

������� *�*

������� ***�Ӵ���б��***
```

- ���ܹؼ�����ʱʹ�� **�Ӵ�**�������� *б��* �����š���
- ���������Ԫ��ʹ�üӴֻ�б�塣Ӧͳһʹ�����ڴ��� `code` ģʽ�������Ԫ�أ�
- �ļ���
- �ļ�·��
- ������
- ������������
- URL

### �б�


�б���Ϊ **�����б�** (ordered list) �� **�����б�** (unordered list)��

- **�����б�**��ǿ��˳������б������������Ի�˳���Ӱ��������ʹ�������б�������ʹ�������б��������ڲ�������ȳ�����
- **�����б�**������˳��Ӱ�����ݡ������������б�����Ҫ�����б��ȳ�����

**ʾ��**
```
�������²��贴�����̣�
1. ׼����������
- JDK 7 �� JDK 8
- Apache Maven 3.2.5 �����ϰ汾
1. ��������ģ��
1. �Ӳ���1
1. �Ӳ���2
1. ���� xxx ����
```
**���**
�������²��贴�����̣�

1. ׼����������
- JDK 7 �� JDK 8
- Apache Maven 3.2.5 �����ϰ汾
1. ��������ģ��
1. �Ӳ���1
1. �Ӳ���2
1. ���� xxx ����


### ����

��ı������ֱ�ӽ�ͼ��


### ����

#### ���ڴ���

```
�ڹ��̵� `pom.xml` �ļ����������� xxx
```

������������ʹ�����ڴ����ǣ�
- �ļ���
- �ļ�·��
- ������
- ������������
- URL



#### �����

```
This is a code block
```

- ָ����������
```
\```java
```


\```xml


\```json

\```sql

```
- ����ռλ��
```
$ cd <your_path>/conf
```


### ����

```
> **˵����**
> ���Ǹ�˵����


> **��Ҫ��**
> ��������Ҫ��Ϣ��


> **��Ҫ��**
> - ��Ҫʹ�����ø�ʽչʾ�������ݡ�
> - �����2
```

> **��Ҫ��** ��Ҫʹ�����ø�ʽչʾ�������ݡ�Ӧʹ�ô���� \`\`\` ��ʽչʾ���롣


### ͼƬ

- ͼƬͳһʹ�� `png` ��ʽ��Դ�ļ������ø�ͼ�� markdown �ļ�����ͳһĿ¼�¡�
- ȷ��ͼƬ�����ж�Ӧ������˵������ֹ������©ͼƬ�е���Ҫ��Ϣ��
- ����ͼƬʱ�ṩ alt text
- ��Ҫ�Խ�ͼ��ʽ�ṩ����ʾ��

### ���


- �������ĵ���ʹ������ȫ�DZ�㡣��Ҫ������Ӣ�ı�㡣
`����һ�����ӡ�This is a sentence.`
`ʹ��ʡ�Ժš��� ������������...`
- ��Ӣ��֮�䱣��һ��Ӣ�Ŀո� `���ĺ� English words ֮�䱣��һ���ո�`

### Ӣ��



## ����

### �����������ô�׼ȷ�����⸴�Ӿ�ʽ

**���� "����" / "����"**
- **����**��can / could������ʾ�û���ѡ��Ȩ��������Ҳ���Բ�������ͨ������������ɡ�
���磺`����ͨ���޸�xx����ֵ���yy����` ������������ʣ��޸IJ���ֵ�Ƿ�Ϊ���yy���õı��벽�裿��������ô����Ĭ������������ģ��޸IJ����Ƿ���������õ�Ψһ����������������ʲô�����ѡ��
- **����**��must������ʾ��Ҫ������������Ӱ������
���磺`Ҫʹ�� xxx�������ڹ��������� xxx ����` ��ʾ������������������޷�ʹ�� xxx��
- ��Ҫ��need��������ʹ�á�


**����ʹ�� ��һ�㡱��������**
���磺`һ�����` ��ָ�������������������������ģ�ʲô�����»�������⣿������δ�����


### ��������

- ����`�������û��ʲô�����,����ʹ�ü���` ��ȥ����仰��Ӱ�����⣩


### ������ﻯ����

### ��ȷʹ�� ���ġ����ء����á�

### ʹ�ô���ʱҪ����ȷ��ָ�����󣬱�������


- ����`������Ϊ true`
- ��ȷ��`��xxx��������Ϊ true`


### ����ʹ�� �����ǡ�

����ʹ����ʹ�� / �ڶ��˳ơ�
- ���󣺡����Ƿ���һ������
- ��ȷ������������


### ����ʹ����д

- Ϊ�������ж��߶����׶����ĵ�������ʹ��ȫ�ơ����磺ʹ�� Kubernetes, ������ k8s��
- ����������д�����磺"i.e." "e.g." "etc." "et al."

### ʹ�������䣬���ⱻ����̬

- ����`�����յ��󣬷�������ʼִ��xxx`
- ��ȷ��`�������յ�����󣬿�ʼִ��xxx`

**���⣺**

- ǿ��״̬���Ƕ������磺`ȷ���ļ��ѱ����档`
- û�б�Ҫ�ἰ�������ִ���ߡ�

### ����ֱ�ӣ�����񶨾䣬���䲻Ҫʹ��˫�ط񶨾�


- ����`û�й���ԱȨ�޵��û�����ɾ���ļ���`
- ��ȷ��`Ҫɾ���ļ����û�����ӵ�й���ԱȨ�ޡ�`


### �������˻�����
- ����`xx�������߷�����Ҫִ��xxx`
- ��ȷ��``

### ��ֹ�漰�Ա𡢷��ɡ��Ļ���

- ��Ҫʹ�á�����������/���������Ա�ָ���Ĵʡ����ȸ�д���ӣ����ɱ���ʱ��ʹ�ø��������ǡ����ߡ��û�����
- ��Ҫ�ἰʥ�������ڵ����ض��Ļ������ij�����