{"id":15861776,"url":"https://github.com/liruifengv/starlight-head","last_synced_at":"2026-02-26T06:25:34.283Z","repository":{"id":228542778,"uuid":"774271059","full_name":"liruifengv/starlight-head","owner":"liruifengv","description":"A Starlight plugin for easy to add \u003chead\u003e for your Starlight site","archived":false,"fork":false,"pushed_at":"2024-04-09T02:47:24.000Z","size":206,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-19T21:59:02.892Z","etag":null,"topics":["astro","head","plugin","starlight"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/liruifengv.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":"2024-03-19T08:54:02.000Z","updated_at":"2024-09-08T09:10:21.000Z","dependencies_parsed_at":"2024-03-19T10:41:30.992Z","dependency_job_id":"2b0ec9e6-90e0-4622-8f4e-a42059c0e06c","html_url":"https://github.com/liruifengv/starlight-head","commit_stats":{"total_commits":22,"total_committers":3,"mean_commits":7.333333333333333,"dds":0.09090909090909094,"last_synced_commit":"5f0691bec0535543b04a8b6ef491e37919e26f5c"},"previous_names":["liruifengv/starlight-head"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/liruifengv/starlight-head","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liruifengv%2Fstarlight-head","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liruifengv%2Fstarlight-head/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liruifengv%2Fstarlight-head/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liruifengv%2Fstarlight-head/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liruifengv","download_url":"https://codeload.github.com/liruifengv/starlight-head/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liruifengv%2Fstarlight-head/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272366747,"owners_count":24922219,"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-08-27T02:00:09.397Z","response_time":76,"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":["astro","head","plugin","starlight"],"created_at":"2024-10-05T22:05:06.381Z","updated_at":"2025-10-30T19:19:48.341Z","avatar_url":"https://github.com/liruifengv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## starlight-head\n\nA Starlight plugin for easy to add `\u003chead\u003e` for your Starlight site.\n\n### Installation\n\n```bash\nnpm install -D starlight-head\n```\n\n### Usage\n\n```js\n// astro.config.mjs\nimport { defineConfig } from \"astro/config\";\nimport starlight from \"@astrojs/starlight\";\nimport starlightHead from \"starlight-head\";\n\nexport default defineConfig({\n\tintegrations: [\n\t\tstarlight({\n\t\t\ttitle: \"My Docs\",\n\t\t\tplugins: [\n\t\t\t\tstarlightHead({\n\t\t\t\t\tpath: \"./src/components/head.astro\",\n\t\t\t\t}),\n\t\t\t],\n\t\t}),\n\t],\n});\n```\n\n```astro\n// src/components/head.astro\n---\n---\n\u003cmeta name=\"description\" content=\"This is a description by starlight-head-plugin\"\u003e\n\n\u003cscript\u003e\n\twindow.onload = function() {\n\t\tconsole.log(\"Page loaded\");\n\t}\n\u003c/script\u003e\n```\n\nIt will be covert to Starlight config:\n\n```js\nstarlight({\n\thead: [\n\t\t{\n\t\t\ttag: \"meta\",\n\t\t\tattributes: {\n\t\t\t\tname: \"description\",\n\t\t\t\tcontent: \"This is a description by starlight-head-plugin\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\ttag: \"script\",\n\t\t\tcontent: 'window.onload = function() {\\n\\tconsole.log(\"Page loaded\");\\n}',\n\t\t},\n\t],\n});\n```\n\n### Features\n\n-   [x] Add `\u003chead\u003e` content to Starlight by `.astro` component.\n-   [ ] Support expressions in `.astro` component.\n-   [ ] Supports importing variables from other files.\n-   [ ] Support add `\u003chead\u003e` for certain page.\n\n### Configuration Reference\n\n#### path (required)\n\n**type:** `string`\n\nA path to the file that contains the `\u003chead\u003e` content. Like `./src/components/head.astro`.\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliruifengv%2Fstarlight-head","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliruifengv%2Fstarlight-head","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliruifengv%2Fstarlight-head/lists"}