{"id":29111006,"url":"https://github.com/Lunna5/MetaCSR-Generator","last_synced_at":"2025-06-29T09:05:03.523Z","repository":{"id":183720912,"uuid":"637461735","full_name":"Lunna5/MetaCSR-Generator","owner":"Lunna5","description":"This is a tool to generate an index.html file for each route to have a better SEO with placeholders.","archived":false,"fork":false,"pushed_at":"2023-05-07T16:45:28.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-26T12:01:46.370Z","etag":null,"topics":["client-side-rendering","client-side-rendering-seo","csr","html-meta-tags","node","npm","seo","seo-optimization","seo-tools","vite","vitejs","webpack"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Lunna5.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,"governance":null}},"created_at":"2023-05-07T16:18:08.000Z","updated_at":"2023-05-07T18:53:27.000Z","dependencies_parsed_at":"2023-07-25T15:18:39.060Z","dependency_job_id":null,"html_url":"https://github.com/Lunna5/MetaCSR-Generator","commit_stats":null,"previous_names":["angelillo15/metapage"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lunna5/MetaCSR-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lunna5%2FMetaCSR-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lunna5%2FMetaCSR-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lunna5%2FMetaCSR-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lunna5%2FMetaCSR-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lunna5","download_url":"https://codeload.github.com/Lunna5/MetaCSR-Generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lunna5%2FMetaCSR-Generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262063353,"owners_count":23252760,"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":["client-side-rendering","client-side-rendering-seo","csr","html-meta-tags","node","npm","seo","seo-optimization","seo-tools","vite","vitejs","webpack"],"created_at":"2025-06-29T09:05:01.232Z","updated_at":"2025-06-29T09:05:03.516Z","avatar_url":"https://github.com/Lunna5.png","language":"TypeScript","readme":"# MetaCSR Generator\n\nThis is a tool to generate an index.html file for each route to have a better SEO.\n\n\n## Installation\n\n### NPM\n\n```bash\nnpm install -D metacsr-generator\n```\n\n### Yarn\n\n```bash\nyarn add -D metacsr-generator\n```\n\n## Usage (example for vite)\n\nCreate a metacsr.json file in the root of your project with the example configuration below.\n\n```json\n{\n    \"project\": \"Minearte Web\",\n    \"baseHtmlPath\": \"./dist/index.html\",\n    \"distPath\": \"./dist/\",\n    \"routes\": [{\n        \"name\": \"Home\",\n        \"path\": \"/\",\n        \"description\": \"Home page\",\n        \"replaceMap\": [{\n            \"search\": \"{%title%}\",\n            \"replace\": \"Home Page\"\n        }]\n    },\n    {\n        \"name\": \"About\",\n        \"path\": \"/about\",\n        \"description\": \"About page\",\n        \"replaceMap\": [{\n            \"search\": \"{%title%}\",\n            \"replace\": \"About Page\"\n        }]\n    }]\n}\n```\nAnd in your html you can add the placeholders\n```html \n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n  \u003chead\u003e\n    \u003cmeta charset=\"UTF-8\" /\u003e\n    \u003clink rel=\"icon\" href=\"/src/assets/favicon.ico\" /\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" /\u003e\n    \u003cmeta\n      name=\"description\"\n      content=\"{%description%}\"\n    /\u003e\n\n    \u003ctitle\u003e{%title%}\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv id=\"app\"\u003e\u003c/div\u003e\n    \u003cscript type=\"module\" src=\"/src/main.ts\"\u003e\u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThat will generate this structure\n```bash\ndist/\n├── about\n│   └── index.html\n└── index.html\n```\n\nHere is an example in vite of a package.json\n\n```json\n{\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vue-tsc \u0026\u0026 vite build \u0026\u0026 cp dist/index.html dist/404.html \u0026\u0026 metacsr -v --config metacsr.json\",\n    \"preview\": \"vite preview\"\n  },\n  \"meta-csr-generator\": {\n    \"routes\": [\n      \"/\",\n      \"/about\",\n      \"/contact\"\n    ]\n  }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLunna5%2FMetaCSR-Generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLunna5%2FMetaCSR-Generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLunna5%2FMetaCSR-Generator/lists"}