{"id":16545555,"url":"https://github.com/volfpeter/markyp-html","last_synced_at":"2025-04-30T15:44:50.200Z","repository":{"id":57439799,"uuid":"174802816","full_name":"volfpeter/markyp-html","owner":"volfpeter","description":"HTML element implementations based on markyp","archived":false,"fork":false,"pushed_at":"2024-10-04T07:53:31.000Z","size":73,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T06:37:15.517Z","etag":null,"topics":["code-generator","html","html-css-javascript","markup","python","python3","templating","templating-engine","virtual-dom","web-development"],"latest_commit_sha":null,"homepage":null,"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/volfpeter.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":"2019-03-10T09:31:07.000Z","updated_at":"2024-10-04T07:53:46.000Z","dependencies_parsed_at":"2023-01-24T21:45:47.621Z","dependency_job_id":null,"html_url":"https://github.com/volfpeter/markyp-html","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/volfpeter%2Fmarkyp-html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/volfpeter","download_url":"https://codeload.github.com/volfpeter/markyp-html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251734011,"owners_count":21635057,"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":["code-generator","html","html-css-javascript","markup","python","python3","templating","templating-engine","virtual-dom","web-development"],"created_at":"2024-10-11T19:07:04.460Z","updated_at":"2025-04-30T15:44:50.152Z","avatar_url":"https://github.com/volfpeter.png","language":"Python","readme":"[![Build Status](https://travis-ci.org/volfpeter/markyp-html.svg?branch=master)](https://travis-ci.org/volfpeter/markyp-html)\n[![Downloads](https://pepy.tech/badge/markyp-html)](https://pepy.tech/project/markyp-html)\n[![Downloads](https://pepy.tech/badge/markyp-html/month)](https://pepy.tech/project/markyp-html/month)\n[![Downloads](https://pepy.tech/badge/markyp-html/week)](https://pepy.tech/project/markyp-html/week)\n\n# markyp-html\n\n[markyp](https://github.com/volfpeter/markyp)-based HTML implementations.\n\n**Note**: if you're in an **async** environment, you should use [htmy](https://volfpeter.github.io/htmy/) instead! \n\n## Installation\n\nThe project is listed on the Python Package Index, it can be installed simply by executing `pip install markyp-html`.\n\n## Getting started\n\nIf you are not familiar with the basic concepts of `markyp`, please start by having a look at its documentation [here](https://github.com/volfpeter/markyp).\n\nThe following very short example creates the most basic Hello World webpage. As you can see, all it takes is a single `webpage()` call and string conversion.\n\n```Python\nfrom markyp_html import webpage\npage = webpage(\"Hello World!\", page_title=\"Hello World\")\n\n# Get the actual HTML markup.\nhtml = str(page)  # or page.markup\nprint(html)\n```\n\nHere is a slightly more sophisticated Hello World example, that contains all kinds of metadata, some CSS, and a couple of simple text elements:\n\n```Python\nfrom markyp_html import meta, style, webpage\nfrom markyp_html.text import h1, p\nfrom markyp_html.inline import strong\n\npage = webpage(\n    h1(\"markyp-html\"),\n    strong(p(\"Hello World!\")),\n    p(\"This page was generated using Python and markyp-html.\"),\n    page_title=\"markyp-html demo page\",\n    head_elements=[style(\"h1 {color:red;}\\np {color:blue;}\")],\n    metadata=[\n        meta.author(\"Website Author\"),\n        meta.charset(\"UTF-8\"),\n        meta.description(\"markyp-html demo\"),\n        meta.keywords(\"markyp-html,markup,Python,HTML\"),\n        meta.viewport(\"width=device-width, initial-scale=1.0\")\n    ]\n)\n\n# Get the actual HTML markup.\nhtml = str(page)  # or page.markup\nprint(html)\n```\n\n## `markyp-html` extensions\n\n`markyp-html` is built on [markyp](https://github.com/volfpeter/markyp). In general, extensions follow the `markyp-{domain-or-extension-name}` naming convention.\n\nHere is a list of extensions built on top of `markyp-html`:\n\n- `markyp-bootstrap4`: Bootstrap 4 implementation at https://github.com/volfpeter/markyp-bootstrap4, contribution is welcome.\n- `markyp-fontawesome`: Font Awesome icons for `markyp-html`-based web pages at https://github.com/volfpeter/markyp-fontawesome, contribution is welcome.\n- `markyp-highlightjs`: Code highlighting in HTML using `highlight.js` at https://github.com/volfpeter/markyp-highlightjs, contribution is welcome.\n\nIf you have created an open source `markyp-html` extension, please let us know and we will include your project in this list.\n\n## Community guidelines\n\nIn general, please treat each other with respect and follow the below guidelines to interact with the project:\n\n- _Questions, feedback_: Open an issue with a `[Question] \u003cissue-title\u003e` title.\n- _Bug reports_: Open an issue with a `[Bug] \u003cissue-title\u003e` title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.\n- _Feature requests and ideas_: Open an issue with an `[Enhancement] \u003cissue-title\u003e` title and a clear description of the enhancement proposal.\n\n## Contribution guidelines\n\nEvery form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.\n\nPlease follow these guidelines to contribute to the project:\n\n- Make sure your changes match the documentation and coding style of the project, including [PEP 484](https://www.python.org/dev/peps/pep-0484/) type annotations.\n- `mypy` is used to type-check the codebase, submitted code should not produce typing errors. See [this page](http://mypy-lang.org/) for more information on `mypy`.\n- _Small_ fixes can be submitted simply by creating a pull request.\n- Non-trivial changes should have an associated [issue](#community-guidelines) in the issue tracker that commits must reference (typically by adding `#refs \u003cissue-id\u003e` to the end of commit messages).\n- Please write [tests](#testing) for the changes you make (if applicable).\n\nIf you have any questions about contributing to the project, please contact the project owner.\n\nAs mentioned in the [contribution guidelines](#contribution-guidelines), the project is type-checked using `mypy`, so first of all, the project must pass `mypy`'s static code analysis.\n\nThe project is tested using `pytest`. The chosen test layout is that tests are outside the application code, see [this page](https://docs.pytest.org/en/latest/goodpractices.html#tests-outside-application-code) for details on what it means in practice.\n\nIf `pytest` is installed, the test set can be executed using the `pytest test` command from within the project directory.\n\nIf `pytest-cov` is also installed, a test coverage report can be generated by executing `pytest test --cov markyp_html` from the root directory of the project.\n\n## License - MIT\n\nThe library is open-sourced under the conditions of the MIT [license](https://choosealicense.com/licenses/mit/).\n","funding_links":[],"categories":["Libraries"],"sub_categories":["General HTML Generation"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmarkyp-html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvolfpeter%2Fmarkyp-html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvolfpeter%2Fmarkyp-html/lists"}