Staticus Website Compiler - Setup Guide
π Overview
This comprehensive guide outlines every step necessary to set up and install the Staticus Website Compiler on Windows and Linux systems. It assumes no prior knowledge and explains where and how to run each command, including all relevant details.
π Requirements
Before starting, ensure you have the following installed manually:
- π Python 3.13.1
- Includes tk (Linux users must install
python3-tkseparatelyβsee Linux instructions).
- Includes tk (Linux users must install
- π§© Node.js v22.14.0
- Comes with npm (Node Package Manager).
- π¨ GraphicsMagick
- Windows users: A portable copy is included by default; manual installation only if the included copy fails.
All installations and verifications are explained in detail below.
π οΈ Installation
πͺ Windows Installation
Install Python 3.13.1
- Go to the official Python website and download the installer for Python 3.13.1.
- During installation, ensure that the "Add Python to PATH" option is checked.
- Verify Python installation by opening Command Prompt (
cmd) and running:python --version
Install Node.js v22.14.0
- Download the Windows installer from the official Node.js website.
- Follow the default prompts during installation.
- Verify installation:
node -v # Should print "v22.14.0" npm -v # Should print "10.9.2"
Check GraphicsMagick
- A portable version is included in the project directory.
- If it fails to run, download and install manually from the GraphicsMagick website.
Navigate to the Project Folder
- Open Command Prompt and run:
cd path\\to\\staticus-website-compiler - Replace
path\\to\\staticus-website-compilerwith the actual path where the repository is cloned.
- Open Command Prompt and run:
π§ Linux Installation
Install Python 3.13.1
- Download Python 3.13.1 from the official Python website.
- Install
python3-tk:sudo apt install python3-tk - Verify installation:
python3 --version
Install Node.js v22.14.0
- Ensure
curlis installed:sudo apt install curl - Install Node.js via NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash source "$HOME/.nvm/nvm.sh" nvm install 22 - Verify:
node -v # Should print "v22.14.0" npm -v # Should print "10.9.2"
- Ensure
Install GraphicsMagick
sudo apt install graphicsmagickNavigate to the Project Folder
- Open a terminal and run:
cd /path/to/staticus-website-compiler - Replace
/path/to/staticus-website-compilerwith the actual path where the repository is cloned.
- Open a terminal and run:
π¦ Installing Node Modules
πΉ What Are Node Modules?
Node modules are packages that add essential functionality to the project. Without them, the compiler will not run.
πΉ Where and How to Install Them
Ensure you are inside the project folder:
- Windows:
cd path\\to\\staticus-website-compiler - Linux:
cd /path/to/staticus-website-compiler
- Windows:
Run the following command to install all required modules:
npm install
Explanation:
npm installreads thepackage.jsonfile in the project folder and installs all listed dependencies. This must be run inside the project folder, otherwise the necessary packages will not be installed correctly.
π New Project
To start a new project with the Staticus Website Compiler, you have two example foundations to choose from. These examples are designed to serve as foundational learning tools, helping you learn how to structure and write a project that works seamlessly with the compiler. By studying and modifying them, you will gain insights into how the Staticus Website Compiler operates and how to structure your own custom projects.
π Example Foundations
Full Example
- Located in the
example/fulldirectory. - This example provides a complete project setup, including advanced configurations, extended features, and additional components.
- Ideal for users who want to explore the full capabilities of the compiler or need a comprehensive starting point.
- Located in the
Minimal Example (Min Example)
- Located in the
example/mindirectory. - A streamlined version containing only the essential files and configurations required to run a basic project.
- Best for beginners who want to understand the core structure without extra complexity.
- Located in the
π Using the Examples for a New Project
To use these examples in a new project:
Copy the Contents
- Choose either the
example/fullorexample/mindirectory based on your preference. - Copy the contents to a new location of your choice where you want to set up your project.
- Choose either the
Point Staticus to Your New Project Path
Easiest Method (Using the GUI):
- Open the Staticus GUI.
- Select your newly created project folder from the project path history (if listed) or browse to the new location manually.
Manual Method (Using
config/settings.json):- Open the
config/settings.jsonfile in a text editor. - Update the
dirproperty to point to your new project path. For example:{ "dir": "./path/to/your/new/project", "dir_recent": [ "./path/to/your/new/project", "./example/full", "./example/min" ], "dir_recent_max": 10 } - Note: If the
config/settings.jsonfile does not exist, Staticus will automatically copy the default settings fromconfig/default/settings.jsonthe next time the GUI is launched or when a task is run manually from a terminal opened in the Staticus program's root directory.
- Open the
π Running the Compiler
There are 2 ways to use Staticus Website Compiler, GUI and Terminal (Command Line).
- GUI: For information on how to run the compiler using the graphic user interface, read the Staticus GUI Page.
- Terminal: For information on how to run the compiler using the terminal, read the Staticus Terminal Page.
β Troubleshooting
Python Issues: Ensure Python is added to
PATH. Usepython3ifpythonisn't recognized.Node.js Version Mismatch: Reinstall using NVM (Linux) or re-download the installer (Windows).
GraphicsMagick Issues: For Windows, try a manual install if the portable version fails. For Linux, ensure the correct package is installed for your distribution.
Node Module Errors: Ensure
npm installwas run in the correct Staticus project folder.
π Additional Notes
- All installation logs are stored in
_log/setup.log. - Review the log for details if issues occur.
π Next Steps
With the setup complete, you are now ready to start using the Staticus Website Compiler!
Happy compiling and enjoy building amazing projects! πβ¨