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

User API for non-local assets #1108

Merged
merged 7 commits into from Aug 25, 2019
Merged

User API for non-local assets #1108

merged 7 commits into from Aug 25, 2019

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Aug 21, 2019

Adds an exported asset function that can be used to include non-local assets in the HTML:

makedocs(
  format = Documenter.HTML(
    assets = [
      # Standard local asset
      "assets/extra_styles.css",
      # Standard remote asset (extension used to determine that class = :js)
      asset("https://example.com/jslibrary.js"),
      # Setting asset class manually, since it can't be determined manually
      asset("https://example.com/fonts", class = :css),
      # Same as above, but for a local asset
      asset("asset/foo.script", class=:js, islocal=true),
    ]
  )
)

A practical example would be to e.g. add additional fonts via CDN:

assets = [
  asset("https://fonts.googleapis.com/css?family=Nanum+Brush+Script&display=swap", class=:css)
]

Towards #982

@mortenpi mortenpi added this to the 0.24.0 milestone Aug 21, 2019
@mortenpi mortenpi merged commit 5ae0677 into master Aug 25, 2019
@mortenpi mortenpi deleted the mp/genericassets branch August 25, 2019 01:33
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: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant