posit-dev / py-htmltools

Tools for HTML generation and output
MIT License
19 stars 4 forks source link

Add URL support to HTMLDependency #53

Closed schloerke closed 1 year ago

schloerke commented 1 year ago

Fixes #52

Can now add HTML Dependencies that have a source url:

    b1_10 = HTMLDependency(
        "b", "1.10", source={"href": "http://b.test.com"}, script={"src": "b2.js"}
    )

which renders in the <head> to:

<script src="http://b.test.com/b2.js"></script>

MUST set source to an object that contains key "href" with a URL location