on master help sign in
fix build script, fix docs build and sidebar
commit29837391612575132009b90fee9194495a2fd9f4 authorMorgan Sutherland <morgan@morgansutherland.com> dateThu 21 Mar 2019, 15:59 (8 years ago) parentc2c2e41
4 files changed+158−24
partials/doc-wrap.hoon+1−1 partials/sidebar.hoon+153−18 scripts/build+3−4 static-site/docs+1−1
partials/doc-wrap.hoon+1−1
@@ -3,7 +3,7 @@
33/= content /, /web/docs/learn /partials-kids-plus/
44 /web/docs/reference /partials-kids-plus/
55 /web/docs/getting-started /partials-kids-plus/
6− /web/docs/introduction /partials-kids-plus/
6+ /web/docs/concepts /partials-kids-plus/
77 /web/docs /elem/
88 ==
99/= sidebar /partials-sidebar/
partials/sidebar.hoon+153−18
@@ -1,4 +1,5 @@
1−/= learn-list
1+:: Getting Started
2+/= get-started-list
23 /; |= $= a
34 $:
45 (map knot cord)
@@ -11,7 +12,7 @@
1112 ~
1213 ==
1314 a
14− /: /===/web/docs/learn
15+ /: /===/web/docs/getting-started
1516 /^ $:
1617 (map knot cord)
1718 %+ map knot
@@ -45,7 +46,8 @@
4546 ==
4647 ==
4748 ==
48−/= intro-list
49+:: Using
50+/= use-list
4951 /; |= $= a
5052 $:
5153 (map knot cord)
@@ -58,7 +60,7 @@
5860 ~
5961 ==
6062 a
61− /: /===/web/docs/introduction
63+ /: /===/web/docs/using
6264 /^ $:
6365 (map knot cord)
6466 %+ map knot
@@ -92,7 +94,8 @@
9294 ==
9395 ==
9496 ==
95−/= ref-list
97+:: Concepts
98+/= concept-list
9699 /; |= $= a
97100 $:
98101 (map knot cord)
@@ -105,7 +108,7 @@
105108 ~
106109 ==
107110 a
108− /: /===/web/docs/reference
111+ /: /===/web/docs/concepts
109112 /^ $:
110113 (map knot cord)
111114 %+ map knot
@@ -139,7 +142,8 @@
139142 ==
140143 ==
141144 ==
142−/= use-list
145+:: Learn
146+/= learn-list
143147 /; |= $= a
144148 $:
145149 (map knot cord)
@@ -152,7 +156,55 @@
152156 ~
153157 ==
154158 a
155− /: /===/web/docs/getting-started
159+ /: /===/web/docs/learn
160+ /^ $:
161+ (map knot cord)
162+ %+ map knot
163+ $:
164+ (map knot cord)
165+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
166+ ~
167+ ==
168+ ~
169+ ==
170+ /. /front/
171+ /^ %+ map knot
172+ $:
173+ (map knot cord)
174+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
175+ ~
176+ ==
177+ /_
178+ /^ $:
179+ (map knot cord)
180+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
181+ ~
182+ ==
183+ /. /front/
184+ /^ (map knot [(map knot cord) (map knot (map knot cord)) ~])
185+ /_
186+ /^ [(map knot cord) (map knot (map knot cord)) ~]
187+ /.
188+ /front/
189+ /_ /front/
190+ ==
191+ ==
192+ ==
193+:: Reference
194+/= ref-list
195+ /; |= $= a
196+ $:
197+ (map knot cord)
198+ %+ map knot
199+ $:
200+ (map knot cord)
201+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
202+ ~
203+ ==
204+ ~
205+ ==
206+ a
207+ /: /===/web/docs/reference
156208 /^ $:
157209 (map knot cord)
158210 %+ map knot
@@ -188,13 +240,13 @@
188240 ==
189241^- manx
190242;ol.list-reset.h-font.mt-6
191−:: section: getting started
243+:: section: Getting Started
192244 ;li.mb-4
193245 ;a.h-font.text-600(href "/docs/getting-started"): Getting Started
194246 ;ol.list-reset.h-font
195247 ;* %+ turn
196248 %+ sort
197− ~(tap by -.+.use-list)
249+ ~(tap by -.+.get-started-list)
198250 |= $: $= a
199251 %+ pair knot
200252 $:
@@ -271,13 +323,96 @@
271323 ==
272324 ==
273325 ==
274− :: section: Introduction
326+:: section: Using
327+ ;li.mb-4
328+ ;a.h-font.text-600(href "/docs/using"): Using
329+ ;ol.list-reset.h-font
330+ ;* %+ turn
331+ %+ sort
332+ ~(tap by -.+.use-list)
333+ |= $: $= a
334+ %+ pair knot
335+ $:
336+ (map knot cord)
337+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
338+ ~
339+ ==
340+ $= b
341+ %+ pair knot
342+ $:
343+ (map knot cord)
344+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
345+ ~
346+ ==
347+ ==
348+ =/ sort-a (slav %ud (fall (~(get by -.q.a) %sort) '100.000'))
349+ =/ sort-b (slav %ud (fall (~(get by -.q.b) %sort) '100.000'))
350+ (lth sort-a sort-b)
351+ |= $= a
352+ %+ pair knot
353+ $:
354+ (map knot cord)
355+ (map knot [(map knot cord) (map knot (map knot cord)) ~])
356+ ~
357+ ==
358+ =/ title (~(get by -.q.a) %title)
359+ =/ parent p.a
360+ =/ one
361+ ;ol.list-reset.h-font
362+ ;*
363+ %+ turn
364+ %+ sort ~(tap by -.+.q.a)
365+ |= $: $= a
366+ %+ pair knot [(map knot cord) (map knot (map knot cord)) ~]
367+ $= b
368+ %+ pair knot [(map knot cord) (map knot (map knot cord)) ~]
369+ ==
370+ =/ sort-a (slav %ud (fall (~(get by -.q.a) %sort) '100.000'))
371+ =/ sort-b (slav %ud (fall (~(get by -.q.b) %sort) '100.000'))
372+ (lth sort-a sort-b)
373+ |= $= b
374+ %+ pair knot [(map knot cord) (map knot (map knot cord)) ~]
375+ =/ oneparen p.b
376+ =/ onetitle (~(get by -.q.b) %title)
377+ =/ two
378+ ;ol.list-reset.h-font
379+ ;*
380+ %+ turn
381+ %+ sort ~(tap by -.+.q.b)
382+ |= $: $= a (pair knot (map knot cord))
383+ $= b (pair knot (map knot cord))
384+ ==
385+ =/ sort-a (slav %ud (fall (~(get by q.a) %sort) '100.000'))
386+ =/ sort-b (slav %ud (fall (~(get by q.b) %sort) '100.000'))
387+ (lth sort-a sort-b)
388+
389+ |= $= c (pair knot (map knot cord))
390+ =/ twoparen p.c
391+ =/ sectitle (fall (~(get by q.c) %title) '')
392+ ;li
393+ ;a.h-font(href "/docs/using/{(trip parent)}/{(trip oneparen)}/{(trip twoparen)}"): {(trip sectitle)}
394+ ==
395+ ==
396+ ?~ onetitle
397+ ;li;
398+ ;li
399+ ;a.h-font(href "/docs/using/{(trip parent)}/{(trip oneparen)}"): {(trip (need onetitle))}
400+ ;+ two
401+ ==
402+ ==
403+ ;li
404+ ;a.h-font(href "/docs/using/{(trip parent)}"): {(trip (need title))}
405+ ;+ one
406+ ==
407+ ==
408+ ==
409+ :: Section: Concepts
275410 ;li.mb-4
276− ;a.h-font.text-600(href "/docs/introduction"): Introduction
411+ ;a.h-font.text-600(href "/docs/concepts"): Concepts
277412 ;ol
278413 ;* %+ turn
279414 %+ sort
280− ~(tap by -.+.intro-list)
415+ ~(tap by -.+.concept-list)
281416 |= $: $= a
282417 %+ pair knot
283418 $:
@@ -338,23 +473,23 @@
338473 =/ twoparen p.c
339474 =/ sectitle (fall (~(get by q.c) %title) '')
340475 ;li
341− ;a.h-font(href "/docs/introduction/{(trip parent)}/{(trip oneparen)}/{(trip twoparen)}"): {(trip sectitle)}
476+ ;a.h-font(href "/docs/concepts/{(trip parent)}/{(trip oneparen)}/{(trip twoparen)}"): {(trip sectitle)}
342477 ==
343478 ==
344479 ?~ onetitle
345480 ;li;
346481 ;li
347− ;a.h-font(href "/docs/introduction/{(trip parent)}/{(trip oneparen)}"): {(trip (need onetitle))}
482+ ;a.h-font(href "/docs/concepts/{(trip parent)}/{(trip oneparen)}"): {(trip (need onetitle))}
348483 ;+ two
349484 ==
350485 ==
351486 ;li
352− ;a.h-font(href "/docs/introduction/{(trip parent)}"): {(trip (need title))}
487+ ;a.h-font(href "/docs/concepts/{(trip parent)}"): {(trip (need title))}
353488 ;+ one
354489 ==
355490 ==
356491 ==
357−:: section: learn
492+:: Section: Learn
358493;li.mb-4
359494 ;a.h-font.text-600(href "/docs/learn"): Learn
360495 ;ol.list-reset.h-font
@@ -437,7 +572,7 @@
437572 ==
438573 ==
439574==
440−:: section: Reference
575+:: Section: Reference
441576;li.mb-4
442577 ;a.h-font.text-600(href "/docs/reference"): Reference
443578 ;ol.list-reset.h-font
scripts/build+3−4
@@ -59,16 +59,15 @@ read -n1 -s -r -p $'- Wait for sync, then run |static in your urbit again, wait
5959
6060# Copy results of second render (docs) to dist folder
6161
62−cp -rn $ship/.urb/put/web/* $dist # cp -n prevents overwriting existing folders
62+rsync -av --ignore-existing $ship/.urb/put/web/* $dist
6363
6464# Remove unecessary files
6565
66−rm -rf $dist/posts/update
6766rm -rf $dist/index
68−rm -rf $dist/js/*
6967
7068# Copy js directory
7169
70+rm -rf $dist/js/*
7271cp -r $site/static-site/js $dist
7372
74−echo -e "- Find your website in $dist"
73+echo -e "- Find your website in $dist"
static-site/docs+1−1

Submodule changed.