{"id":23553062,"url":"https://github.com/rhildred/es6-template-static","last_synced_at":"2025-06-21T20:03:30.852Z","repository":{"id":52401356,"uuid":"318891600","full_name":"rhildred/es6-template-static","owner":"rhildred","description":"static site generator that works with node.js es6 templates and markdown.","archived":false,"fork":false,"pushed_at":"2021-04-30T00:36:52.000Z","size":3221,"stargazers_count":0,"open_issues_count":0,"forks_count":56,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-13T14:47:26.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhildred.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-05T21:20:54.000Z","updated_at":"2021-04-08T17:33:58.000Z","dependencies_parsed_at":"2022-08-31T23:50:59.892Z","dependency_job_id":null,"html_url":"https://github.com/rhildred/es6-template-static","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rhildred/es6-template-static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhildred%2Fes6-template-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhildred%2Fes6-template-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhildred%2Fes6-template-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhildred%2Fes6-template-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhildred","download_url":"https://codeload.github.com/rhildred/es6-template-static/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhildred%2Fes6-template-static/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261186369,"owners_count":23121937,"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":[],"created_at":"2024-12-26T11:13:58.124Z","updated_at":"2025-06-21T20:03:25.835Z","avatar_url":"https://github.com/rhildred.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ES6 Static Site Renderer ... With Markdown\n\nSimplest way that I could think of to generate a static site with ES6 templates.\n\n## Quick Start\n\nWith [live server](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer).\n\n```\nnpm install\nnpm start\n\n```\n\nRight click over `index.html` and Open with Live Server.\n\n## How to include your own content\n\nThe basic format of a page is a .js file with the same name as the .html file that you want to have generated. For instance:\n\n``` index.js\n\nconst Page = require(\"./_layout/Default\");\n\nmodule.exports = class extends Page {\n    constructor(){\n        super({title:\"Home\", sName:\"Richard Hildred\"});\n    }\n    render(sPage) {\n        return `\n        ${this.requireMarked('_pages/index.md')}\n        `;\n    }\n}\n\n```\n\nOf course this could also be used for a single page site just by using 1 template. You would also want to change the links in the `_partials/Nav.js` and `css/main.css` to bookmarklets. I wish that I had thought of this node.js approach before I did the [client side approach here](https://github.com/rhildred/browserBlog).\n\nYou can substitute your own template for the default template. The one included is:\n\n```\nconst Page = require(\"../_partials/Page\");\nconst Head = require(\"../_partials/Head\");\nconst Header = require(\"../_partials/Header\");\nconst Nav = require(\"../_partials/Nav\");\nconst Footer = require(\"../_partials/Footer\");\n\nmodule.exports = class extends Page {\n    constructor(options){\n        super();\n        Object.assign(this, options);\n    }\n    renderHeadHeaderNav(sPage) {\n        return `\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\" class=\"${sPage}\"\u003e\n    \u003chead\u003e\n    ${new Head(this).render()}\n    \u003ctitle\u003e${this.title}\u003c/title\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        ${new Header(this).render()}\n        ${new Nav(this).render()}\n        \u003cmain\u003e\n    `;\n    }\n    renderFooter(sPage){\n        return `\n    \u003c/main\u003e\n    ${new Footer(this).render()}\n    \u003c/body\u003e\n\u003c/html\u003e\n        `;\n    }\n}\n\n```\n\nAs you hopefully can see it uses lots of little files from the partials folder. You may want to paste the common part of an existing template in there. You may also want to have 1 template for pages and another for an index or overview.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhildred%2Fes6-template-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhildred%2Fes6-template-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhildred%2Fes6-template-static/lists"}