Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Topologies committed Jun 18, 2020
0 parents commit b9a5364
Show file tree
Hide file tree
Showing 76 changed files with 1,013 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
blogdown
.DS_Store
Thumbs.db
public/
12 changes: 12 additions & 0 deletions R/build.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (Sys.getenv('USER') != 'yihui' || Sys.which('git') == '' ||
!grepl(
'git@github.com:yihui/hugo-xmin.git',
system2('git', c('remote', '-v'), stdout = TRUE)
)) q('no')

file.copy('content/_index.markdown', '../README.md', overwrite = TRUE)
if (Sys.which('sed') != '') system("sed -i '' -e '1,6d' -e '34,38d' ../README.md")
cat(
'[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name)\n',
file = '../README.md', append = TRUE
)
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ShiJiashuai's Blog

This site is created with Hugo and blogdown

The design is inspired by and modified from hugo-Xmin.

The source file of the website is hosted on Github.

The site is served on netlify.
17 changes: 17 additions & 0 deletions ShiJiashuai_blog.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: knitr
LaTeX: XeLaTeX

AutoAppendNewline: Yes

BuildType: Website
46 changes: 46 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
baseurl = "/"
languageCode = "zh-cn"
title = "ShiJiashuai's Blog"
theme = "hugo-xmin"
googleAnalytics = "UA-68366586-1"
disqusShortname = "shijiashuaiblog"
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
preserveTaxonomyNames = true
footnotereturnlinkcontents = ""
enableEmoji = true
hasCJKLanguage = true


[permalinks]
post = "/post/:year/:month/:day/:slug/"
note = "/note/:year/:month/:day/:slug/"

[[menu.main]]
name = "主页/Home"
url = "/"
weight = 1
[[menu.main]]
name = "关于/About"
url = "/about/"
weight = 2
[[menu.main]]
name = "类别/Categories"
url = "/categories/"
weight = 3
[[menu.main]]
name = "标签/Tags"
url = "/tags/"
weight = 4
[[menu.main]]
name = "订阅/Subscribe"
url = "/index.xml"

[params]
description = "A website built through Hugo and blogdown."
footer = "© [师嘉帅](https://blog.shrektan.com) 2019-2020 | [Github](https://github.com/Topologies)"

# options for highlight.js (version, additional languages, and theme)
highlightjsVersion = "9.11.0"
highlightjsCDN = "//cdn.bootcss.com"
highlightjsLang = ["r", "yaml"]
highlightjsTheme = "github"
11 changes: 11 additions & 0 deletions content/2020-06-17-my-first-blog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: 博客播种
date: '2020-06-17'
slug: my-first-blog
categories:
- life
tags:
- life
---

写博客的开始总是很难的,我决意省掉描述这一开始的一系列的比喻。
11 changes: 11 additions & 0 deletions content/_index.Rmarkdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Home
---

[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/shrektan)


One of my favourite quote from *"Zen Mind, Beginner's Mind"*:

> In the beginner's mind there are many possibilities, but in the expert's there are few.

11 changes: 11 additions & 0 deletions content/_index.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: Home
---

[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/shrektan)


One of my favourite quote from *"Zen Mind, Beginner's Mind"*:

> In the beginner's mind there are many possibilities, but in the expert's there are few.
10 changes: 10 additions & 0 deletions content/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: 个人简介
---

- 2018年毕业于西安电子科技大学,软件工程专业;
- 2018~2020供职于深圳迈瑞医疗器械公司,从事嵌入式软件开发,主要负责血球分析仪的算法计算模块;
- 熟悉的编程语言C/C++, 也懂一点Python



3 changes: 3 additions & 0 deletions index.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
site: blogdown:::blogdown_site
---
10 changes: 10 additions & 0 deletions layouts/partials/foot_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<script src="//yihui.name/js/math-code.js"></script>
<script async src="//cdn.bootcss.com/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML"></script>

<script async src="//yihui.name/js/center-img.js"></script>

{{ if .IsPage }}
{{ template "_internal/disqus.html" . }}
{{ end }}

{{ template "_internal/google_analytics.html" . }}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions themes/hugo-xmin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
exampleSite/public
20 changes: 20 additions & 0 deletions themes/hugo-xmin/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2017 Yihui Xie

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 changes: 28 additions & 0 deletions themes/hugo-xmin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# HUGO XMIN

