Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow attributes injection into HTMLAsset #1706

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

vchuravy
Copy link
Contributor

@vchuravy vchuravy commented Oct 3, 2021

I would like to use a privacy conscious alternative to Google Analytics,
and for their needs I need to inject the following header:

<script defer data-domain="yourdomain.com" src="https://plausible.io/js/plausible.js"></script>

I checked that:

makedocs(;
    format=Documenter.HTML(;
        prettyurls=get(ENV, "CI", "false") == "true",
        assets=[
            asset("https://plausible.io/js/plausible.js", class=:js, attributes=Dict(Symbol("data-domain") => "yourdomain.com", :defer => ""))
	    ],
    ),
)

Does seem to generate the right HTML.

CHANGELOG.md Outdated Show resolved Hide resolved
@fredrikekre fredrikekre removed the request for review from mortenpi October 14, 2021 09:03
@fredrikekre fredrikekre merged commit 80ef5ca into JuliaDocs:master Oct 14, 2021
@vchuravy vchuravy deleted the vc/html_asset branch October 17, 2021 00:56
@mortenpi mortenpi added Type: Feature Format: HTML Related to the default HTML output labels Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Format: HTML Related to the default HTML output Type: Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants