MCPSERV.CLUB
HTMLy

HTMLy

Self-Hosted

Fast, flat‑file PHP blogging platform

Active(91)
1.3kstars
0views
Updated 3 days ago
HTMLy screenshot

Overview

Discover what makes HTMLy powerful

HTMLy is a **databaseless, flat‑file PHP blogging platform** that emphasizes speed, simplicity, and security. From a developer’s perspective it behaves like a lightweight micro‑framework: all content lives in the file system, while routing and rendering are handled by a custom engine written in pure PHP. The core algorithm indexes posts on the fly, enabling instant lookup by date, type, category, tag, or author without any database query overhead. Even with tens of thousands of posts and hundreds of tags, the lookup cost remains negligible thanks to an efficient in‑memory hash table built during a single pass over the content directory.

Language & Runtime

Data Layer

Template Engine

Caching

Overview

HTMLy is a databaseless, flat‑file PHP blogging platform that emphasizes speed, simplicity, and security. From a developer’s perspective it behaves like a lightweight micro‑framework: all content lives in the file system, while routing and rendering are handled by a custom engine written in pure PHP. The core algorithm indexes posts on the fly, enabling instant lookup by date, type, category, tag, or author without any database query overhead. Even with tens of thousands of posts and hundreds of tags, the lookup cost remains negligible thanks to an efficient in‑memory hash table built during a single pass over the content directory.

Architecture

  • Language & Runtime: PHP 7.2+ with standard extensions (mbstring, xml, intl, gd, zip).
  • Data Layer: Flat‑file storage. Markdown files are stored under /content, each accompanied by a YAML front‑matter block that defines metadata (title, slug, tags, etc.).
  • Template Engine: Built‑in PHP templating with a minimal set of helper functions for rendering posts, archives, and navigation.
  • Caching: Simple file‑based cache under /cache to store precompiled templates and index data, reducing disk I/O on subsequent requests.
  • Admin Interface: A lightweight MVC‑style dashboard built with vanilla PHP, offering CRUD for posts, pages, users, and settings without external JavaScript frameworks.

Core Capabilities

  • Full‑text Search: Powered by a custom inverted index that scans Markdown files and builds searchable tokens on the fly.
  • Scheduled & Scheduled Publishing: Posts can be marked with a future timestamp; the engine automatically publishes them when the site is accessed.
  • Custom Fields & Metadata: Users can define arbitrary key/value pairs in the YAML front‑matter, accessible via template tags.
  • API Exposure: A REST‑style endpoint (/api/v1) allows external services to fetch posts, categories, and tags in JSON.
  • Webhooks: Built‑in support for triggering external URLs on events such as post creation, update, or deletion.
  • Two‑Factor Authentication: Optional 2FA for the admin panel using TOTP, enhancing security without external dependencies.

Deployment & Infrastructure

HTMLy is designed for self‑hosting on any LAMP stack. A single install.php bootstrapper creates the minimal configuration and seeds an admin user. Once installed, it can run on shared hosting with as little as 512 MB RAM and still comfortably serve >20,000 posts. The absence of a database eliminates the need for RDBMS provisioning and scaling.
Containerization is straightforward: a Dockerfile is provided that exposes port 80, mounts the /content and /cache volumes for persistence, and runs PHP‑FPM with Nginx. This makes it trivial to deploy in Kubernetes or Docker Compose environments.

Integration & Extensibility

  • Theme System: Themes are simple PHP/HTML directories that override core templates. No build step is required, allowing developers to tweak the UI quickly.
  • Plugin Hook: The core exposes add_filter and add_action hooks, enabling developers to inject logic at key points (e.g., before rendering a post).
  • Custom Routes: Advanced users can register new URL patterns via the admin panel or by editing a small routing file.
  • CLI Utilities: A command‑line script (htmly.php) offers tasks such as cache clearing, backup generation (ZIP), and site health checks.

Developer Experience

Documentation is concise but thorough, covering installation, configuration, API usage, and theme development. The codebase follows PSR‑4 autoloading conventions, making IDE integration seamless. Community support is active on GitHub, with a growing list of contributors and frequent security audits for new features. Licensing under GPL‑2+ ensures that any derivative work remains open source, which is attractive for projects that value transparency and community collaboration.

Use Cases

  • Personal or Technical Blogs: Rapid deployment with zero database setup, ideal for writers who prefer Markdown and minimal maintenance.
  • Documentation Sites: The flat‑file structure pairs well with static site generators; developers can host docs and blog content together.
  • Micro‑services Monitoring: Use the API to expose service logs or status pages as markdown posts, leveraging HTMLy’s scheduled publishing for automated reports.
  • Embedded CMS: Integrate into existing PHP applications by mounting the /content directory and using the API for content injection.

Advantages

  • Performance: No DB queries; lookup is O(1) thanks to in‑memory indexing.
  • Simplicity: Zero external dependencies beyond core PHP extensions; no ORM or migration tooling.
  • Security: All features are part of the core, reducing the attack surface compared to plugin‑heavy CMSs.
  • Scalability: Runs comfortably on shared hosting, yet can be containerized for cloud deployments.
  • Open Source Freedom: GPL‑2+ licensing guarantees that enhancements remain free and modifiable.

In summary, HTMLy offers developers a lightweight, high‑performance blogging platform that eliminates the complexity of traditional CMSs while still providing robust features and extensibility. Its flat‑file architecture, coupled with a well‑documented API and hook system, makes it an excellent choice for projects that demand speed, security

Open SourceReady to get started?

Join the community and start self-hosting HTMLy today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
GPL-2.0
Stars
1.3k
Technical Specs
Pricing
Open Source
Database
None
Min RAM
512MB
Supported OS
Linux
Author
danpros
danpros
Last Updated
3 days ago