Getting Started
OnlyHtml is a Static Site Generator that helps you build simple websites. It is a companion to Headless CMS systems like Sanity.io, so you get the best experience editing your content while focusing only on the front-end code.

OnlyHtml Main Goals

  1. 1.
    You only need to know HTML (plus CSS and JS to the extent that your design calls for it).
  2. 2.
    Avoid designing dashboards and modeling databases
  3. 3.
    Bring your own Headless CMS of choice or use simple markdown files

Running Your First Site

The fastest way to install and get started is to clone one of our templates:
You can do so by running
1
# installing
2
git clone [email protected]:onlyhtml/starter-sanity.git my-website
3
cd my-website
4
npm install
5
​
6
# be ready to fill in some prompts
7
npm run init
8
​
9
# we are ready, start the server
10
onlyhtml serve sanity
11
​
12
# in another console, start the local sanity dashboard
13
cd my-website/sanity-studio
14
sanity start
Copied!
The first repository will set up a website with OnlyHtml installed ready for fast prototyping but without a dashboard. starter-sanity will set up OnlyHtml and connect it to a sanity.io. Read more here Sanity.io.

Auto-Generated Sanity.io Dashboard

Publishing

OnlyHtml sites can be deployed to any static hosting provider.
1
onlyhtml build # will output to ./dist
2
cd dist && surge # use surge.sh to deploy static sites
Copied!
Last modified 3mo ago