Project
Function
Sample CLI
gway web.site view-readme
References
['resource']
Full Code
def view_readme(*args, **kwargs):
"""Render the README.rst file as HTML."""
readme_path = gw.resource("README.rst")
with open(readme_path, encoding="utf-8") as f:
rst_content = f.read()
html_parts = publish_parts(source=rst_content, writer_name="html")
return html_parts["html_body"]