CLI
Here's the reference of the command line interface commands built in ssgo
:
ssgo build
Note that the
build
keyword is optional as runningssgo
without specified command will simply trigger a build by default.
Builds the ssgo
project of the current directory to the dist/
directory.
Options
--sitemap
: Generate a sitemap.xml file of the build pages for the given host. Example:ssgo build --sitemap=https://example.com
. Works only with thebuild
command.--only-creators
: Filter the creators to run. Example:ssgo dev --only-creators=index.ts,other.js
. Specifying this option will preventssgo
to empty thedist/
directory before building. Useful to rebuilt only some pages.
ssgo dev
Same as build
except ssgo
will also spawn a file watcher on your project files to re-build specific parts of the project upon changes. dev
will also serve the content of the dist/
directory over http://localhost:5580
.
Options
--host
: Set the host to servedist/
over (default 'localhost'). Example:ssgo dev --host=0.0.0.0
(to servedist/
on local network). Works only with thedev
command.--port
: Set the port to servedist/
over (default 5580). Example:ssgo dev --port=8080
. Works only with thedev
command.--only-creators
: Seessgo build > Options
.
ssgo init
Initializes a ssgo project in the current working directory by creating the needed directories: creators/
, templates/
, components/
, static/
. A default creator, template and stylesheet will also be created.
init
will also create a default .gitignore
file and add the dist/
directory inside it.
ssgo init && ls
# .gitignore creators/ templates/ components/ static/
cat .gitignore
# dist/
Note that if some of the directories or files to create already exist, init
will let them untouched.
ssgo version
Outputs the current version of ssgo
.
ssgo upgrade
Upgrades to the latest ssgo version.
ssgo help
Shows some help about ssgo commands.
Something about this page is wrong? Edit it on GitHub.