Skip to content

Commit

Permalink
add blog list && add bolg config
Browse files Browse the repository at this point in the history
  • Loading branch information
Zzm0809 committed May 11, 2022
1 parent 069a1bc commit be3065f
Show file tree
Hide file tree
Showing 5 changed files with 189 additions and 25 deletions.
49 changes: 28 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,61 @@ $ yarn build / npm run build
- 只需在根目录下的 `blog` 文件夹下添加新的 `.md` 文件 , 需要注意点如下:

```text
方式1:
1. 文件命名格式: `YYYY-MM-DD-title.md`
2. 例如: `2020-01-01-hello-world.md`
3. `2020-01-01` 可自动识别为博客创建时间
4. `hello-world` 可自动识别为博客标题
博客标题会自动显示在博客页面的博客列表中
方式2:
1. 文件命名格式: `title.md`
2. 例如: `hello-world.md`
3. 在文件头部信息中 添加属性 date: 2019-05-28 # 博客创建时间
```
- 博客作者的作者信息可以添加到 `authors.yml` 中 ,格式如下:

```text
dinky: # 博客作者
name: dinky # 博客作者名称
title: Copyright © 2022 Dinky, Inc. DataLinkDC. # 博客作者标题
name: aiwenmo # 博客作者名称
title: Dinky 项目发起人 # 博客作者标题
url: https://github.com/DataLinkDC/dlink # 博客作者主页
image_url: http://www.aiwenmo.com/dinky/docs/dinky_logo.svg # 博客作者头像
```

- 作者信息定义完成后 即可在 `md` 文件顶部引用 eg: `authors: [dinky]`
- 作者信息定义完成后 即可在 `md` 文件顶部引用 eg: `authors: [dinky]`
- 文档头部信息引用模板:

```text
# 注意 此处定义信息 必须从文档的顶部(第一行)开始
---
slug: first-blog-post # 博客 slug 等于 文件名中自动解析的 title
title: First Blog Post # 标题 可覆盖文件名称中的自动解析的 title
authors: [dinky] # 可引用 authors.yml 定义的作者名称
tags: [Hudi, Flink] # 文档所属标签 可选项
date: 2019-05-28 # 该文章的创建日期 如若文档名称中已定义日期 此处可不写 此处高优先级
authors: [dinky] # 可引用 authors.yml 定义的作者名称 可以多个作者 逗号隔开
tags: [Hudi, Flink] # 文档所属标签 可选项(可多个)
date: 2022-05-01 # 该文章的创建日期
---
注意 : 如果不像在 authors.yml 中定义作者信息 模板如下:
---
slug: first-blog-post # 博客 slug 等于 文件名中自动解析的 title
title: First Blog Post # 标题 可覆盖文件名称中的自动解析的 title
slug: first-blog-post # 博客 slug 等于文件名
title: First Blog Post # 博客 标题
authors:
name: dinky # 博客作者名称
title: Copyright © 2022 Dinky, Inc. DataLinkDC. # 博客作者标题
name: aiwenmo # 博客作者名称
title: Dinky 项目发起人 # 博客作者标题
url: https://github.com/DataLinkDC/dlink # 博客作者主页
image_url: http://www.aiwenmo.com/dinky/docs/dinky_logo.svg # 博客作者头像
tags: [Hudi, Flink] # 文档所属标签 可选项
date: 2019-05-28 # 该文章的创建日期 如若文档名称中已定义日期 此处可不写 此处高优先级
tags: [Hudi, Flink] # 文档所属标签 可选项(可多个且无需定义)
date: 2022-05-01 # 该文章的创建日期
---
```
为了更方便得提交您的文章 博客相关的格式如下:
```text
---
slug: long-blog-post
title: Blog Title
authors: [aiwenmo]
tags: [hello, docusaurus]
---
输入简短的该博客描述信息
<!--truncate--> # 注意:此处用于主页截断 上述的描述信息 以达到首页的博客列表limit 此行必须写
正文
```

## 文档目录结构

Expand Down
138 changes: 138 additions & 0 deletions blog/first-blog-post.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,142 @@ the first blog post
the first blog post
the fi

<!--truncate-->

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog postthe first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi

# hdjshd
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the first blog post
the fi
6 changes: 5 additions & 1 deletion blog/welcome/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
slug: welcome
title: Welcome
authors: [aiwenmo]
date: 2020-01-01
hide_reading_time: true
---

&emsp;&emsp; Apache Flink 近年来发展尤为迅速且社区火爆,在 Flink Forward Asia 2021 上更是将重新定义实时数仓架构。Dlink 作为 FlinkSQL 的交互式开发平台,显著得降低了 FlinkSQL 任务的开发与运维成本,目前正迈向流式数仓的建设目标。
作为 Dlink 的发起人,见证了从灵感到开源的落地,虽然道阻且长,但是社区的陪伴与鼓励是勇往直前的最大动力。而 Dinky 的定义,则指明了前进的方向——架构于 Apache Flink  的批流一体 DataOps。
最后,我们会响应国家十四五数字经济发展规划,为各行业的数字化转型提供开源的实时数据平台建设方案。
17 changes: 14 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,28 @@ const config = {
},
},
blog: {
showReadingTime: true,
showReadingTime: true, // 展示阅读时间 | show read time
include: ['**/*.{md,mdx}'],
exclude: [
'**/_*.{js,jsx,ts,tsx,md,mdx}',
'**/_*/**',
'**/*.test.{js,jsx,ts,tsx}',
'**/__tests__/**',
],
sortPosts:"descending", // 博客主页分页的排序规则(会根据时间排序) 降序: 'descending' 升序: 'ascending' | Governs the direction of blog post sorting.
postsPerPage: 20, // 博客主页的前{count}篇文章数 | the blog homepage show limit count
readingTime: ({content, frontMatter, defaultReadingTime}) =>
defaultReadingTime({content, options: {wordsPerMinute: 300}}), // 阅读时间 md文件中如果不写 date: 此属性 默认是当前时间
// Please change this to your repo.
editUrl: ({locale, versionDocsDirPath, docPath}) => {
editUrl: ({locale, versionDocsDirPath, docPath}) => { // 博客页面修改编辑按钮
if (locale !== 'zh-cn') {
return `https://github.com/DataLinkDC/dinky-website/tree/master/i18n/${locale}/${docPath}`;
}
return `https://github.com/DataLinkDC/dinky-website/tree/master/${versionDocsDirPath}/${docPath}`;
},
},
theme: {
customCss: require.resolve('./src/css/custom.css'),
customCss: require.resolve('./src/css/custom.css'), // 自定义css文件
},
}),
],
Expand Down
4 changes: 4 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,7 @@
/*a:visited {color:purple;text-decoration:none;} !* //已访问:紫色、无下划线 *!*/
a:hover {color: #05b7b2; text-decoration:none;} /* //鼠标移近:有颜色、无下划线 */
/*a:hover { text-decoration:none;} !* //鼠标移近:无下划线 *!*/

h2 {
font-size: 2rem;
}

0 comments on commit be3065f

Please sign in to comment.