Skip to content

Latest commit

 

History

History
53 lines (44 loc) · 982 Bytes

File metadata and controls

53 lines (44 loc) · 982 Bytes

+++ title = "Custom Assets" date = 2021-11-28T16:00:49+08:00 featured = false comment = true toc = true reward = true categories = [ "Assets" ] tags = [ "CSS", "JS" ] series = [ "Docs" ] images = [] aliases = [ "/en/posts/custom-assets", "/en/docs/custom-assets" ] authors = ["RazonYang"]

[menu.footer]

parent = "docs"

weight = 6

+++

As a customizable theme, it provides the ability to customize assets, whether it is customizing CSS and JS or introducing third-party CSS and JS.

Internal Assets

Just create and edit the files assets/main/scss/_variables.scss, assets/main/scss/_custom.scss and assets/main/js/custom.ts.

These files will be bundled into one for reducing HTTP requests.

External Assets

Any external CSS and JS resources can be imported by the customCSS and customJS parameters.

customCSS = [
  "external-foo.css",
  "external-bar.css"
]

customJS = [
  "external-foo.js",
  "external-bar.js"
]