on 36b01c1 help sign in
urbit.org/docs/using/web/static.md
124 lines 3.6 kB history raw
1---
2navhome: '/docs/'
3sort: 3
4title: A static site
5---
7# A static site
9Hosting a static tree of content is easy. Let's put together a really simple
10site for an imaginary Urbit meetup group.
12We assume you have at least followed the beginning of [our first
13example](./blog) and created a desk called `site` and mounted it to unix.
15In `site/web/meet.md` put:
17 ---
18 navdpad: false
19 navmode: navbar
20 navpath: /meet
21 navhome: /meet
22 ---
24 # Neo-Tokyo Urbit meetup
26 <img src="https://ofheroesandcliches.files.wordpress.com/2014/06/neo-tokyo.png" width="100%"/>
28 Hi there! We meet once a week at The Chat to work on Urbit projects
29 together.
31 You can find out more about the group on the [about](about) page and
32 follow our projects in [projects](projects).
34This is our landing page. Here we're using a few new bits of YAML: `navdpad`,
35`navmode` and `navpath`. `navdpad` just turns off the nav arrows. `navmode` can
36be set to 'navbar' to switch to a horizontal top nav instead of a left bar.
37`navpath` sets the path to load the nav items from.
39Let's create `about.md` and `projects.md`. From Unix use the technique from
40before to create a new directory:
41`mkdir your-urbit/site/web/meet/; touch your-urbit/site/web/meet/about.md`. Then
42put the following in `site/web/about.md`:
44 ---
45 navdpad: false
46 navmode: navbar
47 navpath: /meet
48 navhome: /meet
49 title: About
50 ---
52 # About
54 ## Mission statement
56 The existing framework cannot subdue the new human force that is increasing day by day alongside the irresistible development of technology and the dissatisfaction of its possible uses in our senseless social life.
58 ## Members
60 Membership is open to anyone. Just send a message to `~talsur-todres`.
62 - Shōtarō Kaneda
63 - Motoko Kusanagi
64 - Ishikawa
65 - Faye Valentine
66 - Spike Spiegel
68And `site/web/projects.md`:
70 ---
71 navdpad: false
72 navmode: navbar
73 navpath: /meet
74 navhome: /meet
75 title: Projects
76 ---
78 # Projects
80 ## Active
82 <list />
84 ## Discussion
86 <div class="mini-module">
87 <script src="/~/at/lib/js/urb.js"/>
88 <script src="https://cdn.rawgit.com/seatgeek/react-infinite/0.8.0/dist/react-infinite.js"/>
89 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment-with-locales.js"/>
90 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.1/moment-timezone.js"/>
91 <script src="/talk/main.js"/>
92 <link href="/talk/main.css" rel="stylesheet" />
93 <talk readonly="" chrono="reverse" station="comments" />
94 </div>
96This page introduces a new thing: the `:talk` module. Inside of the
97`mini-module` div we load the scripts needed by the `<talk>` component. The
98`<talk>` component is a static component for displaying a feed from a talk
99channel inline. Here we're going to display the discussion from our active
100projects inline.
102We'll need a few active projects though. From unix:
103`mkdir your-urbit/site/web/meet/projects; touch your-urbit/site/web/meet/projects/bike.md`.
105In `site/web/meet/projects/bike.md`:
107 ---
108 navdpad: false
109 navmode: navbar
110 navpath: /meet
111 navhome: /meet
112 title: Kaneda's Bike
113 comments: true
114 ---
116 # Urbit on a Motorcycle
118 Discussion on getting urbit to power Kaneda's motorcycle.
120Here we just use the `comments` YAML to enable comments on the page. Adding
121other imaginary projects is left to the reader.
123Building a static site takes only a few minutes and a few markdown files. Have
124fun!