7
7
< div id ="sidebar-primary " class ="sidebar ">
8
8
{% include search.html %}
9
9
10
- < div class ="widget ">
11
- < h3 class ="widget-title "> Getting Started</ h3 >
12
- < ol >
13
- < li > < a class ="spec " href ="/getting_started/1.html "> Introduction</ a > </ li >
14
- < li > < a class ="spec " href ="/getting_started/2.html "> Basic types</ a > </ li >
15
- < li > < a class ="spec " href ="/getting_started/3.html "> Basic operators</ a > </ li >
16
- < li > < a class ="spec " href ="/getting_started/4.html "> Pattern matching</ a > </ li >
17
- < li > < a class ="spec " href ="/getting_started/5.html "> case, cond and if</ a > </ li >
18
- < li > < a class ="spec " href ="/getting_started/6.html "> Binaries, strings and char lists</ a > </ li >
19
- < li > < a class ="spec " href ="/getting_started/7.html "> Keywords, maps and dicts</ a > </ li >
20
- < li > < a class ="spec " href ="/getting_started/8.html "> Modules</ a > </ li >
21
- < li > < a class ="spec " href ="/getting_started/9.html "> Recursion</ a > </ li >
22
- < li > < a class ="spec " href ="/getting_started/10.html "> Enumerables and streams</ a > </ li >
23
- < li > < a class ="spec " href ="/getting_started/11.html "> Processes</ a > </ li >
24
- < li > < a class ="spec " href ="/getting_started/12.html "> IO and the file system</ a > </ li >
25
- < li > < a class ="spec " href ="/getting_started/13.html "> alias, require and import</ a > </ li >
26
- < li > < a class ="spec " href ="/getting_started/14.html "> Module attributes</ a > </ li >
27
- < li > < a class ="spec " href ="/getting_started/15.html "> Structs</ a > </ li >
28
- < li > < a class ="spec " href ="/getting_started/16.html "> Protocols</ a > </ li >
29
- < li > < a class ="spec " href ="/getting_started/17.html "> Comprehensions</ a > </ li >
30
- < li > < a class ="spec " href ="/getting_started/18.html "> Sigils</ a > </ li >
31
- < li > < a class ="spec " href ="/getting_started/19.html "> try, catch and rescue</ a > </ li >
32
- < li > < a class ="spec " href ="/getting_started/20.html "> Typespecs and behaviours</ a > </ li >
33
- < li > < a class ="spec " href ="/getting_started/21.html "> Where to go next</ a > </ li >
34
- </ ol >
35
- </ div >
36
- < div class ="widget ">
37
- < h3 class ="widget-title "> Mix and OTP</ h3 >
38
- < ol >
39
- < li > < a class ="spec " href ="/getting_started/mix_otp/1.html "> Introduction to Mix</ a > </ li >
40
- < li > < a class ="spec " href ="/getting_started/mix_otp/2.html "> Agent</ a > </ li >
41
- < li > < a class ="spec " href ="/getting_started/mix_otp/3.html "> GenServer</ a > </ li >
42
- < li > < a class ="spec " href ="/getting_started/mix_otp/4.html "> GenEvent</ a > </ li >
43
- < li > < a class ="spec " href ="/getting_started/mix_otp/5.html "> Supervisor and Application</ a > </ li >
44
- < li > < a class ="spec " href ="/getting_started/mix_otp/6.html "> ETS</ a > </ li >
45
- < li > < a class ="spec " href ="/getting_started/mix_otp/7.html "> Dependencies and umbrella apps</ a > </ li >
46
- < li > < a class ="spec " href ="/getting_started/mix_otp/8.html "> Task and gen_tcp</ a > </ li >
47
- < li > < a class ="spec " href ="/getting_started/mix_otp/9.html "> Docs, tests and pipelines</ a > </ li >
48
- < li > < a class ="spec " href ="/getting_started/mix_otp/10.html "> Distributed tasks and configuration</ a > </ li >
49
- </ ol >
50
- </ div >
51
- < div class ="widget ">
52
- < h3 class ="widget-title "> Meta-programming in Elixir</ h3 >
53
- < ol >
54
- < li > < a class ="spec " href ="/getting_started/meta/1.html "> Quote and unquote</ a > </ li >
55
- < li > < a class ="spec " href ="/getting_started/meta/2.html "> Macros</ a > </ li >
56
- < li > < a class ="spec " href ="/getting_started/meta/3.html "> Domain Specific Languages</ a > </ li >
57
- </ ol >
58
- </ div >
10
+ {% assign guides = site.data.getting_started %}
11
+ {% for guide in site.data.getting_started %}
12
+ < div class ="widget ">
13
+ < h3 class ="widget-title "> {{guide.title}}</ h3 >
14
+ < ol >
15
+ {% for node in guide.pages %}
16
+ < li > < a class ="spec " href ="{{guide.dir}}{{node.slug}}.html " title ="{{node.title | escape}} "> {{node.title}}</ a > </ li >
17
+ {% endfor %}
18
+ </ ol >
19
+ </ div >
20
+ {% endfor %}
59
21
60
22
{% include learning-resources.html %}
61
23
{% include code-editor-support.html %}
@@ -67,17 +29,33 @@ <h3 class="widget-title">Meta-programming in Elixir</h3>
67
29
{{ content }}
68
30
</ article > <!-- .hfeed -->
69
31
70
- {% if page.guide %}
71
- < div class ="pagination loop-pagination ">
72
- {% if page.guide > 1 %}
73
- < a href ="{{page.guide | minus:1}}.html " class ="previous page-numbers spec "> ← Previous</ a >
32
+ {% assign url_parts = page.url | split: '/' %}
33
+ {% assign url_parts_size = url_parts | size %}
34
+ {% assign file_name = url_parts | last %}
35
+ {% assign guide_base_url = page.url | replace: file_name %}
36
+ {% assign page_slug = file_name | replace: '.html' %}
37
+
38
+ {% assign guides = site.data.getting_started %}
39
+ {% for guide in site.data.getting_started %}
40
+ {% if guide.dir == guide_base_url %}
41
+ {% for node in guide.pages %}
42
+ {% if node.slug == page_slug %}
43
+ < div class ="pagination loop-pagination ">
44
+ {% unless forloop.first %}
45
+ < a href ="{{guide.dir}}{{prev.slug}}.html " class ="previous page-numbers spec " title ="{{prev.title | escape}} "> ← Previous</ a >
46
+ {% endunless %}
47
+ < a class ="page-numbers spec " href ="#container "> Top</ a >
48
+ {% unless forloop.last %}
49
+ {% assign next = guide.pages[forloop.index] %}
50
+ < a href ="{{guide.dir}}{{next.slug}}.html " class ="previous page-numbers spec " title ="{{next.title | escape}} "> Next →</ a >
51
+ {% endunless %}
52
+ </ div >
53
+ {% endif %}
54
+ {% assign prev = node %}
55
+ {% endfor %}
74
56
{% endif %}
75
- < a class ="page-numbers spec " href ="#container "> Top</ a >
76
- {% unless page.last %}
77
- < a href ="{{page.guide | plus:1}}.html " class ="next page-numbers spec "> Next →</ a >
78
- {% endunless %}
79
- </ div >
80
- {% endif %}
57
+ {% endfor %}
58
+
81
59
</ div > <!-- #content -->
82
60
83
61
{% include bottom.html %}
0 commit comments