{"id":28445627,"url":"https://github.com/cheesecake87/pyhead","last_synced_at":"2025-09-10T06:40:54.689Z","repository":{"id":209919082,"uuid":"725265554","full_name":"CheeseCake87/pyhead","owner":"CheeseCake87","description":"The Python HTML \u003chead\u003e filler.","archived":false,"fork":false,"pushed_at":"2024-11-19T10:28:13.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-01T22:40:59.496Z","etag":null,"topics":["html","markup","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/CheeseCake87.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":"2023-11-29T19:31:52.000Z","updated_at":"2024-11-19T10:27:21.000Z","dependencies_parsed_at":"2024-07-15T18:03:35.814Z","dependency_job_id":"3131a861-2bea-42dc-83b9-6c40fe9712b6","html_url":"https://github.com/CheeseCake87/pyhead","commit_stats":null,"previous_names":["cheesecake87/pyhead"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/CheeseCake87/pyhead","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyhead","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyhead/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyhead/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyhead/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CheeseCake87","download_url":"https://codeload.github.com/CheeseCake87/pyhead/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyhead/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265068708,"owners_count":23706516,"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":["html","markup","python"],"created_at":"2025-06-06T10:13:30.438Z","updated_at":"2025-07-12T23:34:41.599Z","avatar_url":"https://github.com/CheeseCake87.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyhead 🐍🤯\n\n[![PyPI version](https://badge.fury.io/py/pyhead.svg)](https://badge.fury.io/py/pyhead)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CheeseCake87/pyhead/master/LICENSE)\n![Downloads](https://static.pepy.tech/badge/pyhead)\n![black](https://img.shields.io/badge/code%20style-black-000000.svg)\n\nThe Python HTML `\u003chead\u003e` filler.\n\n`pip install pyhead`\n\n\u003c!-- TOC --\u003e\n* [pyhead 🐍🤯](#pyhead-)\n  * [What is Pyhead?](#what-is-pyhead)\n  * [Flask example:](#flask-example)\n  * [Advanced use cases:](#advanced-use-cases)\n    * [Flask + g](#flask--g)\n    * [Working with extended templates](#working-with-extended-templates)\n    * [dict as args, and JSON](#dict-as-args-and-json)\n  * [CLI Commands](#cli-commands)\n    * [Generating favicons](#generating-favicons)\n\u003c!-- TOC --\u003e\n\n## What is Pyhead?\n\nPyhead is a Python package that helps you generate the `\u003chead\u003e` tag for your HTML pages.\n\n## Flask example:\n\n```python\nfrom flask import Flask, render_template\n\nfrom pyhead import Head\n\n\ndef create_app():\n    app = Flask(__name__)\n\n    @app.route(\"/\")\n    def index():\n        head = Head(\n            base=\"https://example.com\",\n            title=\"Hello World\",\n            exclude_title_tags=True,\n            # /\\ Set to False if returning {{ head() }} in the template\n            description=\"This is a test\",\n            keywords=\"test, hello, world\",\n            subject=\"Hello World\",\n            rating=\"General\",\n            robots=\"index, follow\",\n        )\n        head.set_default_content_security_policy()\n        head.set_referrer_policy(\n            policy=\"no-referrer\",\n        )\n        head.set_google(\n            googlebot=\"index, follow\",\n            no_sitelinks_search_box=True,\n            no_translate=True,\n        )\n        head.set_verification(\n            google=\"1234567890\",\n            yandex=\"1234567890\",\n            bing=\"1234567890\",\n            alexa=\"1234567890\",\n            pinterest=\"1234567890\",\n            norton=\"1234567890\",\n        )\n        head.set_geo_position(\n            icbm=\"55.86013028402754, -4.252019430273945\",\n            geo_position=\"55.86013028402754;-4.252019430273945\",\n            geo_region=\"en_GB\",\n            geo_placename=\"Duke of Wellington\",\n        )\n        head.set_twitter_card(\n            card=\"summary\",\n            site_account=\"@example\",\n            creator_account=\"@example\",\n            title=\"Example\",\n            description=\"Example\",\n            image=\"https://example.com/image.png\",\n            image_alt=\"Example\",\n        )\n        head.set_opengraph_website(\n            site_name=\"Example\",\n            title=\"Example\",\n            description=\"Example\",\n            url=\"https://example.com\",\n            image=\"https://example.com/image.png\",\n            image_alt=\"Example\",\n            locale=\"en_US\",\n        )\n        head.set_favicon(\n            ico_icon_href=\"/favicon.ico\",\n            png_icon_16_href=\"/favicon-16x16.png\",\n            png_icon_32_href=\"/favicon-32x32.png\",\n            png_icon_64_href=\"/favicon-64x64.png\",\n            png_icon_96_href=\"/favicon-96x96.png\",\n            png_icon_180_href=\"/favicon-180x180.png\",\n            png_icon_196_href=\"/favicon-196x196.png\",\n            png_apple_touch_icon_57_href=\"/apple-touch-icon-57x57.png\",\n            png_apple_touch_icon_60_href=\"/apple-touch-icon-60x60.png\",\n            png_apple_touch_icon_72_href=\"/apple-touch-icon-72x72.png\",\n            png_apple_touch_icon_76_href=\"/apple-touch-icon-76x76.png\",\n            png_apple_touch_icon_114_href=\"/apple-touch-icon-114x114.png\",\n            png_apple_touch_icon_120_href=\"/apple-touch-icon-120x120.png\",\n            png_apple_touch_icon_144_href=\"/apple-touch-icon-144x144.png\",\n            png_apple_touch_icon_152_href=\"/apple-touch-icon-152x152.png\",\n            png_apple_touch_icon_167_href=\"/apple-touch-icon-167x167.png\",\n            png_apple_touch_icon_180_href=\"/apple-touch-icon-180x180.png\",\n            png_mstile_70_href=\"/mstile-70x70.png\",\n            png_mstile_270_href=\"/mstile-270x270.png\",\n            png_mstile_310x150_href=\"/mstile-310x150.png\",\n            png_mstile_310_href=\"/mstile-310x150.png\",\n        )\n\n        head.set_link_tag(\"canonical\", \"https://example.com\")\n\n        return render_template(\"index.html\", head=head)\n\n    return app\n```\n\n`index.html`:\n\n```html\n\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    {{ head.top_level_tags }}\n    \u003ctitle\u003e{{ head.title }}\u003c/title\u003e\n    {{ head.meta_tags }}\n    {{ head.link_tags }}\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eFlask App\u003c/h1\u003e\n\u003cp\u003eRight-Click view source\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\nor\n\n```html\n\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    {{ head() }}\n    \u003c!-- \n    REMEMBER to remove (or set to False) the `exclude_title_tags=True`, \n    from the Head() constructor.\n    --\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eFlask App\u003c/h1\u003e\n\u003cp\u003eRight-Click view source\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nResults in:\n\n```html\n\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003c!-- Top Level Tags - charset and viewport are set by default --\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"'width=device-width, initial-scale=1.0'\"\u003e\n    \u003cbase href=\"https://example.com\"\u003e\n    \u003c!-- Title Tag --\u003e\n    \u003ctitle\u003eHello World\u003c/title\u003e\n    \u003c!-- Meta Tags --\u003e\n    \u003cmeta name=\"description\" content=\"This is a test\"\u003e\n    \u003cmeta name=\"keywords\" content=\"test, hello, world\"\u003e\n    \u003cmeta name=\"subject\" content=\"Hello World\"\u003e\n    \u003cmeta name=\"rating\" content=\"General\"\u003e\n    \u003cmeta name=\"robots\" content=\"index, follow\"\u003e\n    \u003cmeta name=\"referrer\" content=\"origin, no-referrer\"\u003e\n    \u003cmeta name=\"googlebot\" content=\"index, follow\"\u003e\n    \u003cmeta name=\"google\" content=\"notranslate\"\u003e\n    \u003cmeta name=\"google-site-verification\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"yandex-verification\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"msvalidate.01\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"alexaVerifyID\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"p:domain_verify\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"norton-safeweb-site-verification\" content=\"1234567890\"\u003e\n    \u003cmeta name=\"og:type\" content=\"website\"\u003e\n    \u003cmeta name=\"og:locale\" content=\"en_US\"\u003e\n    \u003cmeta name=\"og:site_name\" content=\"Example\"\u003e\n    \u003cmeta name=\"og:title\" content=\"Example\"\u003e\n    \u003cmeta name=\"og:description\" content=\"Example\"\u003e\n    \u003cmeta name=\"og:image\" content=\"https://example.com/image.png\"\u003e\n    \u003cmeta name=\"og:image:alt\" content=\"Example\"\u003e\n    \u003cmeta name=\"og:url\" content=\"https://example.com\"\u003e\n    \u003cmeta name=\"twitter:card\" content=\"summary\"\u003e\n    \u003cmeta name=\"twitter:site\" content=\"@example\"\u003e\n    \u003cmeta name=\"twitter:creator\" content=\"@example\"\u003e\n    \u003cmeta name=\"twitter:title\" content=\"Example\"\u003e\n    \u003cmeta name=\"twitter:description\" content=\"Example\"\u003e\n    \u003cmeta name=\"twitter:image\" content=\"https://example.com/image.png\"\u003e\n    \u003cmeta name=\"twitter:image:alt\" content=\"Example\"\u003e\n    \u003cmeta name=\"ICBM\" content=\"55.86013028402754, -4.252019430273945\"\u003e\n    \u003cmeta name=\"geo.position\" content=\"55.86013028402754;-4.252019430273945\"\u003e\n    \u003cmeta name=\"geo.region\" content=\"en_GB\"\u003e\n    \u003cmeta name=\"geo.placename\" content=\"Duke of Wellington\"\u003e\n    \u003c!-- Link Tags --\u003e\n    \u003clink rel=\"icon\" href=\"/favicon.ico\" sizes=\"16x16 32x32\" type=\"image/x-icon\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-16x16.png\" sizes=\"16x16\" type=\"image/png\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-32x32.png\" sizes=\"32x32\" type=\"image/png\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-64x64.png\" sizes=\"64x64\" type=\"image/png\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-96x96.png\" sizes=\"96x96\" type=\"image/png\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-180x180.png\" sizes=\"180x180\" type=\"image/png\"\u003e\n    \u003clink rel=\"icon\" href=\"/favicon-196x196.png\" sizes=\"196x196\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-57x57.png\" sizes=\"57x57\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-60x60.png\" sizes=\"60x60\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-72x72.png\" sizes=\"72x72\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-76x76.png\" sizes=\"76x76\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-114x114.png\" sizes=\"114x114\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-120x120.png\" sizes=\"120x120\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-144x144.png\" sizes=\"144x144\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-152x152.png\" sizes=\"152x152\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-167x167.png\" sizes=\"167x167\" type=\"image/png\"\u003e\n    \u003clink rel=\"apple-touch-icon\" href=\"/apple-touch-icon-180x180.png\" sizes=\"180x180\" type=\"image/png\"\u003e\n    \u003clink rel=\"msapplication-square70x70logo\" href=\"/mstile-70x70.png\"\u003e\n    \u003clink rel=\"msapplication-square270x270logo\" href=\"/mstile-270x270.png\"\u003e\n    \u003clink rel=\"msapplication-wide310x150logo\" href=\"/mstile-310x150.png\"\u003e\n    \u003clink rel=\"msapplication-wide310x150logo\" href=\"/mstile-310x150.png\"\u003e\n    \u003clink rel=\"canonical\" href=\"https://example.com\"\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003eFlask App\u003c/h1\u003e\n\u003cp\u003eRight-Click view source\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n## Advanced use cases:\n\n### Flask + g\n\nYou can use the `g` object in Flask to store the head object.\n\n```python\nfrom flask import Flask, render_template, g\n\nfrom pyhead import Head\n\n\ndef create_app():\n    app = Flask(__name__)\n\n    @app.before_request\n    def inject_pyhead():\n        g.head = Head()\n        g.head.set_title(\"My Cool Site\")\n\n    @app.route(\"/\")\n    def index():\n        render_template(\"index.html\")\n```\n\n`index.html`\n\n```html\n\u003c!DOCTYPE html\u003e\n\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    {{ g.head.append_title(\"Home Page\", \" - \", _from_template=True) }}\n    {{ g.head() }}\n\u003c/head\u003e\n\u003cbody\u003e\n{% block content %}\n\n{% endblock %}\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nResults in:\n\n```html\n...\n\u003chead\u003e\n\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"'width=device-width, initial-scale=1.0'\"\u003e\n    \u003ctitle\u003eMy Cool Site - Home Page\u003c/title\u003e\n\n\u003c/head\u003e\n\n...\n```\n\n### Working with extended templates\n\nThe head object can be modified in templates that extend other templates. Here's an example:\n\n`extends.html`\n\n```html\n\n\u003c!DOCTYPE html\u003e\n\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    {%- block head -%}\n    {{ g.head() }}\n    {% endblock %}\n\u003c/head\u003e\n\u003cbody\u003e\n{% block content %}\n\n{% endblock %}\n\u003c/body\u003e\n\u003c/html\u003e\n\n```\n\n`index.hml`\n\n```html\n\n{% extends \"extends.html\" %}\n\n{% block head %}\n{{ g.head.append_title('Flask App', ' - ', _from_template=True) }}\n{{ super() }}\n{% endblock %}\n\n{% block content %}\n\u003ch1\u003eFlask App\u003c/h1\u003e\n\u003cp\u003eRight-Click view source\u003c/p\u003e\n{% endblock %}\n\n```\n\nIn this example the `\u003clink rel=\"canonical\" href=\"https://example.com\"\u003e`\ntag is removed, and the title is appended, resulting in:\n\n```html\n...\n\u003chead\u003e\n\n\u003cmeta charset=\"utf-8\"\u003e\n\u003cmeta name=\"viewport\" content=\"'width=device-width, initial-scale=1.0'\"\u003e\n\u003cbase href=\"https://example.com\"\u003e\n\u003ctitle\u003eMy Cool Site - Flask App\u003c/title\u003e\n\n\u003c/head\u003e\n...\n```\n\n### dict as args, and JSON\n\nYou can pass a dict to the Head() constructor to set the values of the tags.\nThe keys must match the arguments of the set method.\n\n```python\nhead = Head(\n    ...,\n    twitter_card={\n        \"card\": \"summary\",\n        \"site_account\": \"@example\",\n        \"creator_account\": \"@example\",\n        \"title\": \"Example\",\n        \"description\": \"Example\",\n        \"image\": \"https://example.com/image.png\",\n        \"image_alt\": \"Example\",\n    },\n)\n```\n\nThis is replacing the `set_twitter_card()` method.\n\nWith this, you can store the values in a database as JSON objects then pass them to the Head() constructor.\n\n```python\npage = model.get_page_by_name(\"index\")\n\nhead = Head(\n    ...,\n    twitter=page.twitter_card,\n)\n```\n\nA really efficient way would be to store the entire head object as JSON and pass it to the Head() constructor.\n\n```python\npage = model.get_page_by_name(\"index\")\n\nhead = Head(**page.head)\n```\n\nthe stored JSON data in this case would look something like:\n\n```json\n{\n  \"base\": \"https://example.com\",\n  \"title\": \"Hello World\",\n  \"exclude_title_tags\": true,\n  \"description\": \"This is a test\",\n  \"keywords\": \"test, hello, world\",\n  \"subject\": \"Hello World\",\n  \"rating\": \"General\",\n  \"robots\": \"index, follow\",\n  \"referrer_policy\": {\n    \"policy\": \"no-referrer\",\n    \"fallback\": \"origin\"\n  },\n  \"google\": {\n    \"googlebot\": \"index, follow\",\n    \"no_sitelinks_search_box\": true,\n    \"no_translate\": true\n  },\n  \"twitter_card\": {\n    \"card\": \"summary\",\n    \"site_account\": \"@example\",\n    \"creator_account\": \"@example\",\n    \"title\": \"Example\",\n    \"description\": \"Example\",\n    \"image\": \"https://example.com/image.png\",\n    \"image_alt\": \"Example\"\n  },\n  \"favicon\": {\n    \"ico_icon_href\": \"https://example.com/favicon.ico\"\n  }\n}\n```\n\n## CLI Commands\n\n### Generating favicons\n\nYou can generate favicons from a source image using the cli command `pyhead favicons -s favicon-gen-test.png`\n\nThis uses the python package `favicons` to generate the favicons.\n\nYou need to install the `favicons` package to use this command.\n\n```bash\npip install favicons\n```\n\nAll paths in the cli command are relative to the current working directory.\n\nOnly the following source formats are supported:\n\npng, jpg, jpeg, gif, svg, tiff\n\n`-s, --source` This will look for the image file to use\n\n`-o, --output` This will be the output directory for the favicons\n\n`-hp, --href-prefix` This will prefix the href tag in the output html\n\nThe following command:\n\n```bash\npyhead favicons -s favicon-gen-test.png -o favicons -hp https://example.com\n```\n\nWill create a folder called `favicons` with the following files:\n\n```text\napple-touch-icon-57x57.png\napple-touch-icon-60x60.png\napple-touch-icon-72x72.png\napple-touch-icon-76x76.png\napple-touch-icon-114x114.png\napple-touch-icon-120x120.png\napple-touch-icon-144x144.png\napple-touch-icon-152x152.png\napple-touch-icon-167x167.png\napple-touch-icon-180x180.png\nfavicon-16x16.png\nfavicon-32x32.png\nfavicon-64x64.png\nfavicon-96x96.png\nfavicon-180x180.png\nfavicon-196x196.png\nfavicon-delete_me_after_use.html\nfavicon-delete_me_after_use.py\nmstile-70x70.png\nmstile-270x270.png\nmstile-310x150.png\nmstile-310x310.png\n```\n\nThe `favicon-delete_me_after_use.html` file will contain the following:\n\n```html\n\n\u003clink rel=\"icon\" href=\"https://example.com/favicon.ico\" sizes=\"16x16 32x32\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-16x16.png\" sizes=\"16x16\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-32x32.png\" sizes=\"32x32\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-64x64.png\" sizes=\"64x64\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-96x96.png\" sizes=\"96x96\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-180x180.png\" sizes=\"180x180\"\u003e\n\u003clink rel=\"icon\" href=\"https://example.com/favicon-196x196.png\" sizes=\"196x196\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-57x57.png\" sizes=\"57x57\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-60x60.png\" sizes=\"60x60\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-72x72.png\" sizes=\"72x72\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-76x76.png\" sizes=\"76x76\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-114x114.png\" sizes=\"114x114\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-120x120.png\" sizes=\"120x120\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-144x144.png\" sizes=\"144x144\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-152x152.png\" sizes=\"152x152\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-167x167.png\" sizes=\"167x167\"\u003e\n\u003clink rel=\"apple-touch-icon\" href=\"https://example.com/apple-touch-icon-180x180.png\" sizes=\"180x180\"\u003e\n\u003clink rel=\"msapplication-square70x70logo\" href=\"https://example.com/mstile-70x70.png\"\u003e\n\u003clink rel=\"msapplication-square270x270logo\" href=\"https://example.com/mstile-270x270.png\"\u003e\n\u003clink rel=\"msapplication-wide310x150logo\" href=\"https://example.com/mstile-310x150.png\"\u003e\n\u003clink rel=\"msapplication-wide310x150logo\" href=\"https://example.com/mstile-310x150.png\"\u003e\n```\n\nThe `favicon-delete_me_after_use.py` file will contain the following:\n\n```python\nfrom pyhead import Head\n\nhead = Head()\nhead.set_favicon(\n    ico_icon_href=\"/favicon.ico\",\n    png_icon_16_href=\"/favicon-16x16.png\",\n    png_icon_32_href=\"/favicon-32x32.png\",\n    png_icon_64_href=\"/favicon-64x64.png\",\n    png_icon_96_href=\"/favicon-96x96.png\",\n    png_icon_180_href=\"/favicon-180x180.png\",\n    png_icon_196_href=\"/favicon-196x196.png\",\n    png_apple_touch_icon_57_href=\"/apple-touch-icon-57x57.png\",\n    png_apple_touch_icon_60_href=\"/apple-touch-icon-60x60.png\",\n    png_apple_touch_icon_72_href=\"/apple-touch-icon-72x72.png\",\n    png_apple_touch_icon_76_href=\"/apple-touch-icon-76x76.png\",\n    png_apple_touch_icon_114_href=\"/apple-touch-icon-114x114.png\",\n    png_apple_touch_icon_120_href=\"/apple-touch-icon-120x120.png\",\n    png_apple_touch_icon_144_href=\"/apple-touch-icon-144x144.png\",\n    png_apple_touch_icon_152_href=\"/apple-touch-icon-152x152.png\",\n    png_apple_touch_icon_167_href=\"/apple-touch-icon-167x167.png\",\n    png_apple_touch_icon_180_href=\"/apple-touch-icon-180x180.png\",\n    png_mstile_70_href=\"/mstile-70x70.png\",\n    png_mstile_270_href=\"/mstile-270x270.png\",\n    png_mstile_310x150_href=\"/mstile-310x150.png\",\n    png_mstile_310_href=\"/mstile-310x150.png\",\n)\n```\n\nRemember to delete the `favicon-delete_me_after_use.html` and `favicon-delete_me_after_use.py` files after use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheesecake87%2Fpyhead","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheesecake87%2Fpyhead","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheesecake87%2Fpyhead/lists"}