{"id":19987126,"url":"https://github.com/lebcit/blog-doc-space","last_synced_at":"2025-07-26T15:10:32.535Z","repository":{"id":147779762,"uuid":"590632133","full_name":"LebCit/blog-doc-space","owner":"LebCit","description":"Blog-Doc's implementation on Deta Space.","archived":false,"fork":false,"pushed_at":"2024-02-24T05:45:51.000Z","size":4997,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-04T08:36:39.875Z","etag":null,"topics":["blog","blog-engine","blog-theme","cms","content-management-system","ejs","markdown","markdown-to-html","ssg","ssg-build","ssg-theme","static-site","static-site-generator"],"latest_commit_sha":null,"homepage":"https://deta.space/discovery/@lebcit/blocdoc","language":"HTML","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/LebCit.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":"2023-01-18T21:09:35.000Z","updated_at":"2024-10-28T00:48:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"6f5e1b6c-ed6e-49b1-9a80-f419092ce8c4","html_url":"https://github.com/LebCit/blog-doc-space","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/LebCit/blog-doc-space","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebCit%2Fblog-doc-space","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebCit%2Fblog-doc-space/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebCit%2Fblog-doc-space/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebCit%2Fblog-doc-space/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LebCit","download_url":"https://codeload.github.com/LebCit/blog-doc-space/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebCit%2Fblog-doc-space/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267184054,"owners_count":24049126,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","blog-engine","blog-theme","cms","content-management-system","ejs","markdown","markdown-to-html","ssg","ssg-build","ssg-theme","static-site","static-site-generator"],"created_at":"2024-11-13T04:33:48.459Z","updated_at":"2025-07-26T15:10:32.372Z","avatar_url":"https://github.com/LebCit.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog-Doc\n\nThe Simplest Node.js CMS \u0026 SSG!\u003cbr /\u003e\nA tiny flame in the darkness of error...\n\n\u003e [!IMPORTANT]  \n\u003e This documentation no longer represents the diverse features of Blog-Doc. Kindly consult the comprehensive [documentation](https://blog-doc.pages.dev/) for up-to-date information on Blog-Doc's functionalities.\n\n## Blazing fast and simple 🚀\n\n-   A zero code configuration static site generator.\n-   Ready to use as a Node.js CMS.\n-   Without any unnecessary functionalities, loads in a blink of an eye.\n-   Easy to install and use.\n\n## Design 🎨\n\n-   Responsive, elegant and simple layout.\n-   Ready to use template for blog and/or documentation.\n-   Easy to modify if you opt for another design.\n\n## Features\n\n-   Administrate your app from the front-end!\n-   [Themes](#themes) to change the look and feel of your site! (**COMING SOON TO SPACE**)\n-   [Gallery](#the-gallery) to upload your images\n-   Create, Read, Update \u0026 Delete your pages and posts\n-   Paginated blog with chosen number of posts per page\n-   Posts pagination to navigate between your posts\n-   Write your content in Markdown\n-   Ability to use HTML in Markdown\n-   Tag(s) for posts\n-   Featured image for posts and pages\n-   Archive route for posts\n-   Tags list route\n-   Individual route for each tag\n-   Titles \u0026 Meta Descriptions\n-   Drag and drop your menu links to sort them\n-   [RSS feed](#rss)\n-   [Sitemap](#sitemap)\n-   [Search](#search)\n-   [Code highlighting](#code-highlighting) with [highlight.js](https://highlightjs.org/)\n-   [Ids for H2 till H4 in Markdown](#ids-for-h2-till-h4-in-markdown)\n-   No need for hot reloading in development mode (**INFO FOR DEVELOPERS**)\n\n## How to install Blog-Doc?\n\nTo install Blog-Doc on Space, head over its [installation page](https://deta.space/discovery/@lebcit/blocdoc) and click on the `Install App` button.\n\nOnce installed, open the app from your [Horizon](https://deta.space/docs/en/use/interface#horizon) or by [accessing the builder instance](https://deta.space/docs/en/build/fundamentals/development/builder-instance#accessing-a-builder-instance) of the app and clicking on the `Open Builder Instance` button.\n\nYou will be redirected to the app's address and see in your browser the following message: `Route Not Found`.\u003cbr /\u003e\nPlease don't freak out! I've tried some other ways, but this is the simplest and most secure one.\n\nNow assuming that your instance of Blog-Doc has the following address:\u003cbr /\u003e\n`https://abc-1-x234.deta.app`, in the [address bar](https://en.wikipedia.org/wiki/Address_bar) of your browser.\u003cbr /\u003e\nAdd after it `/admin-blog-doc-config`, the address is now:\u003cbr /\u003e\n`https://abc-1-x234.deta.app/admin-blog-doc-config`, hit enter.\u003cbr /\u003e\nYou'll be redirected to a page that will guide you on setting the main configuration to begin using Blog-Doc, 2 easy steps of 2 minutes.\u003cbr /\u003e\nAt the end you'll submit a form, it takes at most 30 seconds to upload the configuration, then you'll be redirected to the initial address `https://abc-1-x234.deta.app` and see once again: `Route Not Found`.\u003cbr /\u003e\nAgain don't panic! Just add `/pages/documentation`` after the address. Browse inside the app for a minute (time for the code to interact with the newly created drive) without visiting the home route, then go to the main route and begin to use your own instance of Blog-Doc 🎉\u003cbr /\u003e\nIf it doesn't work from the first time do it again once more and it will.\n\n## RSS!\n\n⚠️ You **MUST** provide the **live URL** of your site in the **Settings page** under the administration by modifying the `siteURL` value before deploying the application.\n\n_Nota Bene : the live URL **MUST** end with a slash `/`_\n\nOf course, you **MUST** also modify `siteTitle`, `siteDescription` and `rssCopyright` in the Settings page.  \nYou **SHOULD** replace the `siteTitle`, `siteDescription` and `rssCopyright` **values** with the ones of your site.  \nYou **MAY** replace the `rssSiteLanguage` value with the language of your site.  \nA list of available language codes can be found on the [RSS language codes page](https://www.rssboard.org/rss-language-codes).\n\n[⬆️ Back to features](#features)\n\n## Sitemap\n\nLike the RSS feed, you **MUST** provide the **live URL** of your site in the Settings page by modifying the `siteURL` value to generate the correct links for each page, post, tag and template as well as for the blog routes.  \nPlease remember that the **Site URL** **MUST** end with a slash `/`\n\nYou can check the sitemap of your site under the `/sitemap` route.\n\n[⬆️ Back to features](#features)\n\n## Search\n\nBlog-Doc has a built-in search feature.  \nThe search functionality allows a user to make a research on **the titles** and **the contents** of the posts.\n\nYou can check the search of your site under the `/search` route.\n\nYou can disable the search in the Node.js app as well as for the generated static site by giving `searchFeature` a value of `false` in the Site Settings page.\n\n[⬆️ Back to features](#features)\n\n## Code highlighting\n\nBlog-Doc uses [highlight.js](https://highlightjs.org/) to highlight **block of code**.\n\nTo write **inline code**, surround your code with backticks \u003ccode\u003e\\`\\`\u003c/code\u003e.  \nTo highlight it, provide the language for the **inline code** by putting after it a curly braces with the alias of the language of the code.  \nThe following examples will give you a better idea.  \nAssuming this `css` line `p : color { red }`, to highlight it you'll write \u003ccode\u003e\\`p { color: red }\\`{language=css}\u003c/code\u003e.  \nThe code is surrounded with backticks \u003ccode\u003e\\`\\`\u003c/code\u003e and followed by `{language=alias of code language}`.\n\nTo write a **block of code**, surround your block with a pair of 3 backticks \u003ccode\u003e\\`\\`\\`\u003c/code\u003e.  \nTo highlight it, provide the alias of the language for the block just after the first 3 backticks.  \nWe'll take the previous example and highlight it as a block :\n\n\u003cpre\u003e\u003ccode\u003e\n```css\np { color: red }\n```\n\u003c/code\u003e\u003c/pre\u003e\n\nWe'll get the following output :\n\n```css\np {\n\tcolor: red;\n}\n```\n\n⚠️ **The alias of the code language**, inline or block, **is always lowercase** ⚠️\n\nVisit the [Supported Languages of highlight.js](https://highlightjs.readthedocs.io/en/latest/supported-languages.html) to get the correct alias if you're unsure.\n\nAlternatively, you can write a block of code without providing an alias, highlight.js will automatically detect the language.\u003cbr /\u003e\nIf the highlighter fails to detect the correct language for a block of code without an alias, just add the desired language to the block as indicated above.\n\n[⬆️ Back to features](#features)\n\n## Ids for H2 till H4 in Markdown\n\nAdding an `id` attribute to a heading tag, H2 till H4 only, is an optional activated feature by default.\n\nThis feature was built with edge cases and typing typos in mind :\n\n-   Regex to match curly braces ignoring everything before the last hashtag\n-   Replace accented characters, by their non accented letter\n-   Replace upper case letters by lower case one\n-   Remove special characters except hyphen and underscore\n-   Replace any number of underscore by one hyphen\n-   Replace any number of space by one hyphen\n-   Remove any number of hyphen at the beginning\n-   Replace any number of hyphen by one hyphen only\n-   Remove any number of hyphen at the end\n\nTo add an `id`, add a curly braces with a hashtag followed by the id's text.  \nThe following examples will give you a better idea :\n\n```markdown\n\u003c!-- Heading tags with an id property --\u003e\n\n## My awesome H2 title {# my-awesome-h2-title}\n\nThe HTML output will be : \u003ch2 id=\"my-awesome-h2-title\"\u003eMy awesome H2 title\u003c/h2\u003e\n\n### My awesome H3 title {# my awesome h3 title}\n\nThe HTML output will be : \u003ch3 id=\"my-awesome-h3-title\"\u003eMy awesome H3 title\u003c/h3\u003e\n\n#### My awesome H4 title {# My awesome H4 title}\n\nThe HTML output will be : \u003ch4 id=\"my-awesome-h4-title\"\u003eMy awesome H4 title\u003c/h4\u003e\n```\n\nEvery Whitespace is automatically replaced by a hyphen and any number of consecutive hyphens are replaced by one hyphen only.  \nAny number of hyphen at the beginning or the end of the id's text are removed so the following is also valid :\n\n```markdown\n## My awesome H2 title { # ----- My ----- aWEsOMe ----- h2 ----- tITlE ----- }\n\nWhatever the number of whitespace characters / hyphens is at the beginning,\nbetween the words or at the end, the HTML output will still be :\n\n\u003ch2 id=\"my-awesome-h2-title\"\u003eMy awesome H2 title\u003c/h2\u003e\n```\n\nAnything before the **last** hashtag is ignored and special characters in the id's text are ignored too :\n\n```markdown\n## My awesome H2 title { /!@# a comment ?%^\u0026 # -my= awesome+ h2 \\ ( title ) | }\n\nThe HTML output will be : \u003ch2 id=\"my-awesome-h2-title\"\u003eMy awesome H2 title\u003c/h2\u003e\n```\n\n⚠️ Please be aware that the following special characters, if used **inside the id's text** after the **last** hashtag, will not be deleted :\n\n```txt\n\u0026 will be parsed to amp (ampersand)\n\" will be parsed to quot (quotation)\n\u003e will be parsed to gt (greater then)\n\u003c will be parsed to lt (less then)\n```\n\nAs an example :\n\n```markdown\n## Honey \u0026 Bees {#Honey \u0026 Bees}\n\nThe HTML output will be : \u003ch2 id=\"honey-amp-bees\"\u003eHoney \u0026 Bees\u003c/h2\u003e\n```\n\nIf you wish to disable this feature, set the `addIdsToHeadings` value to `false` in the Site Settings page.\n\n[⬆️ Back to features](#features)\n\n## The Gallery!\n\nSince Blog-Doc turned into a CMS, I've planned to add a gallery and a way to retrieve images for the pages and posts directly.  \nNow it's almost done. Almost, because there is always space to bring on improvements.  \nFor now, you can visit the gallery by hitting the `/admin/gallery/images` route, or go to the Administration page and click on the **Gallery** link in the menu or it's card.\n\nIn the global spirit of Blog-Doc, The Galley is pretty simple to use.  \nYou'll find a drop zone where you can drop your image(s) or click on it and choose the image(s) you wish to upload.  \n⚠️ Once an image added, it will be directly uploaded to the **images** folder but will not be available yet in the gallery, you **MUST** click on the **Add image(s) ✅** button to add the image(s) to the gallery!\n\nYou can also delete an image from the gallery by clicking on it's **\u0026#10008; DELETE** button.\n\nFinally, to assign an image to a page or a post, you can, while creating or updating, choose an image from the gallery by selecting it directly from the page or post.\n\n[⬆️ Back to features](#features)\n\n## Themes\n\n(coming soon to Space)\n\nYou can switch between themes and choose the design that suites your needs.\n\nBlog-Doc comes with:\n\n-   A default theme based on the [Responsive Side Menu Layout of Pure.css](https://purecss.io/layouts/side-menu/)\n-   A clean-blog theme based on [Clean Blog](https://startbootstrap.com/theme/clean-blog) from [Start Bootstrap](https://startbootstrap.com/)\n\nIf a picture is worth a thousand words, a video is worth a million!\u003cbr /\u003e\n[A 30 seconds video](https://youtu.be/qaulkcZ-yu8) showing the ability to instantly change the look and feel of your site with Blog-Doc.\n\n**I'll be adding more themes to Blog-Doc over time.**\u003cbr /\u003e\nIf you've coded a theme for Blog-Doc and wish to list it among the available themes, you can let me know in the Discussions of Blog-Doc's repository under the [Ideas](https://github.com/LebCit/blog-doc/discussions/categories/ideas) category.\u003cbr /\u003e\nPlease keep in mind that Blog-Doc themes **MUST** only use plain JavaScript and cannot contain any code or image(s) that have publishing and/or distribution restrictions!\n\n[⬆️ Back to features](#features)\n\n## Technical information for developers\n\n### Motivation \u0026 Purpose\n\n_With all due respect to the time and hard work of every developer who made a Static Site Generator with Node.js, **including the previous versions of Blog-Doc**, those are gasworks!_\u003cbr /\u003e\n_I offer my sincerest apologies in advance to each one of these developers, but an app is not supposed to be a gasworks..._\u003cbr /\u003e\nWhile the following posts are no more relevant to the actual version of Blog-Doc they explain quite well my motivation and may shock you.\n\n**Please read** [From 145 to 7 💪](https://lebcit.github.io/posts/from-145-to-7/)\u003cbr /\u003e\n**Also read** [The New Blog-Doc](/posts/the-new-blog-doc)\u003cbr /\u003e\n**Also read** [node_modules is not heavy, developers are lazy!](https://lebcit.github.io/posts/node-modules-is-not-heavy-developers-are-lazy/)\n\n### Solid stack of technologies 🪨\n\n#### Backend (input)\n\n-   Node.js 16.x or higher.\n-   [Velocy](https://github.com/ishtms/velocy), A blazing fast, minimal backend framework for Node.js .\n-   [Eta](https://eta.js.org/), lightweight, powerful, pluggable embedded JS template engine.\n-   [Marked](https://marked.js.org/), Markdown parser and compiler. Built for speed.\n-   [formidable](https://github.com/node-formidable/formidable), The most used, flexible, fast and streaming parser for multipart form data.\n-   And [deta](https://www.npmjs.com/package/deta) for the [Drive SDK](https://deta.space/docs/en/build/reference/sdk/drive).\n\n**Blog-Doc for Space now uses only 14 modules (1916.1 KB or 1.9161 MB) instead of 131 (10082 KB or 10.082 MB)!**\n\n## FAQ\n\n\u003cdetails\u003e\n\t\u003csummary\u003eI have an issue!\u003c/summary\u003e\n\t\u003cp\u003e\n\t\tGo to the\n\t\t\u003ca href=\"https://github.com/LebCit/blog-doc-space/issues\"\u003eIssues page of Blog-Doc Space on GitHub\u003c/a\u003e\n\t\tand create a New issue by explaining as much as possible the problem you're facing.\n\t\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eI have an idea!\u003c/summary\u003e\n\t\u003cp\u003e\n\t\tGo to the\n\t\t\u003ca href=\"https://github.com/LebCit/blog-doc-space/discussions/categories/ideas\"\u003e\n\t\t\tIdeas of Blog-Doc Space on GitHub\n\t\t\u003c/a\u003e\n\t\tand tell me about it.\n\t\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eWhy the SSG is not in Blog-Doc on Space?\u003c/summary\u003e\n\t\u003cp\u003e\n\t\tIncluding the SSG in Blog-Doc on Space requires some architecture modifications.\n\t\t\u003cbr /\u003e\n\t\tI'll consider later on to include the SSG or not depending on Blog-Doc's usage and requirements on Space.\n\t\u003c/p\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\t\u003csummary\u003eWhen I open the app I get: Route Not Found!\u003c/summary\u003e\n\t\u003cp\u003e\n\t\tPlease read the\n\t\t\u003ca href=\"#how-to-install-blog-doc\"\u003einstallation section.\u003c/a\u003e\n\t\u003c/p\u003e\n\u003c/details\u003e\n\n## What's next ?\n\nI intend to make a lot of improvements to this app in my short free time.\n\nYou can take Blog-Doc as a prototype and modify it totally to use it with another design and/or another template language.\n\nI really hope that this app will be useful in any way for a lot of people out there, I'm considering it as my personal contribution to the Node.js and Markdown communities.\n\nIdeas, comments and suggestions are most welcome.\n\nSYA,\nLebCit\n\nBuilt with ❤️ by [LebCit](https://lebcit.github.io/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebcit%2Fblog-doc-space","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flebcit%2Fblog-doc-space","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebcit%2Fblog-doc-space/lists"}