📄️ Static files
Having your views is nice and all... but what about images? videos? or maybe you would like to not have to use ` for CSS and ` for your JS.
📄️ Dynamic routes
Sometimes you don't know the exact route (this is more common in APIs). For example, let's say you want to have a route /api/user/USERIDHERE. Of course you don't want to have a million folders every single one named with a different user id. That's where dynamic routes come into play.
📄️ Route handlers
Sometimes you want a single endpoint for your users, for example /api/user and depending on the method used on the request act accordingly. For example, create an user with method POST, get users with method GET and more.
📄️ Renaming folders
If you wish to rename either the views, routes or public folders you can do so in index.ts as follows:
📄️ Code generation
Do you often forget how to write boilerplate code? Why not just let HTMV do it for you?
📄️ Interpolation
As mentioned briefly at the start of the docs. One of HTMV's main features is interpolation.
📄️ Attribute binding
Although being able to interpolate values is nice, sometimes you need just a bit more than that.
📄️ Components
One of HTMV's key values is that a component is just a view. Therefore, your example view is already a component!
📄️ Hot reloading
Hot reloading has not yet been fully developed. For now, you may develop with bun dev, which will take care of reloading on route code change. However, note that this won't include views or hot reloading in the browser.
📄️ Linting
As of now, views work under the .html extension. However, that is subject to change in the future due to HTMV's language adding features which do not exist on normal HTML. Expect errors to appear on your editor when working with views. This will get sorted out once the .htmv extension becomes available.
📄️ CLI
HTMV comes with a built-in CLI to help you with development.
📄️ Still have questions?
How about asking the DeepWiki instead?