Skip to content

Commit

Permalink
Using Remark in Hugo
Browse files Browse the repository at this point in the history
  • Loading branch information
hoasxyz committed Feb 19, 2019
1 parent bcba96d commit a007659
Show file tree
Hide file tree
Showing 38 changed files with 8,960 additions and 16 deletions.
13 changes: 9 additions & 4 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,21 @@ copyright = "Hoas" # default: author.name ↓ # 默认为下
weight = 2
identifier = "archives"
url = "/post/"
[[menu.main]]
name = "Categories"
weight = 3
identifier = "categories"
url = "/categories/"
[[menu.main]]
name = "Tags"
weight = 4
identifier = "tags"
url = "/tags/"
[[menu.main]]
name = "Categories"
weight = 3
identifier = "categories"
url = "/categories/"
name = "Slides"
weight = 5
identifier = "slides"
url = "/slides/"

[params]
version = "4.x" # Used to give a friendly message when you have an incompatible update
Expand Down
2 changes: 1 addition & 1 deletion content/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ date: 2017-08-20T21:38:52+08:00
lastmod: 2017-08-28T21:41:52+08:00
draft: false
menu: "main"
weight: 6
weight: 70
comment: false
---

Expand Down
11 changes: 2 additions & 9 deletions content/exploring.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ title: Exploring
author: Hoas
date: '2019-01-07'
slug: exploring
categories:
- debugging
tags:
- R
- hugo
- RMarkdown
lastmod: '2019-01-18T16:36:05+08:00'
toc: yes
comment: no
weight: 5
weight: 69
menu: "main"
keywords: [explore,hugo,R Markdown,website,R]
description: "Exploring for many problems occured in blogdown."
Expand Down Expand Up @@ -161,4 +154,4 @@ setTimeout(showsectime, 1000);
<table><tr><td align="center"><a href="https://hoas.xyz/"><img src="https://github.com/hoasxyz/MarkdownPhotos/blob/master/Terry%20Lin/%E7%82%AB%E7%82%AB.jpg?raw=true" width="100px;" alt="Terry Lin"/><br /><sub><b>Terry Lin</b></sub></a><br /><a href="https://github.com/XSLiuLab/Beacon/commits?author=ShixiangWang" title="Code">💻</a> <a href="#ideas-ShixiangWang" title="Ideas, Planning, & Feedback">🤔</a> <a href="#maintenance-ShixiangWang" title="Maintenance">🚧</a></td></tr></table>
<!-- ALL-CONTRIBUTORS-LIST:END -->

