{"id":24983695,"url":"https://github.com/posthtml/posthtml-doctype","last_synced_at":"2025-04-11T20:51:49.671Z","repository":{"id":35426203,"uuid":"39691557","full_name":"posthtml/posthtml-doctype","owner":"posthtml","description":"Doctype Plugin","archived":false,"fork":false,"pushed_at":"2016-07-07T09:13:50.000Z","size":13,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-29T21:06:04.570Z","etag":null,"topics":[],"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/posthtml.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":"2015-07-25T15:30:34.000Z","updated_at":"2022-09-24T05:53:44.000Z","dependencies_parsed_at":"2022-09-07T16:30:27.194Z","dependency_job_id":null,"html_url":"https://github.com/posthtml/posthtml-doctype","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-doctype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-doctype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-doctype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/posthtml%2Fposthtml-doctype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/posthtml","download_url":"https://codeload.github.com/posthtml/posthtml-doctype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247811687,"owners_count":21000158,"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":"2025-02-04T09:20:19.753Z","updated_at":"2025-04-11T20:51:49.637Z","avatar_url":"https://github.com/posthtml.png","language":"JavaScript","readme":"[![NPM][npm]][npm-url]\n[![Deps][deps]][deps-url]\n[![Tests][travis]][travis-url]\n[![Coverage][cover]][cover-url]\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"220\" height=\"150\" title=\"PostHTML\" src=\"http://posthtml.github.io/posthtml/logo.svg\"\u003e\n  \u003ch1\u003eDoctype Plugin\u003c/h1\u003e\n  \u003cp\u003eSimplify working with doctypes\u003c/p\u003e\n\u003c/div\u003e\n\n\u003ch2 align=\"center\"\u003eInstall\u003c/h2\u003e\n\n```bash\nnpm i -D posthtml-doctype\n```\n\n\u003ch2 align=\"center\"\u003eUsage\u003c/h2\u003e\n\n## Options\n\n###### { doctype : 'HTML 5' }\n```html\n\u003c!DOCTYPE html\u003e\n```\n\n###### { doctype : 'HTML 4.01 Strict' }\n```html\n\u003c!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\"\u003e\n```\n\n###### { doctype : 'HTML 4.01 Transitional' }\n```html\n\u003c!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\"\u003e\n```\n\n###### { doctype : 'HTML 4.01 Frameset' }\n```html\n\u003c!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Frameset//EN\" \"http://www.w3.org/TR/html4/frameset.dtd\"\u003e\n```\n\n###### { doctype : 'XHTML 1.0 Strict' }\n```html\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"\u003e\n```\n\n###### { doctype : 'XHTML 1.0 Transitional' }\n```html\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"\u003e\n```\n\n###### { doctype : 'XHTML 1.0 Frameset' }\n```html\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\"\u003e\n```\n\n###### { doctype : 'XHTML 1.1' }\n```html\n\u003c!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"\u003e\n```\n\n\u003ch2 align=\"center\"\u003eExample\u003c/h2\u003e\n\n```js\nconst posthtml = require('posthtml'),\n\nconst html = `\n  \u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003eWow\u003c/title\u003e\n  \u003c/head\u003e\n  \u003cbody\u003e\n    \u003cdiv class=\"button\"\u003e\n      \u003cdiv class=\"button__text\"\u003eText\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/body\u003e\n  \u003c/html\u003e\n`\n\nposthtml([require('posthtml-doctype')({ doctype: 'HTML 5' })])\n    .process(html)\n    .then((result) =\u003e console.log(result.html))\n```\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003ctitle\u003eWow\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cdiv class=\"button\"\u003e\n    \u003cdiv class=\"button__text\"\u003eText\u003c/div\u003e\n  \u003c/div\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n\u003ch2 align=\"center\"\u003eLICENSE\u003c/h2\u003e\n\n\u003e MIT License (MIT)\n\n\u003e Copyright (c) 2016 PostHTML Ivan Voischev\n\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\n\u003e The above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[npm]: https://img.shields.io/npm/v/posthtml-doctype.svg\n[npm-url]: https://npmjs.com/package/posthtml-doctype\n\n[deps]: https://david-dm.org/posthtml/posthtml-doctype.svg\n[deps-url]: https://david-dm.org/posthtml/posthtml-doctype\n\n[travis]: http://img.shields.io/travis/posthtml/posthtml-doctype.svg\n[travis-url]: https://travis-ci.org/posthtml/posthtml-doctype\n\n[cover]: https://coveralls.io/repos/github/posthtml/posthtml-doctype/badge.svg?branch=master\n[cover-url]: https://coveralls.io/github/posthtml/posthtml-doctype?branch=master\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-doctype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fposthtml%2Fposthtml-doctype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fposthtml%2Fposthtml-doctype/lists"}