Installation

Web

To use htms add the following line in your head element

<script src="https://htms.fsh.plus/js/v<VERSION>.<TYPE>" type="module" crossorigin="anonymous"></script>
<style>htms{display:none}</style>
<htms>
  Your htms config here
</htms>

<VERSION> must be the version of htms you want

<TYPE> will be either .js or .min.js

index is the main file, min will have the code minimized, for faster loading and less load on your users.

Warning! min only works on stable and previous releases, dev version will not work.

Backend (JS)

To add htms to you backend you will need to add the server-htms package

const express = require('express');
const app = express();
const htms = require('server-htms');

app.use(htms)

app.get('/', (req, res) => {
  res.htms('file/path.html')
})
npm i server-htms

Last updated