Package: markyp-html
markyp-htmlmarkyp-based HTML implementations.InstallationThe project is listed on the Python Package Index, it can be installed simply by executingpip install markyp-html.Getting startedIf you are not familiar with the basic concepts ofmarkyp, please start by having a look at its documentationhere.The following very short example creates the most basic Hello World webpage. As you can see, all it takes is a singlewebpage()call and string conversion.frommarkyp_htmlimportwebpagepage=webpage("Hello World!",page_title="Hello World")# Get the actual HTML markup.html=str(page)# or page.markupprint(html)Here is a slightly more sophisticated Hello World example, that contains all kinds of metadata, some CSS, and a couple of simple text elements:frommarkyp_htmlimportmeta,style,webpagefrommarkyp_html.textimporth1,pfrommarkyp_html.inlineimportstrongpage=webpage(h1("markyp-html"),strong(p("Hello World!")),p("This page was generated using Python and markyp-html."),page_title="markyp-html demo page",head_elements=[style("h1 {color:red;}\np {color:blue;}")],metadata=[meta.author("Website Author"),meta.charset("UTF-8"),meta.description("markyp-html demo"),meta.keywords("markyp-html,markup,Python,HTML"),meta.viewport("width=device-width, initial-scale=1.0")])# Get the actual HTML markup.html=str(page)# or page.markupprint(html)markyp-htmlextensionsmarkyp-htmlis built onmarkyp. In general, extensions follow themarkyp-{domain-or-extension-name}naming convention.Here is a list of extensions built on top ofmarkyp-html:markyp-bootstrap4: Bootstrap 4 implementation athttps://github.com/volfpeter/markyp-bootstrap4, contribution is welcome.markyp-fontawesome: Font Awesome icons formarkyp-html-based web pages athttps://github.com/volfpeter/markyp-fontawesome, contribution is welcome.markyp-highlightjs: Code highlighting in HTML usinghighlight.jsathttps://github.com/volfpeter/markyp-highlightjs, contribution is welcome.If you have created an open sourcemarkyp-htmlextension, please let us know and we will include your project in this list.Community guidelinesIn general, please treat each other with respect and follow the below guidelines to interact with the project:Questions, feedback: Open an issue with a[Question] <issue-title>title.Bug reports: Open an issue with a[Bug] <issue-title>title, an adequate description of the bug, and a code snippet that reproduces the issue if possible.Feature requests and ideas: Open an issue with an[Enhancement] <issue-title>title and a clear description of the enhancement proposal.Contribution guidelinesEvery form of contribution is welcome, including documentation improvements, tests, bug fixes, and feature implementations.Please follow these guidelines to contribute to the project:Make sure your changes match the documentation and coding style of the project, includingPEP 484type annotations.mypyis used to type-check the codebase, submitted code should not produce typing errors. Seethis pagefor more information onmypy.Smallfixes can be submitted simply by creating a pull request.Non-trivial changes should have an associatedissuein the issue tracker that commits must reference (typically by adding#refs <issue-id>to the end of commit messages).Please writetestsfor the changes you make (if applicable).If you have any questions about contributing to the project, please contact the project owner.As mentioned in thecontribution guidelines, the project is type-checked usingmypy, so first of all, the project must passmypy's static code analysis.The project is tested usingpytest. The chosen test layout is that tests are outside the application code, seethis pagefor details on what it means in practice.Ifpytestis installed, the test set can be executed using thepytest testcommand from within the project directory.Ifpytest-covis also installed, a test coverage report can be generated by executingpytest test --cov markyp_htmlfrom the root directory of the project.License - MITThe library is open-sourced under the conditions of the MITlicense.