Skip to content

Commit 7f4f6c9

Browse files
committed
環境を構築した
1 parent 0601064 commit 7f4f6c9

22 files changed

+1018
-0
lines changed

.ruby-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.7

Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'github-pages'

Gemfile.lock

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
GEM
2+
remote: https://rubygems.org/
3+
specs:
4+
RedCloth (4.2.9)
5+
activesupport (4.2.6)
6+
i18n (~> 0.7)
7+
json (~> 1.7, >= 1.7.7)
8+
minitest (~> 5.1)
9+
thread_safe (~> 0.3, >= 0.3.4)
10+
tzinfo (~> 1.1)
11+
addressable (2.4.0)
12+
coffee-script (2.4.1)
13+
coffee-script-source
14+
execjs
15+
coffee-script-source (1.10.0)
16+
colorator (0.1)
17+
ethon (0.8.1)
18+
ffi (>= 1.3.0)
19+
execjs (2.6.0)
20+
faraday (0.9.2)
21+
multipart-post (>= 1.2, < 3)
22+
ffi (1.9.10)
23+
gemoji (2.1.0)
24+
github-pages (71)
25+
RedCloth (= 4.2.9)
26+
github-pages-health-check (= 1.1.0)
27+
jekyll (= 3.0.3)
28+
jekyll-coffeescript (= 1.0.1)
29+
jekyll-feed (= 0.5.1)
30+
jekyll-gist (= 1.4.0)
31+
jekyll-github-metadata (= 1.11.0)
32+
jekyll-mentions (= 1.1.2)
33+
jekyll-paginate (= 1.1.0)
34+
jekyll-redirect-from (= 0.10.0)
35+
jekyll-sass-converter (= 1.3.0)
36+
jekyll-seo-tag (= 1.3.3)
37+
jekyll-sitemap (= 0.10.0)
38+
jekyll-textile-converter (= 0.1.0)
39+
jemoji (= 0.6.2)
40+
kramdown (= 1.10.0)
41+
liquid (= 3.0.6)
42+
mercenary (~> 0.3)
43+
rdiscount (= 2.1.8)
44+
redcarpet (= 3.3.3)
45+
rouge (= 1.10.1)
46+
terminal-table (~> 1.4)
47+
github-pages-health-check (1.1.0)
48+
addressable (~> 2.3)
49+
net-dns (~> 0.8)
50+
octokit (~> 4.0)
51+
public_suffix (~> 1.4)
52+
typhoeus (~> 0.7)
53+
html-pipeline (2.4.0)
54+
activesupport (>= 2, < 5)
55+
nokogiri (>= 1.4)
56+
i18n (0.7.0)
57+
jekyll (3.0.3)
58+
colorator (~> 0.1)
59+
jekyll-sass-converter (~> 1.0)
60+
jekyll-watch (~> 1.1)
61+
kramdown (~> 1.3)
62+
liquid (~> 3.0)
63+
mercenary (~> 0.3.3)
64+
rouge (~> 1.7)
65+
safe_yaml (~> 1.0)
66+
jekyll-coffeescript (1.0.1)
67+
coffee-script (~> 2.2)
68+
jekyll-feed (0.5.1)
69+
jekyll-gist (1.4.0)
70+
octokit (~> 4.2)
71+
jekyll-github-metadata (1.11.0)
72+
octokit (~> 4.0)
73+
jekyll-mentions (1.1.2)
74+
html-pipeline (~> 2.3)
75+
jekyll (~> 3.0)
76+
jekyll-paginate (1.1.0)
77+
jekyll-redirect-from (0.10.0)
78+
jekyll (>= 2.0)
79+
jekyll-sass-converter (1.3.0)
80+
sass (~> 3.2)
81+
jekyll-seo-tag (1.3.3)
82+
jekyll (~> 3.0)
83+
jekyll-sitemap (0.10.0)
84+
jekyll-textile-converter (0.1.0)
85+
RedCloth (~> 4.0)
86+
jekyll-watch (1.3.1)
87+
listen (~> 3.0)
88+
jemoji (0.6.2)
89+
gemoji (~> 2.0)
90+
html-pipeline (~> 2.2)
91+
jekyll (>= 3.0)
92+
json (1.8.3)
93+
kramdown (1.10.0)
94+
liquid (3.0.6)
95+
listen (3.0.6)
96+
rb-fsevent (>= 0.9.3)
97+
rb-inotify (>= 0.9.7)
98+
mercenary (0.3.6)
99+
mini_portile2 (2.0.0)
100+
minitest (5.8.4)
101+
multipart-post (2.0.0)
102+
net-dns (0.8.0)
103+
nokogiri (1.6.7.2)
104+
mini_portile2 (~> 2.0.0.rc2)
105+
octokit (4.3.0)
106+
sawyer (~> 0.7.0, >= 0.5.3)
107+
public_suffix (1.5.3)
108+
rb-fsevent (0.9.7)
109+
rb-inotify (0.9.7)
110+
ffi (>= 0.5.0)
111+
rdiscount (2.1.8)
112+
redcarpet (3.3.3)
113+
rouge (1.10.1)
114+
safe_yaml (1.0.4)
115+
sass (3.4.22)
116+
sawyer (0.7.0)
117+
addressable (>= 2.3.5, < 2.5)
118+
faraday (~> 0.8, < 0.10)
119+
terminal-table (1.5.2)
120+
thread_safe (0.3.5)
121+
typhoeus (0.8.0)
122+
ethon (>= 0.8.0)
123+
tzinfo (1.2.2)
124+
thread_safe (~> 0.1)
125+
126+
PLATFORMS
127+
ruby
128+
129+
DEPENDENCIES
130+
github-pages
131+
132+
BUNDLED WITH
133+
1.11.2

