on 3a3df23 help sign in
urbit.org/docs/using/web/static.md
127 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
10simple site 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
14unix.
16In `site/web/meet.md` put:
18 ---
19 navdpad: false
20 navmode: navbar
21 navpath: /meet
22 navhome: /meet
23 ---
25 # Neo-Tokyo Urbit meetup
27 <img src="https://ofheroesandcliches.files.wordpress.com/2014/06/neo-tokyo.png" width="100%"/>
29 Hi there! We meet once a week at The Chat to work on Urbit projects
30 together.
32 You can find out more about the group on the [about](about) page and
33 follow our projects in [projects](projects).
35This is our landing page. Here we're using a few new bits of YAML:
36`navdpad`, `navmode` and `navpath`. `navdpad` just turns off the nav
37arrows. `navmode` can be set to 'navbar' to switch to a horizontal top
38nav instead of a left bar. `navpath` sets the path to load the nav
39items from.
41Let's create `about.md` and `projects.md`. From Unix use the
42technique from before to create a new directory: `mkdir
43your-urbit/site/web/meet/; touch your-urbit/site/web/meet/about.md`.
44Then put the following in `site/web/about.md`:
46 ---
47 navdpad: false
48 navmode: navbar
49 navpath: /meet
50 navhome: /meet
51 title: About
52 ---
54 # About
56 ## Mission statement
58 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.
60 ## Members
62 Membership is open to anyone. Just send a message to `~talsur-todres`.
64 - Shōtarō Kaneda
65 - Motoko Kusanagi
66 - Ishikawa
67 - Faye Valentine
68 - Spike Spiegel
70And `site/web/projects.md`:
72 ---
73 navdpad: false
74 navmode: navbar
75 navpath: /meet
76 navhome: /meet
77 title: Projects
78 ---
80 # Projects
82 ## Active
84 <list />
86 ## Discussion
88 <div class="mini-module">
89 <script src="/~/at/lib/js/urb.js"/>
90 <script src="https://cdn.rawgit.com/seatgeek/react-infinite/0.8.0/dist/react-infinite.js"/>
91 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment-with-locales.js"/>
92 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.1/moment-timezone.js"/>
93 <script src="/talk/main.js"/>
94 <link href="/talk/main.css" rel="stylesheet" />
95 <talk readonly="" chrono="reverse" station="comments" />
96 </div>
98This page introduces a new thing: the `:talk` module. Inside of the
99`mini-module` div we load the scripts needed by the `<talk>`
100component. The `<talk>` component is a static component for
101displaying a feed from a talk channel inline. Here we're going to
102display the discussion from our active projects inline.
104We'll need a few active projects though. From unix: `mkdir
105your-urbit/site/web/meet/projects; touch
106your-urbit/site/web/meet/projects/bike.md`.
108In `site/web/meet/projects/bike.md`:
110 ---
111 navdpad: false
112 navmode: navbar
113 navpath: /meet
114 navhome: /meet
115 title: Kaneda's Bike
116 comments: true
117 ---
119 # Urbit on a Motorcycle
121 Discussion on getting urbit to power Kaneda's motorcycle.
123Here we just use the `comments` YAML to enable comments on the page.
124Adding other imaginary projects is left to the reader.
126Building a static site takes only a few minutes and a few markdown
127files. Have fun!