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> will be the version of htms

<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 users.

Warning! min only works on stable and previous releases, dev versions may not have one.

Backend (JS)

To add htms to a backend server use 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