on b3d1cf6 help sign in
urbit.org/docs/using/web/static.md
126 lines 3.6 kB history raw
1---
2sort: 3
3title: A static site
4---
6# A static site
8Hosting a static tree of content is easy. Let's put together a really
9simple site for an imaginary Urbit meetup group.
11We assume you have at least followed the beginning of [our first
12example](./blog) and created a desk called `site` and mounted it to
13unix.
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:
35`navdpad`, `navmode` and `navpath`. `navdpad` just turns off the nav
36arrows. `navmode` can be set to 'navbar' to switch to a horizontal top
37nav instead of a left bar. `navpath` sets the path to load the nav
38items from.
40Let's create `about.md` and `projects.md`. From Unix use the
41technique from before to create a new directory: `mkdir
42your-urbit/site/web/meet/; touch your-urbit/site/web/meet/about.md`.
43Then put the following in `site/web/about.md`:
45 ---
46 navdpad: false
47 navmode: navbar
48 navpath: /meet
49 navhome: /meet
50 title: About
51 ---
53 # About
55 ## Mission statement
57 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.
59 ## Members
61 Membership is open to anyone. Just send a message to `~talsur-todres`.
63 - Shōtarō Kaneda
64 - Motoko Kusanagi
65 - Ishikawa
66 - Faye Valentine
67 - Spike Spiegel
69And `site/web/projects.md`:
71 ---
72 navdpad: false
73 navmode: navbar
74 navpath: /meet
75 navhome: /meet
76 title: Projects
77 ---
79 # Projects
81 ## Active
83 <list />
85 ## Discussion
87 <div class="mini-module">
88 <script src="/~/at/lib/js/urb.js"/>
89 <script src="https://cdn.rawgit.com/seatgeek/react-infinite/0.8.0/dist/react-infinite.js"/>
90 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment-with-locales.js"/>
91 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment-timezone/0.5.1/moment-timezone.js"/>
92 <script src="/talk/main.js"/>
93 <link href="/talk/main.css" rel="stylesheet" />
94 <talk readonly="" chrono="reverse" station="comments" />
95 </div>
97This page introduces a new thing: the `:talk` module. Inside of the
98`mini-module` div we load the scripts needed by the `<talk>`
99component. The `<talk>` component is a static component for
100displaying a feed from a talk channel inline. Here we're going to
101display the discussion from our active projects inline.
103We'll need a few active projects though. From unix: `mkdir
104your-urbit/site/web/meet/projects; touch
105your-urbit/site/web/meet/projects/bike.md`.
107In `site/web/meet/projects/bike.md`:
109 ---
110 navdpad: false
111 navmode: navbar
112 navpath: /meet
113 navhome: /meet
114 title: Kaneda's Bike
115 comments: true
116 ---
118 # Urbit on a Motorcycle
120 Discussion on getting urbit to power Kaneda's motorcycle.
122Here we just use the `comments` YAML to enable comments on the page.
123Adding other imaginary projects is left to the reader.
125Building a static site takes only a few minutes and a few markdown
126files. Have fun!