Command Line
+working with hyde
+ +The hyde command line supports three subcommands:
+-
+
- create - Initializes a new site at a given path +
- gen - Generates the website to a configured deploy folder +
- serve - Starts a local http server that regenerates based on the requested file +
The create command
+Creates a new hyde website.
+hyde create
hyde [-s </site/path>] [-v] create [-l <layout>] [-f] [-h]
-
+
-
+
+-s SITEPATH, --sitepath SITEPATH
Where the site must be created. If this path is not empty then the
+-f
+option must be specified to overwrite the site.Optional - defaults to current working directory.
+
+ -
+
+-f, --force
Specifying this option will overwrite files and folders at the given +site path.
+Optional - If the target directory is not empty, hyde will throw an +exception unless this is specified.
+
+ -
+
+-l LAYOUT, --layout LAYOUT
The name of the layout to use for creating the initial site. Hyde currently +has three layouts:
+basic
,test
anddoc
.While basic and test are really barebones, doc is the one that generates +this documentation and is completely usable. Hyde will get more layouts +as over time.
+Hyde tries to locate the specified layout in the following folders:
+-
+
- In
layouts
folder under the path specified by theHYDE_DATA
+ environment variable
+ - In
layouts
folder under hyde
+
Optional - defaults to
+basic
+ - In
-
+
+-v, --verbose
Logs detailed messages to the console.
+Optional - shows only essential messages if this option is omitted.
+
+ -
+
+-h
Displays the help text for the
+create
command.
+
Assuming the HYDE_DATA
environment variable is empty and the folder
+~/test
is empty, the following command will create a new hyde site
+at ~/test
with the contents of layouts/doc
folder:
hyde -s ~/test create -l doc
The generate command
+Generates the given website.
+hyde gen
hyde [-s </site/path>] [-v] gen [-d </deploy/path>] [-c <config/path>] [-h]
-
+
-
+
+-s SITEPATH, --sitepath SITEPATH
The path to the site to be generated.
+Optional - defaults to current working directory.
+
+ -
+
+-d DEPLOY_PATH, --deploy-path DEPLOY_PATH
Location where the site should be generated. This option overrides any +setting specified in the hyde [configuration][]. The path is assumed to +be relative to the site path unless a preceding path separator is found.
+Optional - Uses what is specified in the config file. The default option +in the configuration file is:
+deploy
folder under the current site path.
+ -
+
+-c CONFIG, --config-path CONFIG
This is used for specifying an alternate configuration file to use for +generating the site. This is useful if you have two different configurations +for you production versus development websites.
+The path is assumed to be relative to the site path unless a preceding path +separator is found.
+Optional - defaults to
+site.yaml
+ -
+
+-v, --verbose
Logs detailed messages to the console.
+Optional - shows only essential messages if this option is omitted.
+
+ -
+
+-h
Displays the help text for the
+gen
command.
+
The following command will use production.yaml
as the configuration file and
+generate the website at ~/test
to ~/production_site
directory.
cd ~/test
hyde gen -c production.yaml -d ~/production_site
The serve command
+Starts the built in web server that also regenerates based on the request if there are changes.
+hyde serve
hyde [-s </site/path>] [-v] gen [-d </deploy/path>] [-c <config/path>] [-h]
-
+
-s SITEPATH, --sitepath SITEPATH
+-d DEPLOY_PATH, --deploy-path DEPLOY_PATH
+-c CONFIG, --config-path CONFIG
+
Since the serve
command auto generates if there is a need, it needs the same
+ parameters as the gen
command. The above parameters serve the same purpose here
+ as in the gen
command.
-
+
-a ADDRESS, --address ADDRESS
+
The address to serve the website.
+Optional - defaults to localhost
-
+
-p PORT, --port
+
The port to serve the website.
+Optional - default to 8080
-
+
-h
+
Displays the help text for the serve
command.
The following command will serve the website at http://localhost:8181
cd ~/test
hyde serve -p 8181