Third-party imports

Description#


By default in the theme, it is possible to import libraries or third-party code into the generated html page, using the website configuration.

The several types of imports managed by the theme are the following ones:

Import type Comment
SASS files (.sass)
  • Imported in <head> tag as <link rel="stylesheet" type="text/css"> after being converted as CSS by Hugo , grouped and minified in css/main.css file
  • Paths used for the SASS➔CSS conversion :
    • assets/bulma
    • assets/sass
CSS files (.css)
  • Imported file by file in <head> tag as <link rel="stylesheet" type="text/css"> and minified
Javascript files (.js)
  • Imported file by file at the end of the <body> tag as <script type="text/javascript"></script> and minified
Javascript modules (.js)
  • Imported file by file at the end of the <body> tag as <script type="module"></script> and minified
Files to import must be defined as Hugo assets

Define third-party imports#


To define a file to import you must use the following configuration (Cf. highlighted lines below):

config.toml ([params] section)

Define third-party imports for shortcodes#


The theme also offers the possibility to import libraries or third-party code associated with a shortcode. These files will be imported only if the shortcode is used in the current page, therefore reducing the loading time of the page.

To define a file to import, associated with a shortcode, you must use the following configuration (Cf. highlighted lines below):

config.toml ([params] section)