- One fast and free [CDN](http://raw.githack.com/) can be used with github! For example:https: //hoas.xyz/post/oneline4/#%E8%A7%A3%E5%86%B3%E6%96%B9%E5%BC%8F.
- One fast and free [CDN](http://raw.githack.com/) can be used with github!
6 changes: 6 additions & 0 deletions content/post/2019-02-18-learning-cs-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ hideHeaderAndFooter: no
## 命名空间(namespace)

起组成程序的作用,一般新建项目后C#会自动生成一个和项目名称名相同的命名空间。既用作程序的“内部”组织系统又用作向“外部”公开的组织系统(一种向其他程序公开自己拥有的程序元素的方法)。如果要调用某个命名空间中的类或者别的东西比如方法,需要用`using`指令在开头引入命名空间,这样的话就可以直接使用,这就像R中的`library()`函数。

今天看yihui的[xaringan](http://slides.yihui.name/xaringan/zh-CN.html)后:
```r
if (!requireNamespace("xaringan"))
devtools::install_github("yihui/xaringan")
```

## 类(class)

Expand Down
4 changes: 2 additions & 2 deletions content/post/oneline4.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ htmlwidgets::saveWidget(hc,file = "oneline4.html", selfcontained = TRUE)
然后再运行下面一行就出来啦!!!

```html
<iframe src="https://rawcdn.githack.com/hoasxyz/MarkdownPhotos/406852aff61c331204667486d3dfe823c02e3745/web-image/oneline4.html" width="100%" height="600px"></iframe>
<iframe src="https://rawcdn.githack.com/hoasxyz/MarkdownPhotos/980f8ca0b5aae6907a163da4aa558e7024a7db54/HtmlWidget/oneline4.html" width="100%" height="600px"></iframe>
```

<iframe src="https://rawcdn.githack.com/hoasxyz/MarkdownPhotos/406852aff61c331204667486d3dfe823c02e3745/web-image/oneline4.html" width="100%" height="600px"></iframe>
<iframe src="https://rawcdn.githack.com/hoasxyz/MarkdownPhotos/980f8ca0b5aae6907a163da4aa558e7024a7db54/HtmlWidget/oneline4.html" width="100%" height="600px"></iframe>

现在应该可以看到了,如果这里实在看不到图我也没办法了,因为我自己不懂JavaScript,只能移步我的[RPubs](http://rpubs.com/Hoas_xyz/)http://rpubs.com/Hoas_xyz/oneline。

Expand Down
149 changes: 149 additions & 0 deletions content/slides/2019-02-19-using-remark-in-hugo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
title: Using Remark in Hugo
author: Hoas
date: '2019-02-19'
slug: using-remark-in-hugo
---
class: center, middle
count: false
### 逃离office
--

count: false
--

count: false
# Using Remark in Hugo

--

count: false
见:https://github.com/gnab/remark/wiki/Using-with-Hugo

---

# Formatting

Referring to https://github.com/gnab/remark/wiki/Formatting.

---

# Slide Separators

```md
---
```

## Incremental Slides

```c
- bullet 1
--

- bullet 2
```
- bullet 1
--

- bullet 2

---
## Incremental Slides
While expanding:

```md
- bullet 1
---

- bullet 1
- bullet 2
```

- bullet 1
---
## Incremental Slides
While expanding:

```md
- bullet 1
---

- bullet 1
- bullet 2
```

- bullet 1
- bullet 2
---
## Slide Notes

Some content.

???
Some note.

---
## Comments

```md
<!---
I'm a comment.
--->
```

<!---
I'm a comment.
--->

```md
[//]: # (I'm a comment)
```

[//]: # (I'm a comment)

---
name: agenda

## Agenda

```c
name: agenda
```
---
[The agenda](#agenda)

```c
[The agenda](#agenda)
```
---
count: false

# Agenda

--
1. Introduction

--
2. Markdown formatting

---
layout: true

# Section

---

## Sub section 1

```ruby
def add(a,b)
* a + b
end

# Notice how there is no return statement.
```

---

## Sub section 2
4 changes: 4 additions & 0 deletions themes/hugo-theme-even/archetypes/slides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
lastmod: {{ .Date }}
59 changes: 59 additions & 0 deletions themes/hugo-theme-even/layouts/slides/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<html>
<head>
<!-- head content, etc omitted for brevity -->
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);

body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
</head>
<body>
<textarea id="source">
{{ .RawContent }}
</textarea>
<script src="https://gnab.github.io/remark/downloads/remark-latest.min.js"></script>
<script>
var slideshow = remark.create({
// Set the slideshow display ratio
// Default: '4:3'
// Alternatives: '16:9', ...
ratio: '4:3',

// Navigation options
navigation: {
// Enable or disable navigating using scroll
// Default: true
// Alternatives: false
scroll: true,

// Enable or disable navigation using touch
// Default: true
// Alternatives: false
touch: true,

// Enable or disable navigation using click
// Default: false
// Alternatives: true
click: true
},

// Customize slide number label, either using a format string..
slideNumberFormat: 'Slide %current% of %total%',
// .. or by using a format function
slideNumberFormat: function (current, total) {
return 'Slide ' + current + ' of ' + total;
},

// Enable or disable counting of incremental slides in the slide counting
countIncrementalSlides: true
});
</script>
</body>
</html>
3 changes: 3 additions & 0 deletions xaringan/libs/Proj4Leaflet/proj4-compressed.js

Large diffs are not rendered by default.

Loading

0 comments on commit a007659

Please sign in to comment.