Skip to content

Use case: community

A community site where members post, vote and discuss

Members submit stories, vote them up and reply in threads, in a classic link-and-discussion layout. Karma, flags and moderation come with it.

Live demo at hn.demo.hatamoto.dev. It resets every hour.

hatamoto kit apply hn --accept-comment-warnings

The demo

What you get

The demo runs the hn kit with sample stories and members.

  1. Stories, votes and threads

    Members submit stories and discuss them in threaded comments. The front page ranks stories by votes and age.

    • Front page, newest, past, ask, show and jobs views
    • Karma, flags and moderation, with flagged comments going dead
    • Threads up to 32 levels deep
    • A public JSON API and an RSS feed
    Open the community demo
    Front page of the community demo: a ranked list of stories under a blue header bar with new, past, comments, ask, show, jobs and submit links

    Community demo front page. Sample stories.

How it is built

One kit: a plugin and a theme

The hn kit installs the plugin and the hn-classic theme, adds a Stories content type and sets up the pages a community needs.

hn plugin
Stories, votes, karma, ranked threads, flags and moderation, built on core comments.
hn-classic theme
Ranked story rows, threaded comments with vote and flag forms that work without JavaScript, light and dark.
Stories
An ordinary content type, with comments open and a 120 minute edit window.
Comments
Core comments with the community policy. You confirm the comment warnings when you apply the kit.

Read more about the hn plugin and the hn-classic theme.

Terminal
hatamoto kit apply hn --accept-comment-warnings

Questions

What does the kit set up?

The hn plugin, the hn-classic theme, a Stories content type and 19 pages, including News, Newest, Past, Ask, Show, Jobs, Submit, Guidelines and FAQ.

Why does the command have a flag?

The kit turns comments on, and Hatamoto shows two comment warnings first. The flag accepts them together. In the admin you see the same warnings on the review screen.

How is it moderated?

The hn plugin brings karma, flags and moderation. A flagged comment goes dead, and the community comment policy applies.

Is there an API?

Yes. The plugin serves a public JSON API and an RSS feed.

More use cases

  • Use case

    Hotel websites

    Room pages, direct booking with Stripe or pay at the hotel, online check-in and a desk view.

    See the hotel use case
  • Use case

    Blog websites

    Pages, posts and a contact form from the setup wizard, ready to edit.

    See the blog use case
  • Overview

    All use cases

    Every site type with a live demo, in one place.

    See all use cases

Start with the hn kit

Install Hatamoto, then apply the kit from the command line or from Settings > Kits.

Install Hatamoto