Online or Offline Writing

Like traditional static pages, even though HTMLy is a dynamic PHP application, most important metadata such as username, category, type, tags, publication date, and slug are in the folder name and filename.

If you use the dashboard to write your posts, the folder structure and filenames will be set by the dashboard automatically.

The following is an example of a folder and file structure from HTMLy:


Here's the explanation:

  • my-username is the username.
  • my-category is the content category.
  • post is the content type. Available content type post, video, audio, link, quote.
  • 2024-01-10-15-35-45 is the published date. The date format is Y-m-d-H-i-s
  • tag1,tag2 are the tags, separated by commas
  • my-post-slug is the URL

Note: the filename metadata (post date, tags, slug) separated by an underscore.

With a structure like above, the post can now be visited even though it's just a folder structure and filename.

To claim this content or log in to dashboard, simply create my-username.ini in the config/users/ folder (see username.ini.example).

password = yourpassword

;Encryption: Set to clear, and later it will changed to password_hash automatically during login
encryption = clear

role = admin

And to add information about the author, create in content/my-username/, example:

<!--t My Cool Name t-->

Just another HTMLy user

Information about my-category can be added by creating inside the content/data/category/ folder.

<!--t My category title t-->
<!--d My category meta description d-->

This is my category info etc.

Note: The default category is Uncategorized with slug uncategorized and you do not need to creating it inside content/data/category/ folder.

Note: Delete the page folder inside the cache folder to clear the html page cache served to visitors.

Important: Every time new content added (post, pages, category), or you make changes that change the folder structure or filenames, simply delete the index and widget folder inside cache folder so that the changes detected by HTMLy.

Post Views Limitations: HTMLy using the post/page slug for the post/page views counter ID. So if you edit a post/page slug without using the dashboard, then you must edit views.json in the content/data/ folder manually to update to the correct slug.

Static pages

For static pages, use the following format:


In the example above, the creates the URL:

Thus, if you write/create files locally, you must name the .md file in the format above.

For static subpages, use the following format:


This will create the URL:

An example pages/subpages content looks like:

<!--t My page title t-->
<!--d My page meta description d-->

This is my page info etc.

Page ordering

To sort the pages, you just need to add integer value followed by a period.


For static subpages:


Content Tags

If you are writing offline, you need specify the content tags below:


<!--t Title t-->

Meta description

<!--d The meta description d-->


This is just the tags display and for the slug is in the filename.

<!--tag Tag1,Tag2 tag-->

Featured image

Post with featured image.

<!--image image-->

Featured youtube video

Post with featured youtube video.

<!--video video-->

Featured soundcloud audio

Post with featured soundcloud audio.

<!--audio audio-->

Featured link

Post with featured link.

<!--link link-->

Featured quote

Post with featured quote.

<!--quote Premature Optimization is The Root of All Evil quote-->


Example of how your post would look like:

<!--t Here is the post title t-->
<!--d The meta description d-->
<!--tag Tag1,Tag2 tag-->
<!--video video-->

Paragraph 1

Paragraph 2 etc.