{"id":29132179,"url":"https://github.com/emadasefi/emaflatcms","last_synced_at":"2026-05-07T06:32:20.466Z","repository":{"id":301637693,"uuid":"1009873988","full_name":"emadasefi/EmaFlatCMS","owner":"emadasefi","description":"EmaFlat CMS is a lightweight Node.js-based Content Management System built with Express.js and Nunjucks. It allows users to create, edit, delete, and like blog posts stored as Markdown files, with support for file uploads and dynamic site settings via a JSON configuration.","archived":false,"fork":false,"pushed_at":"2025-06-27T22:21:03.000Z","size":1391,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-27T23:26:27.699Z","etag":null,"topics":["blog","cms","expressjs","flatcms","markdown","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emadasefi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-27T21:43:07.000Z","updated_at":"2025-06-27T22:23:32.000Z","dependencies_parsed_at":"2025-06-27T23:26:50.575Z","dependency_job_id":"6b761430-87f1-4d0b-85a3-1d6e3cf1cefc","html_url":"https://github.com/emadasefi/EmaFlatCMS","commit_stats":null,"previous_names":["emadasefi/emaflatcms"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/emadasefi/EmaFlatCMS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadasefi%2FEmaFlatCMS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadasefi%2FEmaFlatCMS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadasefi%2FEmaFlatCMS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadasefi%2FEmaFlatCMS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emadasefi","download_url":"https://codeload.github.com/emadasefi/EmaFlatCMS/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadasefi%2FEmaFlatCMS/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262720750,"owners_count":23353462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","cms","expressjs","flatcms","markdown","nodejs"],"created_at":"2025-06-30T06:16:26.877Z","updated_at":"2026-05-07T06:32:20.436Z","avatar_url":"https://github.com/emadasefi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"EmaFlat CMS: A Lightweight Node.js Content Management System\n====================================\nEmaFlat CMS is a lightweight Node.js-based Content Management System built with Express.js and Nunjucks. It allows users to create, edit, delete, and like blog posts stored as Markdown files, with support for file uploads and dynamic site settings via a JSON configuration. Features include live reloading with Chokidar, Markdown-to-HTML conversion with Showdown, and a simple interface for managing content. Ideal for developers seeking a minimal, customizable CMS for blogging.\n\u003cbr\u003e\n📌 EmaFlat CMS is a minimalist, open-source Content Management System (CMS) built with Node.js and Express.js, designed for managing blog posts and site settings with ease. It leverages Nunjucks for templating, Markdown for post content, and a JSON-based configuration file for dynamic site settings. The CMS is ideal for developers seeking a simple, customizable platform for blogging or small-scale content management, with features like file uploads, post liking, and live reloading for development.\n\u003cbr\u003e\u003cbr\u003e\n\n\n## 🌟 Features\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eBlog Post Management\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eCreate, edit, delete, and view blog posts stored as Markdown files.\u003c/li\u003e\n\u003cli\u003eSupport for file uploads (e.g., images) associated with posts.\u003c/li\u003e\n\u003cli\u003eLike functionality for posts, stored in post metadata.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eSettings Management\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eDynamic configuration of site title, description, navigation links, footer, and text direction via setting.json.\u003c/li\u003e\n\u003cli\u003eForm-based settings updates with automatic server restart.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eTemplating\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eUses \u003cstrong\u003eNunjucks\u003c/strong\u003e for rendering dynamic HTML templates.\u003c/li\u003e\n\u003cli\u003eTemplates for homepage, blog listing, post view, post creation/editing, settings, and about page.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eFile Watching\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eLive reloading of changed files (views, routes, public, setting.json) using \u003cstrong\u003eChokidar\u003c/strong\u003e for development.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eMarkdown Support\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eConverts Markdown post content to HTML using \u003cstrong\u003eShowdown\u003c/strong\u003e.\u003c/li\u003e\n\u003cli\u003eStores post metadata (e.g., title, date, likes) using \u003cstrong\u003eGray-Matter\u003c/strong\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eStatic File Serving\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eServes static assets from the public directory and uploaded files from db/uploads.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eError Handling\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eBasic error handling middleware for server errors.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eResponsive Design\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003eSupports text direction (ltr or rtl) via settings.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ol\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n\n## ⚙️ Settings File (setting.json):\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e: Stores configuration data for the CMS, such as the site title, description, navigation links, footer text, and text direction.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eStructure\u003c/strong\u003e:\n\u003cul dir=\"auto\"\u003e\n\u003cli\u003ecms-title: The title of the CMS (e.g., \"EmaFlat\").\u003c/li\u003e\n\u003cli\u003ecms-desc: A long description for the CMS.\u003c/li\u003e\n\u003cli\u003eheader: An object mapping routes to navigation labels (e.g., \"/\": \"Home\").\u003c/li\u003e\n\u003cli\u003efooter: Footer text (e.g., \"\u0026copy; 2025 Emad Asefi\").\u003c/li\u003e\n\u003cli\u003edirection: Text direction (e.g., ltr for left-to-right).\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n\n## 🔗 Packages Used\n\u003cp dir=\"auto\" style=\"white-space: pre-wrap;\"\u003eThe application relies on the following Node.js packages, as seen in the code:\u003c/p\u003e\n\u003col dir=\"auto\"\u003e\n\u003cli\u003e\u003cstrong\u003eexpress\u003c/strong\u003e: Web framework for building the server and handling routes.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003enunjucks\u003c/strong\u003e: Templating engine for rendering dynamic HTML.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003echokidar\u003c/strong\u003e: File watcher for live reloading during development.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003efs (Node.js built-in)\u003c/strong\u003e: File system operations for reading/writing posts and settings.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003epath (Node.js built-in)\u003c/strong\u003e: Path manipulation for file and directory handling.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003emulter\u003c/strong\u003e: Middleware for handling file uploads.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003eshowdown\u003c/strong\u003e: Converts Markdown to HTML for blog post rendering.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003egray-matter\u003c/strong\u003e: Parses front-matter in Markdown files to extract metadata.\u003c/li\u003e\n\u003cli\u003e\u003cstrong\u003echild_process (Node.js built-in)\u003c/strong\u003e: Used for executing the npm restart command in setting.js.\u003c/li\u003e\n\u003c/ol\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n\n\n## 💡 How to Use and Start the Application :\n```shell\nnpm install express nunjucks chokidar multer showdown gray-matter\nnodemon app.js\n```\n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot0.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \u003c/img\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n\n\n## 🖼️ ScreenShots :\n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot1.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot2.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot3.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot4.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \n\u003cimg src=\"https://raw.githubusercontent.com/emadasefi/EmaFlatCMS/refs/heads/main/screenShot/EmadFlat-ScreenShot5.jpg\" alt=\"EmaFlatCMS Blog\"\u003e \n\u003cbr\u003e\u003cbr\u003e\n\n\n## — Feedback ❤️—\nYour feedback helps shape the future of EmaFlat CMS, and we appreciate every contribution from the community!\u003cbr\u003e\nPlease leave a comment if you have any comments, suggestions or problems.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femadasefi%2Femaflatcms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femadasefi%2Femaflatcms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femadasefi%2Femaflatcms/lists"}