Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit389efc6

Browse files
committed
refactor docs into include, create table of contents
1 parent01e1dfe commit389efc6

23 files changed

+90
-62
lines changed

‎_includes/doc.html‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<br/>
2+
<br/>
3+
<sectionid="{{ include.link }}">
4+
<!-- edit -->
5+
<aclass="button edit-docs"href="//github.com/coderoad/coderoad.github.io/edit/master/_posts/{{ include.editPath }}/{{ include.file }}">
6+
<iclass="fa fa-pencil fa-fw"></i>
7+
<spanclass="network-name">Edit</span>
8+
</a>
9+
<!-- content -->
10+
<h2>{{ include.index}}. {{ include.title }}</h2>
11+
<div>{{ include.content }}</div>
12+
</section>

‎_includes/docs.html‎

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,30 @@
1-
<br/>
2-
<br/>
3-
<sectionid="{{ include.id }}">
4-
<aclass="button edit-docs"href="{{ include.editPath }}/{{ include.file }}">
5-
<iclass="fa fa-pencil fa-fw"></i>
6-
<spanclass="network-name">Edit</span>
7-
</a>
8-
<h2>{{ include.title }}</h2>
9-
<div>{{ include.content }}</div>
1+
<sectionid="docs">
2+
3+
<divclass="doc-contents">
4+
<h2>Contents</h2>
5+
{% for doc in site.categories[include.category] reversed %}
6+
{% include table-of-contents.html
7+
link=doc.link
8+
title=doc.title
9+
index=forloop.index
10+
%}
11+
{% endfor %}
12+
</div>
13+
14+
<hr/>
15+
16+
<!-- Docs -->
17+
<div>
18+
{% for doc in site.categories[include.category] reversed %}
19+
{% include doc.html
20+
link=doc.link
21+
title=doc.title
22+
content=doc.content
23+
editPath=include.category
24+
file=doc.file
25+
index=forloop.index
26+
%}
27+
{% endfor %}
28+
</div>
29+
1030
</section>

‎_includes/table-of-contents.html‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<ahref="#{{ include.link }}">
2+
<h5>{{include.index}}. {{ include.title }}</h5>
3+
</a>

‎_posts/atom-coderoad/2016-01-01-explanation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title:What is Atom-CodeRoad?
3-
id:explanation
3+
link:explanation
44
file:2016-01-01-explanation.md
55
categories:
66
-atom-coderoad

‎_posts/atom-coderoad/2016-01-02-installation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title:Quick Start
3-
id:install
3+
link:install
44
file:2016-01-02-installation.md
55
categories:
66
-atom-coderoad

‎_posts/builder-coderoad/2016-01-01-explanation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title:What is Builder-CodeRoad?
3-
id:explanation
3+
link:explanation
44
file:2016-01-01-explanation.md
55
categories:
66
-builder-coderoad

‎_posts/builder-coderoad/2016-01-02-installation.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title:Quick Start
3-
id:install
3+
link:install
44
file:2016-01-02-installation.md
55
categories:
66
-builder-coderoad

‎_posts/builder-coderoad/2016-01-03-development.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title:Development
3-
id:development
3+
link:development
44
file:2016-01-02-development.md
55
categories:
66
-builder-coderoad

‎_posts/tutorial-docs/2016-01-01-tutorial.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title:Tutorial Markdown
3-
id:tutorial-md
3+
link:tutorial-md
44
file:2016-01-01-tutorial.md
55
categories:
6-
-docs
6+
-tutorial-docs
77
---
88

99
CodeRoad tutorials are written in Github Flavored Markdown, then parsed into a*coderoad.json* file when you run`> coderoad build`.

‎_posts/tutorial-docs/2016-01-02-coderoad-api.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title:CodeRoad API
3-
id:coderoad-API
3+
link:coderoad-API
44
file:2016-01-02-coderoad-api.md
55
categories:
6-
-docs
6+
-tutorial-docs
77
---
88

99
Of course Markdown couldn't cover all uses necessary for CodeRoad. Instead, there is a special**CodeRoad API** which is parsed into the data file whenever you run`> coderoad build`.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp