Skip to content

Commit ecf0a91

Browse files
committed
Layouts + header for generated RPC docs
1 parent c29ee3d commit ecf0a91

File tree

3 files changed

+73
-2
lines changed

3 files changed

+73
-2
lines changed

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ defaults:
8585
path: ""
8686
type: doc
8787
values:
88+
layout: doc
8889
lang: en
8990
share: true
9091

_includes/_head.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,13 @@
33
<!-- version: {{ page.version }} -->
44
<!-- translated: {{ page.translated }} -->
55
<meta charset="utf-8">
6-
<title>{{ site.title }}{% if page.title %} :: {{ page.title }}{% endif %}</title>
7-
{% if page.excerpt %}<meta name="description" content="{{ page.title | strip_html }}">{% endif %}
6+
{% if custom_title %}
7+
{% assign title = custom_title %}
8+
{% else %}
9+
{% assign title = page.title %}
10+
{% endif %}
11+
<title>{{ site.title }}{{ custom }}{% if title %} :: {{ title }}{% endif %}</title>
12+
{% if page.excerpt %}<meta name="description" content="{{ title | strip_html }}">{% endif %}
813
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
914
{% if page.author %}
1015
{% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %}

_layouts/doc.html

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<!doctype html>
2+
{% include _browser_magic.html %}
3+
<head>
4+
{% assign custom_title = page.name | append: " (" | append: page.btcversion | append: " RPC)" %}
5+
{% include _head.html %}
6+
</head>
7+
8+
<body class="page">
9+
10+
{% include _browser-upgrade.html %}
11+
12+
{% include _navigation.html %}
13+
14+
<div id="main" role="main">
15+
<div class="article-author-side">
16+
<div>
17+
<p>
18+
Documentation exported from <a href="https://github.com/bitcoin/bitcoin/tree/v{{page.btcversion}}">Bitcoin Core {{page.btcversion}}</a>
19+
</p>
20+
</div>
21+
</div>
22+
<article class="page">
23+
<h1>{{ custom_title }}</h1>
24+
<div class="article-wrap">
25+
{% assign groups = site.doc | where:"btcversion", page.btcversion | group_by:"btcgroup" | sort: "name" %}
26+
<section class="toc">
27+
{% for group in groups %}
28+
<header>
29+
<h3 class="toc-header">
30+
<i class="fa fa-book"></i>
31+
{{ group.name }}
32+
</h3>
33+
<div class="toc-drawer js-hidden">
34+
<ul>
35+
{% for article in group.items %}
36+
<li><a href="{{article.url}}">{{article.name}}</a></li>
37+
{% endfor %}
38+
</ul>
39+
</div>
40+
</header>
41+
{% endfor %}
42+
</section>
43+
44+
<!-- { % include _istranslated.html % } -->
45+
<span class="doc">
46+
{% highlight text %}{{ content }}{% endhighlight %}
47+
</span>
48+
{% if page.share != false %}
49+
<hr />
50+
{% include _social-share.html %}
51+
{% endif %}
52+
</div><!-- /.article-wrap -->
53+
</article>
54+
</div><!-- /#index -->
55+
56+
<div class="footer-wrap">
57+
<footer>
58+
{% include _footer.html %}
59+
</footer>
60+
</div><!-- /.footer-wrap -->
61+
62+
{% include _scripts.html %}
63+
64+
</body>
65+
</html>

0 commit comments

Comments
 (0)