Files
sumup/README_bootstrap-module
2025-11-09 20:01:52 +01:00

29 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Simplified steps:
Step 1 - Initialize Your Project as a Hugo Module
Open your terminal. Use the command hugo mod init github.com/your-username/repository-name, replacing “your-username” and “repository-name” with your GitHub information.
This creates a file called go.mod in your projects root.
Step 2 - Add Hugo Bootstrap Module to Your Config File
Locate your projects configuration file, which could be named config.toml or hugo.toml.
Add the following code in the .toml format, or adjust if you prefer YAML or JSON:
[module]
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"
Step 3 - Update the Added Module#
In your terminal, run hugo mod get -u.
This command downloads the module to your project, and youll find a new file called go.sum in your projects root.
Step 4 - Create SCSS and JS Files in the Assets Directory#
Inside your project, create a folder named “scss” in the assets directory.
In the “scss” folder, create a file named “styles.scss”.
Create another folder in the assets directory named “js”.
In the “js” folder, create a file named “index.js”.
You should now have these files: /assets/scss/styles.scss and /assets/js/index.js.
Step 5 - Add CSS and JS Links in Your Projects Head#
In the head section of your website, add links to the files created in step 4. This allows your pages to access the SCSS and JS files for styling and functionality.
More code I do not yet understand just above the closing head tag (</head>)