Rakefile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
task(:default).clear
2+
task :default do
3+
system 'rake --silent --tasks'
4+
end
5+
6+
desc 'install gems with Bundler'
7+
task :install do
8+
sh 'bundle install --path vendor/bundle'
9+
end
10+
11+
desc 'start jekyll server'
12+
task :preview do
13+
sh 'bundle exec jekyll serve --drafts --watch'
14+
end

_config.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name:
2+
notes
3+
4+
url:
5+
https://tsukurite.github.io/notes
6+
7+
baseurl:
8+
/notes
9+
10+
permalink:
11+
/note/:title/index.html
12+
13+
timezone:
14+
Asia/Tokyo
15+
16+
markdown:
17+
kramdown
18+
19+
highlighter:
20+
rouge
21+
22+
kramdown:
23+
input: GFM
24+
25+
sass:
26+
style: compressed
27+
28+
gems:
29+
- jekyll-feed
30+
- jekyll-gist
31+
- jekyll-github-metadata
32+
- jekyll-paginate
33+
- jekyll-redirect-from
34+
- jekyll-sitemap
35+
- jemoji
36+
37+
exclude:
38+
- Gemfile
39+
- Gemfile.lock
40+
- LICENSE
41+
- README.md
42+
- Rakefile
43+
- vendor
44+
45+
defaults:
46+
47+
- scope:
48+
path: ''
49+
type: 'posts'
50+
values:
51+
layout: 'note'

_drafts/.gitkeep

Whitespace-only changes.

_includes/footer.html

Whitespace-only changes.

_includes/head.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<meta charset="utf-8">
2+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
3+
<meta name="viewport" content="width=device-width,initial-scale=1.0">
4+
<meta name="format-detection" content="telephone=no">
5+
<link rel="alternate" href="{{ site.baseurl }}/feed.xml" title="{{ site.name }} feed" type="application/atom+xml">

_includes/header.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<header class="header">
2+
<div class="header__inner">
3+
4+
<div class="header__title title">
5+
<a class="title__link" href="{{ site.baseurl }}/">
6+
<h1 class="title__text">{{ site.name }}</h1>
7+
</a>
8+
</div>
9+
10+
</div>
11+
</header>

_includes/title.html

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% if page.title %}
2+
<title>{{ page.title | escape }} - {{ site.name | escape }}</title>
3+
<link rel="canonical" href="{{ site.url }}{{ page.url }}">
4+
{% else %}
5+
<title>{{ site.name | escape }}</title>
6+
<link rel="canonical" href="{{ site.url }}">
7+
{% endif %}

