{"id":17975578,"url":"https://github.com/rafaelrinaldi/html-meta-tags","last_synced_at":"2025-03-25T14:33:04.589Z","repository":{"id":47859373,"uuid":"102986152","full_name":"rafaelrinaldi/html-meta-tags","owner":"rafaelrinaldi","description":"Generate HTML meta tags from JSON data.","archived":false,"fork":false,"pushed_at":"2022-12-06T00:40:41.000Z","size":166,"stargazers_count":28,"open_issues_count":14,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T04:05:17.068Z","etag":null,"topics":["cli","html","javascript","meta-tags","nodejs","open-graph","twitter"],"latest_commit_sha":null,"homepage":null,"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/rafaelrinaldi.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}},"created_at":"2017-09-09T21:31:07.000Z","updated_at":"2023-07-08T10:44:47.000Z","dependencies_parsed_at":"2023-01-23T23:18:02.146Z","dependency_job_id":null,"html_url":"https://github.com/rafaelrinaldi/html-meta-tags","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelrinaldi%2Fhtml-meta-tags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelrinaldi%2Fhtml-meta-tags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelrinaldi%2Fhtml-meta-tags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rafaelrinaldi%2Fhtml-meta-tags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rafaelrinaldi","download_url":"https://codeload.github.com/rafaelrinaldi/html-meta-tags/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245480695,"owners_count":20622355,"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":["cli","html","javascript","meta-tags","nodejs","open-graph","twitter"],"created_at":"2024-10-29T17:20:08.738Z","updated_at":"2025-03-25T14:33:04.286Z","avatar_url":"https://github.com/rafaelrinaldi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[url]: https://rinaldi.io\n\n# html-meta-tags [![Build Status](https://semaphoreci.com/api/v1/rafaelrinaldi/html-meta-tags/branches/master/badge.svg)](https://semaphoreci.com/rafaelrinaldi/html-meta-tags)\n\n\u003e Generate HTML meta tags from JSON data.\n\n## Install\n\n```sh\nnpm install html-meta-tags -g\n```\n\n## Usage\n\n#### CLI\n\nYou can either pipe data from the standard input or specify a file path for the program.\n\n```sh\n$ html-meta-tags\n\nUsage: html-meta-tags \u003cfile\u003e [options]\n\nExample:\n  cat data.json | html-meta-tags\n\nOptions:\n  -v --version          Display current program version\n  -h --help             Display help and usage details\n     --no-charset       Do not specify UTF-8 as document charset\n     --no-og            Do not generate Open Graph meta tags\n     --no-twitter       Do not generate Twitter meta tags\n\n$ echo '\n{\n  \"title\": \"My Website\",\n  \"url\": \"https://mywebsite.com\",\n  \"keywords\": [\"blockchain\", \"infosec\", \"crypto\"],\n  \"description\": \"This is my personal website\"\n}' | html-meta-tags\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cmeta name=\"title\" content=\"My Website\"\u003e\n\u003cmeta name=\"url\" content=\"https://mywebsite.com\"\u003e\n\u003cmeta name=\"keywords\" content=\"blockchain, infosec, crypto\"\u003e\n\u003cmeta name=\"description\" content=\"This is my personal website\"\u003e\n\u003cmeta name=\"twitter:description\" content=\"This is my personal website\"\u003e\n\u003cmeta name=\"twitter:title\" content=\"My Website\"\u003e\n\u003cmeta property=\"og:description\" content=\"This is my personal website\"\u003e\n\u003cmeta property=\"og:title\" content=\"My Website\"\u003e\n```\n\n#### Node.js\n\n```js\nvar htmlMetaTags = require('html-meta-tags')\nvar data = require('./data.json')\n\nconsole.log(htmlMetaTags(data))\n```\n\n## API\n\n### htmlMetaTags(data, [options])\n\nReturns an HTML string containing a representation of all meta tags from `data`.\n\n#### data\n\nType: `Object`  \n\nMeta tags in object notation format.  \n* You can use arrays for comma-separated such as `keywords` or `viewport`.\n* If a specific value for a prefixed key is specified it will take precedence over the default.\n* Prefixed keys should have their own entry, `og:title` for example, should be represented as:\n```js\n{\n  og: {\n    title: 'value'\n  }\n}\n```\n\n#### options\n\nType: `Object`  \n\n##### shouldIgnoreCharset\n\nType: `boolean`  \nDefault: `false`  \n\nWhether or not it should render UTF-8 charset meta tag.\n\n##### shouldIgnoreTwitter\n\nType: `boolean`  \nDefault: `false`  \n\nWhether or not it should render Twitter specific meta tags.\n\n##### shouldIgnoreOpenGraph\n\nType: `boolean`  \nDefault: `false`  \n\nWhether or not it should render Open Graph specific meta tags.\n\n## License\n\nMIT © [Rafael Rinaldi][url]\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://buymeacoff.ee/rinaldi\" title=\"Buy me a coffee\"\u003eBuy me a ☕\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelrinaldi%2Fhtml-meta-tags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frafaelrinaldi%2Fhtml-meta-tags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frafaelrinaldi%2Fhtml-meta-tags/lists"}