## _Keep it simple, but not simpler_

**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).


```bash
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```

```
5 ./layouts/404.html
12 ./layouts/_default/single.html
20 ./layouts/_default/list.html
13 ./layouts/_default/terms.html
0 ./layouts/partials/foot_custom.html
0 ./layouts/partials/head_custom.html
9 ./layouts/partials/footer.html
20 ./layouts/partials/header.html
51 ./static/css/style.css
7 ./static/css/fonts.css
137 total
```

I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.

[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name)
4 changes: 4 additions & 0 deletions themes/hugo-xmin/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: ''
date: ''
---
12 changes: 12 additions & 0 deletions themes/hugo-xmin/exampleSite/R/build.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (Sys.getenv('USER') != 'yihui' || Sys.which('git') == '' ||
!grepl(
'git@github.com:yihui/hugo-xmin.git',
system2('git', c('remote', '-v'), stdout = TRUE)
)) q('no')

file.copy('content/_index.markdown', '../README.md', overwrite = TRUE)
if (Sys.which('sed') != '') system("sed -i '' -e '1,6d' -e '34,38d' ../README.md")
cat(
'[![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name)\n',
file = '../README.md', append = TRUE
)
36 changes: 36 additions & 0 deletions themes/hugo-xmin/exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
baseurl = "/"
languageCode = "en-us"
title = "A minimal Hugo website"
theme = "hugo-xmin"
googleAnalytics = ""
disqusShortname = ""
ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
footnotereturnlinkcontents = ""

[permalinks]
post = "/post/:year/:month/:day/:slug/"
note = "/note/:year/:month/:day/:slug/"

[[menu.main]]
name = "Home"
url = "/"
weight = 1
[[menu.main]]
name = "About"
url = "/about/"
weight = 2
[[menu.main]]
name = "Categories"
url = "/categories/"
weight = 3
[[menu.main]]
name = "Tags"
url = "/tags/"
weight = 4
[[menu.main]]
name = "Subscribe"
url = "/index.xml"

[params]
description = "A website built through Hugo and blogdown."
footer = "&copy; [Yihui Xie](https://yihui.name) 2017 -- 2019 | [Github](https://github.com/yihui) | [Twitter](https://twitter.com/xieyihui)"
24 changes: 24 additions & 0 deletions themes/hugo-xmin/exampleSite/content/_index.Rmarkdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
title: Home
---

[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/yihui/hugo-xmin)

# HUGO XMIN

## _Keep it simple, but not simpler_

**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).

```{bash, comment='', echo=2, eval=Sys.which('bash') != '' && .Platform$OS.type != 'windows'}
cd ../..;
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```

I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.

Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,

`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`

All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.
38 changes: 38 additions & 0 deletions themes/hugo-xmin/exampleSite/content/_index.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Home
---

[<img src="https://simpleicons.org/icons/github.svg" style="max-width:15%;min-width:40px;float:right;" alt="Github repo" />](https://github.com/yihui/hugo-xmin)

# HUGO XMIN

## _Keep it simple, but not simpler_

**XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines).


```bash
find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l
```

```
5 ./layouts/404.html
12 ./layouts/_default/single.html
20 ./layouts/_default/list.html
13 ./layouts/_default/terms.html
0 ./layouts/partials/foot_custom.html
0 ./layouts/partials/head_custom.html
9 ./layouts/partials/footer.html
20 ./layouts/partials/header.html
51 ./static/css/style.css
7 ./static/css/fonts.css
137 total
```

I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit of CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code.

Although it is a minimal theme, it is actually fully functional. It supports pages (including the home page), blog posts, a navigation menu, categories, tags, and RSS. With [a little bit customization](https://github.com/yihui/hugo-xmin/blob/master/exampleSite/layouts/partials/foot_custom.html), it can easily support LaTeX math expressions, e.g.,

`$${\sqrt {n}}\left(\left({\frac {1}{n}}\sum _{i=1}^{n}X_{i}\right)-\mu \right)\ {\xrightarrow {d}}\ N\left(0,\sigma ^{2}\right)$$`

All pages not under the root directory of the website are listed below. You can also visit the list page of a single section, e.g., [posts](/post/), or [notes](/note/). See the [About](/about/) page for the usage of this theme.
Loading

0 comments on commit b9a5364

Please sign in to comment.