-
Notifications
You must be signed in to change notification settings - Fork 0
Config
This document provides a complete reference to all configuration variables used in the Staticus Website Compiler, accurately reflecting the definitions from config.json and their implementations in Staticus. All options, including advanced configurations such as the { "toplevel": true } setting for mangle, are now fully detailed.
-
Type:
string -
Example:
"require": { "site": { "url": "https://www.staticuswebsitecompiler.com" } }
-
Description: Defines the base URL of the website. It is essential for setting
og:urlmeta tags and generating the sitemap. -
Parameters:
- Must be a valid URL.
-
Usage in Code:
- Referenced for
og:urlgeneration. - Used in sitemap creation to establish accurate links.
- Referenced for
Controls branding elements such as icons, backgrounds, and alignment for visual consistency.
- Description: Configures how foreground and background images are processed, including alignment, blur, and visual effects.
-
Usage in Code:
- Utilized for image composition and favicon generation.
"foreground": {
"alignment": { "x": "center", "y": "center" },
"blur": 0,
"modulate": {}
}-
Parameters:
-
alignment: X and Y values (
left,center,right,top,bottom). - blur: Integer specifying blur intensity.
- modulate: Object for additional visual effects.
-
alignment: X and Y values (
"background": {
"alignment": { "x": "center", "y": "center" },
"apply": { "square": true, "wide": true },
"blur": 0,
"modulate": {}
}-
Parameters:
- apply.square: Boolean; applies settings to square images.
- apply.wide: Boolean; applies settings to wide images.
- blur: Integer for blur effect.
- modulate: Object for color modulation.
-
Description: Specifies the sizes for various branding images including favicons and touch icons.
-
Usage in Code:
- Processed for favicon and touch icon generation.
-
ICO Sizes:
"ico": [16, 32, 48, 64, 96, 128]
-
Image Sizes:
"image": { "apple-touch-icon-57x57.png": { "width": 57, "height": 57 }, "apple-touch-icon-120x120.png": { "width": 120, "height": 120 }, "mstile-310x310.png": { "width": 310, "height": 310 }, "favicon-512.png": { "width": 512, "height": 512 } }
-
Description: Defines JavaScript minification options to reduce file size.
-
Usage in Code:
- Applied during JS processing.
-
Parameters:
-
keep_classnames: If
true, retains class names. -
keep_fnames: If
true, retains function names. - compress: Enables JS compression.
-
mangle: Controls mangling of names.
-
Boolean:
truefor full mangling,falseto disable. -
Object:
Enables mangling of top-level variable and function names.
{ "toplevel": true }
-
Boolean:
"minify": { "js": { "keep_classnames": false, "keep_fnames": false, "compress": true, "mangle": { "toplevel": true } } }
-
keep_classnames: If
-
Description: Manages file and directory handling during compilation.
-
Usage in Code:
- Used to filter paths during processing.
-
Ignore Navigation:
"ignore_nav": ["index", "404"]
-
Ignore Prefix:
"ignore_prefix": "_"
-
Ignore Package:
"ignore_package": ["example"]
-
Ignore Sitemap:
"ignore_sitemap": ["404", "503"]
-
Description: Controls ToC generation for HTML pages.
-
Usage in Code:
- Implemented for HTML ToC creation.
-
Depth:
"depth": 4
-
Collapsible:
"collapsible": false
-
Description: Specifies whether URLs should include
.htmlextensions. -
Usage in Code:
- Applied during watch process.
"html_extension": true
-
Description: Defines file watching behaviors for live reloading.
-
Usage in Code:
- Used with BrowserSync.
-
Delay Browser:
"delay_browser": 1250
-
Delay Change:
"delay_change": 750
Note: All configurations presented here now include advanced settings such as { "toplevel": true } for mangle, ensuring no options have been omitted and maintaining consistency across all related files for proper functionality within the Staticus Website Compiler project.