{"id":21539895,"url":"https://github.com/raruto/cockpit-blog","last_synced_at":"2026-04-10T01:39:53.262Z","repository":{"id":98199456,"uuid":"328512535","full_name":"Raruto/cockpit-blog","owner":"Raruto","description":"Simple blog implementation with a router","archived":false,"fork":false,"pushed_at":"2021-10-21T18:14:26.000Z","size":62039,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-24T08:11:37.569Z","etag":null,"topics":["blog","cockpit","markdown","mongodb","php","phpmailer","rest-api","router","starter","tinymce"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/Raruto.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}},"created_at":"2021-01-11T00:55:51.000Z","updated_at":"2022-11-19T14:11:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"e47c94d9-8cd1-4c37-9a17-ffade60820d8","html_url":"https://github.com/Raruto/cockpit-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fcockpit-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fcockpit-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fcockpit-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raruto%2Fcockpit-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raruto","download_url":"https://codeload.github.com/Raruto/cockpit-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244117041,"owners_count":20400735,"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","cockpit","markdown","mongodb","php","phpmailer","rest-api","router","starter","tinymce"],"created_at":"2024-11-24T04:16:40.349Z","updated_at":"2025-12-31T00:17:08.984Z","avatar_url":"https://github.com/Raruto.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cockpit-blog\n\nSimple blog implementation with a router\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Raruto/cockpit-blog\"\u003e\u003cimg src=\"_site/addons/SampleData/uploads/1976/07/28/BrianShul.jpg\" alt=\"The Untouchables\" title=\"Sled driver\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003cblockquote\u003e\n    \u003cp align=\"center\"\u003e\n        \u003cem\u003eInitially based on \u003ca href=\"https://github.com/Raruto/cockpit-legacy-docs/blob/master/tutorials/simple_blog.md\"\u003ecockpit-docs/tutorials/simple_blog.md\u003c/a\u003e\u003c/em\u003e\n    \u003c/p\u003e\n\u003c/blockquote\u003e\n\n---\n\n### Quickstart:\n\n 1. Download and extract: https://github.com/raruto/cockpit-blog/archive/master.zip\n 2. Move it to your localhost server and open: http://localhost/cockpit-blog/install\n 3. Your website is now available at: http://localhost/cockpit-blog\n\n## How to develop:\n\nPublic stuffs are located at project web root (`_site`, `css`, `js` and `media` folders).\n\n- **Theme:**\n    php template files are located in the `_theme/views` folder.\n\n- **Assets:**\n    static theme files are located at project web root (`css`, `js`, `media` folders).\n\n- **Router:**\n    public site routes are defined in the root **[`index.php`](index.php)** file.\n\n- **Images:**\n    uploaded images are located in the `media/uploads` folder.\n\n- **Database:**\n    files are located in the `_site/data` folder.\n\n- **Addons:**\n    cockpit addons can be placed in the `_site/addons` or `admin/addons` folders (according to your needs).\n\n- **Config:**\n    common configuration files are located in the `_site/config` folder, default constants are overridable in through the `_site/defines.php` file.\n\n- **Cockpit:**\n    core files are located within the `admin` folder, you can rename it to something less \"common\" (without pain), but you shouldn't edit any other files inside that folder (unless you know what you're doing).\n\nOpen a shell at project web root and run: `php -S localhost:8080 index.php` for starting the built-in development server.\n\n### Cockpit Core:\n\nThe following components are shipped by the CMS:\n\n- [MongoDB](https://docs.mongodb.com/manual/reference/) query language\n- [UIKit](https://getuikit.com/docs/) + [Riot.js](https://riot.js.org/documentation/) components\n- [TinyMCE](https://www.tiny.cloud/docs/) + [Markdown](https://daringfireball.net/projects/markdown/syntax) editor\n- [Lime](https://github.com/agentejo/lime) php micro-framework\n- [Lexy](https://cpmultiplane.rlj.me/en/docs/lexy) templating engine\n- [Rest API](https://getcockpit.com/documentation/api) endpoints\n- [PHPMailer](https://github.com/PHPMailer/PHPMailer) forms\n\n**Note:** although cockpit take advantage of the \"MongoDB\" query language, it doesn't really need a MongoDB server to operate and, unless configured otherwise, it stores all information as json documents within the built-in [SQLite](https://www.sqlite.org/) database located in the [`cockpit/storage/data`](https://github.com/agentejo/cockpit/tree/next/storage/data) folder (see: [MongoHybrid](https://github.com/agentejo/cockpit/tree/next/lib/MongoHybrid), [MongoLite](https://github.com/agentejo/cockpit/tree/next/lib/MongoLite) and [bootstrap.php](https://github.com/agentejo/cockpit/blob/next/bootstrap.php) for further information). Check out the [cockpit-sql-driver](https://github.com/piotr-cz/cockpit-sql-driver) integration if you are planning to use a _MySQL_, _MariaDB_ or _PostgreSQL_ server instance.\n\n### Cockpit Core (Modules):\n\nThe following classes are part of the cockpit core:\n\n- [Cockpit](https://github.com/agentejo/cockpit/tree/next/modules/Cockpit)\n- [Collections](https://github.com/agentejo/cockpit/tree/next/modules/Collections)\n- [Singletons](https://github.com/agentejo/cockpit/tree/next/modules/Singletons)\n- [Forms](https://github.com/agentejo/cockpit/tree/next/modules/Forms)\n\n**Note:** take a look at the following [SQL to MongoDB](https://docs.mongodb.com/manual/reference/sql-comparison/) comparison to fully understand the difference between \"[collections](https://docs.mongodb.com/manual/core/databases-and-collections/)\" and \"tables\"\n\n### Cockpit Addons:\n\nThe following plugins are bundled in this repository:\n\n- [Autosave](_site/addons/Autosave)\n- [BetterSlugs](_site/addons/BetterSlugs)\n- [ExtendedForms](_site/addons/ExtendedForms)\n- [ExtendedLime](_site/addons/ExtendedLime)\n- [ExtendedUI](_site/addons/ExtendedUI)\n- [Honeypot](_site/addons/Honeypot)\n- [ImageOptimizer](_site/addons/ImageOptimizer)\n- [MaintenanceMode](_site/addons/MaintenanceMode)\n- [Matomo](_site/addons/Matomo)\n- [NativeLazyLoading](_site/addons/NativeLazyLoading)\n- [PWA](_site/addons/PWA)\n- [RSSFeed](_site/addons/RSSFeed)\n- [SampleAddon](_site/addons/SampleAddon)\n- [SampleData](_site/addons/SampleData)\n- [SVGFavicon](_site/addons/SVGFavicon)\n- [XMLSitemaps](_site/addons/XMLSitemaps)\n- [Snippets](_site/addons/Snippets)\n\n**Note:** take a look at the [Cockpit-Helpers](https://github.com/pauloamgomes/CockpitCMS-Helpers) and [Cockpit-Scripts](https://github.com/raffaelj/cockpit-scripts) repositories to find out some other useful code samples on how to build your own addons (see also: [list-of-cockpit-addons](https://discourse.getcockpit.com/t/list-of-cockpit-addons/234)).\n\n### Translating cockpit (i18n):\n\nDownload and copy appropriate language files from:\n\n- [cockpit-i18n](https://github.com/agentejo/cockpit-i18n/) to `/cockpit/config/cockpit/i18n`\n- [tinymce-i18n](https://www.tiny.cloud/get-tiny/language-packages/) to `/cockpit/storage/assets/cockpit/i18n/tinymce`\n\nAfter that you will be able to change the language of Cockpit from the `accounts` panel (admin dashboard).\n\n**Note:** check out the [`i18n`](https://zeraton.gitlab.io/cockpit-docs/guide/basics/configuration.html#i18n-string) and [`languages`](https://zeraton.gitlab.io/cockpit-docs/guide/basics/configuration.html#languages-object-array) directives if you wish to set a default language for all users (see: [zeraton-docs](https://zeraton.gitlab.io/cockpit-docs/guide/basics/configuration.html) to understand how to edit cockpit `config` files)\n\n### Upgrading cockpit (Core):\n\nBackup your `admin/defines.php` file and replace the `admin` folder with your [cockpit-next](https://github.com/agentejo/cockpit/releases) release.\n\n---\n\n\u003cdetails\u003e\n \u003csummary\u003e\u003cstrong\u003eUseful links\u003c/strong\u003e\u003c/summary\u003e\u003cbr\u003e\n\n - [Cockpit](https://getcockpit.com/documentation) / [Zeraton](https://zeraton.gitlab.io/cockpit-docs) docs\n - [Lexy](https://cpmultiplane.rlj.me/en/docs/lexy) / [Blade](https://laravel.com/docs/blade) templating\n - [MongoDB](https://docs.mongodb.com/manual/reference/sql-comparison/) reference guide\n - Cockpit [Forum](https://getcockpit.com/support) / [Issues](https://github.com/agentejo/cockpit/issues)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n \u003csummary\u003e\u003cstrong\u003eScreenshot\u003c/strong\u003e\u003c/summary\u003e\u003cbr\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/Raruto/cockpit-blog\"\u003e\u003cimg src=\"media/app/theme-preview.png\" alt=\"Blog Article\" title=\"Blog Article\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n \u003csummary\u003e\u003cstrong\u003eImplementation notes\u003c/strong\u003e\u003c/summary\u003e\u003cbr\u003e\n\n  **Already Implemented:**\n\n  - [Semantic Elements](https://www.w3schools.com/html/html5_semantic_elements.asp)\n  - [Native Lazy Loading](https://web.dev/browser-level-image-lazy-loading/)\n  - [SVG Favicons](https://medium.com/swlh/are-you-using-svg-favicons-yet-a-guide-for-modern-browsers-836a6aace3df)\n  - [Sitemap XML](https://developers.google.com/search/docs/advanced/sitemaps/build-sitemap)\n  - [RSS feed](https://www.rssboard.org/rss-specification)\n  - [JSON feed](https://www.jsonfeed.org/)\n  - [Robots.txt](https://developers.google.com/search/docs/advanced/robots/create-robots-txt)\n  - [Manifest.json](https://web.dev/add-manifest/)\n  - [Open Graph](https://developers.facebook.com/docs/sharing/webmasters/)\n  - [Twitter cards](https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started)\n  - [Schema.org](https://schema.org/docs/gs.html)\n  - [Matomo Tracking](https://developer.matomo.org/guides/tracking-javascript-guide)\n  - [Offline caching](https://developers.google.com/web/ilt/pwa/caching-files-with-service-worker) (PWA - Service Worker)\n  - [Posts Pagination](_theme/views/partials/pagination.php)\n  - [Installer Script](install/index.php)\n  - [Privacy and Cookie](https://creativecommons.org/policies/)\n  - [Contact form](https://github.com/raffaelj/cockpit-scripts/blob/master/form-validation/contact.php)\n  - Search form\n\n  **Next Steps:**\n  - Multilingualism _(eg. through a catch-all route: `$app-\u003erun('/*')`)_\n\n\u003c/details\u003e\n\n---\n\n**Special thanks to:** [Artur Heinze](https://github.com/aheinze), [Paulo Gomes](https://github.com/pauloamgomes) and [Raffael Jesche](https://github.com/raffaelj)\n\n**Related projects:** [Copilot](https://github.com/agentejo/copilot), [Monoplane](https://github.com/raffaelj/Monoplane-Demo), [CpMultiplane](https://github.com/raffaelj/cpmp-lib-skeleton)\n\n\n**Compatibile with:** [![Cockpit CMS](https://img.shields.io/badge/cockpit-0.11.2-1EB300.svg?style=flat)](https://github.com/agentejo/cockpit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fcockpit-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraruto%2Fcockpit-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraruto%2Fcockpit-blog/lists"}