on ece6841 help sign in
urbit.org/docs/using/web/comments.umd
49 lines 1.2 kB history raw
1:- :~ navhome/'/docs/'
2 next/'true'
3 sort/'2'
4 title/'Blog comments'
5 ==
6;>
8# Blog comments
10If you followed [our previous example](./blog) you should have a
11simple blog accessible at `your-urbit.urbit.org/blog`. Here we'll
12enable comments on a post.
14First, turn comments on by editing the frontmatter in `post-1.umd`. Your frontmatter
15should look like this:
17```
18:- :~ navhome/'/blog'
19 type/'post'
20 date/'~2016.6.20'
21 title/'Blog comments'
22 comments/'true'
23 ==
24;>
25```
27Now try loading your post here: `your-urbit.urbit.org/blog/post-1`.
28You should see a comments box at the bottom of the page.
30Try posting a comment! When you do you should see the following in
31your console:
33```
34+ /~your-urbit/home/55/web/blog/post-1/comments/~2016.6.20..23.20.54..0b88/md
35------------[0]
36~your-urbit[tree]: receiving comments, ;join %comments for details
37```
39Comments are written into the filesystem in the `comments/` folder
40relative to the page they're enabled on. When a new comment is posted
41a notification is also posted to the `/comments` `:talk` channel.
43Use `;join` to keep up with comments as they get posted:
45```
46;join ~your-urbit/comments
47```
49That's it! Easy.