_layouts/note.html

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
{% include head.html %}
5+
{% include title.html %}
6+
<link rel="stylesheet" href="{{ site.baseurl }}/css/note.css">
7+
</head>
8+
<body class="note">
9+
{% include header.html %}
10+
11+
<main class="note main" role="main">
12+
<div class="note__inner">
13+
14+
<h1 class="note__title">{{ page.title }}</h1>
15+
<time class="note__pubdate">{{ page.date | split:" " | first }}</time>
16+
17+
{% if page.author %}
18+
<span class="note__author">{{ page.author }}</span>
19+
{% endif %}
20+
21+
{% if page.tags %}
22+
<ul class="note__tags tags">
23+
{% assign tags = page.tags | sort %}
24+
{% for tag in tags %}
25+
{% assign name = tag %}
26+
<li class="tags__tag tag">
27+
<a class="tag__link" href="javascript:void 0">
28+
<span class="tag__text">#{{ name }}</span>
29+
</a>
30+
</li>
31+
{% endfor %}
32+
</ul>
33+
{% endif %}
34+
35+
<span class="note__history history">
36+
<a class="history__link" href="https://github.com/tsukurite/notes/commits/gh-pages/{{ page.path }}">History</a>
37+
</span>
38+
39+
<section class="note__content">
40+
{{ content }}
41+
</section>
42+
43+
</div>
44+
</main>
45+
46+
{% include footer.html %}
47+
</body>
48+
</html>

_layouts/slide.html

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
{% include head.html %}
5+
{% include title.html %}
6+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/mermaid/0.5.8/mermaid.min.css">
7+
<link rel="stylesheet" href="/css/slide.css">
8+
</head>
9+
<body class="slide">
10+
<div id="metadata" class="slide__metadata slide__metadata--hide">
11+
12+
<h1 class="slide__title">{{ page.title }}</h1>
13+
<time class="slide__pubdate">{{ page.date | split:" " | first }}</time>
14+
15+
{% if page.author %}
16+
<span class="slide__author">{{ page.author }}</span>
17+
{% endif %}
18+
19+
{% if page.tags %}
20+
<ul class="slide__tags tags">
21+
{% assign tags = page.tags | sort %}
22+
{% for tag in tags %}
23+
{% assign name = tag %}
24+
<li class="tags__tag tag">
25+
<a class="tag__link" href="javascript:void 0">
26+
<span class="tag__text">#{{ name }}</span>
27+
</a>
28+
</li>
29+
{% endfor %}
30+
</ul>
31+
{% endif %}
32+
33+
<span class="slide__history history">
34+
<a class="history__link" href="https://github.com/tsukurite/notes/commits/gh-pages/{{ page.path }}">History</a>
35+
</span>
36+
37+
</div>
38+
<script id="markdown" type="text/markdown">{% include_relative {{ page.path | split:"/" | last }} %}</script>
39+
<script src="https://gnab.github.io/remark/downloads/remark-latest.min.js"></script>
40+
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/0.5.8/mermaid.min.js"></script>
41+
<script>
42+
(function(){
43+
'use strict';
44+
45+
// get markdown text
46+
var markdownScript, markdownText, slideshow;
47+
48+
markdownScript = document.getElementById('markdown');
49+
markdownText = markdownScript.innerHTML.replace(/^---\r?\n[\s\S]*?---\r?\n/, '');
50+
51+
// create slideshow
52+
slideshow = remark.create({
53+
source: markdownText,
54+
navigation: {
55+
scroll: false
56+
}
57+
});
58+
59+
// export slideshow instance
60+
window.slideshow = slideshow;
61+
62+
//------------------------------------------------
63+
64+
// animate metadata area
65+
var metadata = document.getElementById('metadata'),
66+
modifierClassName = 'slide__metadata--hide';
67+
68+
function onShowSlide(slide) {
69+
var index = (slide.getSlideIndex) ?
70+
slide.getSlideIndex() : slide.getCurrentSlideIndex();
71+
72+
if (index === 0) {
73+
// show metadata if first page
74+
metadata.classList.remove(modifierClassName);
75+
} else {
76+
// hide metadata
77+
metadata.classList.add(modifierClassName);
78+
}
79+
}
80+
81+
slideshow.on('showSlide', onShowSlide);
82+
83+
onShowSlide(slideshow);
84+
85+
//------------------------------------------------
86+
87+
// disable auto initialize
88+
mermaid.initialize({
89+
startOnLoad: false
90+
});
91+
92+
function onAfterShowSlide(slide) {
93+
// generate mermaid graph
94+
mermaid.init(void 0, '.remark-visible .mermaid');
95+
}
96+
97+
slideshow.on('afterShowSlide', onAfterShowSlide);
98+
99+
onAfterShowSlide(slideshow);
100+
}());
101+
</script>
102+
</body>
103+
</html>

_posts/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)