🔵
OnlyHtml
  • Getting Started
  • Essentials
  • Section Types
  • Block Types
  • Built-In Helpers
  • Backends
    • Rapid Prototyping
    • Sanity.io
    • Local Files
  • FAQ
Powered by GitBook
On this page
  • Running Your First Site
  • Auto-Generated Sanity.io Dashboard
  • Publishing

Was this helpful?

Getting Started

NextEssentials

Last updated 3 years ago

Was this helpful?

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

OnlyHtml Main Goals

  1. You only need to know HTML (plus CSS and JS to the extent that your design calls for it).

  2. Avoid designing dashboards and modeling databases

  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

# installing
git clone git@github.com:onlyhtml/starter-sanity.git my-website
cd my-website
npm install

# be ready to fill in some prompts
npm run init

# we are ready, start the server
onlyhtml serve sanity

# in another console, start the local sanity dashboard
cd my-website/sanity-studio
sanity start

Auto-Generated Sanity.io Dashboard

Publishing

OnlyHtml sites can be deployed to any static hosting provider.

onlyhtml build  # will output to ./dist
cd dist && surge # use surge.sh to deploy static sites

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
https://github.com/onlyhtml/starter-sanity
Sanity.io