File tree Expand file tree Collapse file tree 10 files changed +16
-15
lines changed Expand file tree Collapse file tree 10 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- for value in guides stable
3+ for value in legacy stable
44do
55 if [ ! -e " $value /Cargo.toml" ]; then
66 if [ ! -d $value ]; then
77 cargo new $value
88 else
99 cargo init $value
1010 fi
11- if [ $value = guides ]; then
11+ if [ $value = legacy ]; then
1212 cat >> " $value /Cargo.toml" << -EOF
1313 futures = "0.3"
1414 hyper = { version = "0.14", features = ["full"] }
Original file line number Diff line number Diff line change 11Gemfile *
22_site *
33.sass-cache
4- /guides
4+ /legacy
55/stable
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ url: "https://hyper.rs" # the base hostname & protocol for your site
66defaults :
77 -
88 scope :
9- path : " _guides /"
9+ path : " _legacy /"
1010 type : " guides"
1111 values :
1212 layout : " guide"
@@ -20,7 +20,7 @@ defaults:
2020
2121
2222collections :
23- guides :
23+ legacy :
2424 permalink : /:collection/:path/
2525 output : true
2626 stable :
File renamed without changes.
Original file line number Diff line number Diff line change 11---
22title : Client Guides
3- permalink : /guides /client/
3+ permalink : /legacy /client/
44---
55
66This is just placeholder page. It should probably become a table of
Original file line number Diff line number Diff line change 11---
22title : Getting Started
33layout : guide
4- permalink : /guides /
4+ permalink : /legacy /
55---
66
77hyper is an HTTP library for the Rust language.
Original file line number Diff line number Diff line change 11---
22title : Server Guides
3- permalink : /guides /server/
3+ permalink : /legacy /server/
44---
55
66This is just placeholder page. It should probably become a table of
Original file line number Diff line number Diff line change 22< section class ="guide-topic ">
33 < h4 class ="guide-topic-title "> {{ topic.title }}</ h4 >
44 < ul class ="nav ">
5- {% if page.collection == "guides " %}
5+ {% if page.collection == "legacy " %}
66 {% for guide in topic.guides %}
7- {% assign guide_url = guide | prepend:"/" | prepend: topic.path | prepend:"/guides " | append:"/" %}
8- {% assign p = site.guides | where:"url", guide_url | first %}
7+ {% assign guide_url = guide | prepend:"/" | prepend: topic.path | prepend:"/legacy " | append:"/" %}
8+ {% assign p = site.legacy | where:"url", guide_url | first %}
99 < li {% if guide_url == page.url %}class ="active "{% endif %} > < a href ="{{ p.url }} "> {{ p.title }} </ a > </ li >
1010 {% endfor %}
1111 {% elsif page.collection == "stable" %}
Original file line number Diff line number Diff line change 66 < a class ="navbar-brand " href ="/ "> hyper.rs</ a >
77 </ li >
88 < li class ="nav-item "> < a class ="nav-link " href ="/stable "> 1.0 Guides</ a > </ li >
9- < li class ="nav-item "> < a class ="nav-link " href ="/guides "> 0.14 Guides</ a > </ li >
9+ < li class ="nav-item "> < a class ="nav-link " href ="/legacy "> 0.14 Guides</ a > </ li >
1010 < li class ="nav-item "> < a class ="nav-link " href ="https://github.com/hyperium/hyper "> Source</ a > </ li >
1111 </ ul >
1212 </ div >
Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ <h1>{{ page.title }}</h1>
1414 < div class ="row ">
1515 < aside class ="col-md-3 hyper-sidebar ">
1616 < nav >
17- {% if page.collection == "guides" %}
18- {% assign topics = site.data.guides | first %}
17+ {{page.collection | jsonify }}
18+ {% if page.collection == "legacy" %}
19+ {% assign topics = site.data.legacy | first %}
1920 {% for guides in topics.guides %}
2021 {% assign topic_sub_url = guides | prepend:"/" %}
21- {% assign topic = site.data.guides | where: "path", topic_sub_url | first %}
22+ {% assign topic = site.data.legacy | where: "path", topic_sub_url | first %}
2223 {% include guide_ul.html topic=topic %}
2324 {% endfor %}
2425 {% elsif page.collection == "stable" %}
You can’t perform that action at this time.
0 commit comments