{"id":28545127,"url":"https://github.com/moxystudio/next-seo","last_synced_at":"2025-07-07T02:30:39.054Z","repository":{"id":38424899,"uuid":"255302120","full_name":"moxystudio/next-seo","owner":"moxystudio","description":"Manage document head SEO metadata in your Next.js projects with a simple data structure.","archived":false,"fork":false,"pushed_at":"2023-03-07T20:44:44.000Z","size":661,"stargazers_count":4,"open_issues_count":10,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-25T16:04:52.835Z","etag":null,"topics":["base","nextjs","react"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/moxystudio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-04-13T11:01:41.000Z","updated_at":"2023-02-16T19:32:31.000Z","dependencies_parsed_at":"2024-09-18T16:57:43.535Z","dependency_job_id":null,"html_url":"https://github.com/moxystudio/next-seo","commit_stats":{"total_commits":14,"total_committers":3,"mean_commits":4.666666666666667,"dds":0.3571428571428571,"last_synced_commit":"333ad5132e814e2dea664e060f34fc3bbc936f1c"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/moxystudio/next-seo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxystudio%2Fnext-seo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxystudio%2Fnext-seo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxystudio%2Fnext-seo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxystudio%2Fnext-seo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moxystudio","download_url":"https://codeload.github.com/moxystudio/next-seo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moxystudio%2Fnext-seo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263917446,"owners_count":23529594,"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":["base","nextjs","react"],"created_at":"2025-06-09T23:06:39.528Z","updated_at":"2025-07-07T02:30:39.042Z","avatar_url":"https://github.com/moxystudio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# next-seo\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][build-status-image]][build-status-url] [![Coverage Status][codecov-image]][codecov-url] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url]\n\n[npm-url]:https://npmjs.org/package/@moxy/next-seo\n[downloads-image]:https://img.shields.io/npm/dm/@moxy/next-seo.svg\n[npm-image]:https://img.shields.io/npm/v/@moxy/next-seo.svg\n[build-status-url]:https://github.com/moxystudio/next-seo/actions\n[build-status-image]:https://img.shields.io/github/workflow/status/moxystudio/next-seo/Node%20CI/master\n[codecov-url]:https://codecov.io/gh/moxystudio/next-seo\n[codecov-image]:https://img.shields.io/codecov/c/github/moxystudio/next-seo/master.svg\n[david-dm-url]:https://david-dm.org/moxystudio/next-seo\n[david-dm-image]:https://img.shields.io/david/moxystudio/next-seo.svg\n[david-dm-dev-url]:https://david-dm.org/moxystudio/next-seo?type=dev\n[david-dm-dev-image]:https://img.shields.io/david/dev/moxystudio/next-seo.svg\n\nManage document head SEO metadata in your Next.js projects with a simple data structure.\n\n## Installation\n\n```sh\n$ npm install @moxy/next-seo\n```\n\nThis library is written in modern JavaScript and is published in both CommonJS and ES module transpiled variants. If you target older browsers please make sure to transpile accordingly.\n\n## Motivation\n\nSEO helps to improve a website’s overall searchability and visibility. Therefore, an efficient SEO is a must have in every website and there should be a good and easy way to manage all the metadata. These metadata can come from multiple sources, from static files to CMS based approaches, in completely different formats.\n\nThere are already different ways of managing all of your changes to the document head, but it can be tough to manage the possibility of *duplicates*. An example of a duplicate would be two meta tags defining the description of a page with different values:\n```html\n\u003cmeta name=\"description\" content=\"desc1\"\u003e\n\u003cmeta name=\"description\" content=\"desc2\"\u003e\n```\nWhich one should a web crawler assume as the source of truth?\n\nThis library aims to solve these problems by analysing common attributes and generating an unique key to exclude duplicates. It also works with a simple data structure that is not bound to any specific origin.\n\n## Usage\n\n```js\nimport React from 'react';\nimport Seo from '@moxy/next-seo';\n\nconst MyPage = (props) =\u003e {\n    const metadata = {\n        title: 'MyPage Title',\n        meta: [\n            {\n                name: 'description',\n                content:'MyPage Description',\n            },\n            {\n                property: 'og:title',\n                content: 'MyPage Title',\n            },\n        ],\n    };\n\n    return (\n        \u003c\u003e\n            \u003cSeo data={ metadata } /\u003e\n            \u003cdiv className=\"container\"\u003e\n                ...\n            \u003c/div\u003e\n        \u003c/\u003e\n    );\n};\n\nexport default MyPage;\n```\n\nThe example above will add to the document head:\n```html\n\u003chead\u003e\n    ...\n    \u003ctitle\u003eMyPage Title\u003c/title\u003e\n    \u003cmeta name=\"description\" content=\"MyPage Description\" /\u003e\n    \u003cmeta property=\"og:title\" content=\"MyPage Title\" /\u003e\n\u003c/head\u003e\n```\n\n## API\n\nThe `\u003cSeo\u003e` component supports the following props:\n\n#### data\n\nType: `object`\nRequired: `true`\n\nThe `data` has the following shape:\n```js\ndata: PropTypes.shape({\n    title: PropTypes.string,\n    meta: PropTypes.arrayOf(PropTypes.object),\n    link: PropTypes.arrayOf(PropTypes.object),\n}).isRequired,\n```\n\nThe `title` is a simple key-value pair that will define the page title with the [title tag](https://developer.mozilla.org/docs/Web/HTML/Element/link).\n\nBoth `meta` and `link` are an array of objects where each object represents a single entity ([meta](https://developer.mozilla.org/docs/Web/HTML/Element/meta) or [link](https://developer.mozilla.org/docs/Web/HTML/Element/link)). Any key-value pair of these objects will serve as an attribute.\n\nExample:\n```js\ndata: {\n        title: 'my title',\n        meta: [\n            {\n                name: 'description',\n                content: 'my description',\n            },\n            {\n                property: 'og:title',\n                content: 'my title',\n            },\n            {\n                itemprop: 'name',\n                content: 'my name',\n            },\n            {\n                'http-equiv': 'content-type',\n                content: '30',\n            },\n            {\n                foo: 'bar',\n            },\n        ],\n        link: [\n            {\n                rel: 'icon',\n                href: '/favicon.ico',\n            },\n            {\n                rel: 'stylesheet',\n                href: '/styles.css',\n            },\n        ],\n    },\n};\n```\nResult:\n```html\n\u003ctitle\u003emy title\u003c/title\u003e\n\u003cmeta name=\"description\" content=\"my description\" /\u003e\n\u003cmeta property=\"og:title\" content=\"my title\" /\u003e\n\u003cmeta itemprop=\"name\" content=\"my name\" /\u003e\n\u003cmeta http-equiv=\"content-type\" content=\"30\" /\u003e\n\u003cmeta foo=\"bar\" /\u003e\n\u003clink rel=\"icon\" href=\"/favicon.ico\" /\u003e\n\u003clink rel=\"stylesheet\" href=\"/styles.css\" /\u003e\n```\n\n## Tests\n\n```sh\n$ npm test\n$ npm test -- --watch # during development\n```\n\n## License\n\nReleased under the [MIT License](https://www.opensource.org/licenses/mit-license.php).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxystudio%2Fnext-seo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoxystudio%2Fnext-seo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoxystudio%2Fnext-seo/lists"}