This repository was archived by the owner on May 26, 2026. It is now read-only.
Repository navigation
Cheat sheet
Arthur Beck edited this page Aug 6, 2024
·
2 revisions
This is a cheat sheet for all CSC commands. Use each command with <?(name in all lower case) (arguments)>.
You can also put arguments in quotes to have spaces in them.
If you add a file with the name no-serve.txt in your templates directory, then you can add the hcsc files(WITHOUT the file extension) to not output. These files CAN still be used in other files, and it will properly be included but not outputted.
You can use variables anywhere after they have been set by putting the variable name in curly brackets like this: {{variable_name}}.
-
include: Takes infinite arguments. The first argument is the hcsc file to include, and all subsequent arguments are key, value pairs in the formatkey=valuethat will be used in the file. This entire statement will be replaced with the included file. -
if: Takes one argument, that either being testing two values for equality or testing a variable for being "true". -
rename_file: Takes one argument, and that will be used to change the output filename. This should have a extension. -
setvar: Sets a variable to a value. Should be in the formatname=valueand value can have spaces without requiring quotes. -
else: For the last if statement, provides a alternative result for if the statement is false. -
endif: Ends a if statement. Is also used after an else statement, and should not be used before an else statement. -
markdown: Creates a markdown block until a endmd statement and converts all contained text(including anything included with include statements!) into HTML from markdown. -
endmd: Ends a markdown block. -
static: Takes two arguments. The first is a path relative to the current file that should be used. Currently, the only supported extensions arecssandjs. The second argument is a path that the file should be output as. This output path can have the text[hash]in it anywhere, and it will be replaced with the first eight hex characters of the SHA-1 hash of the file(this is for cache busting purposes). This statement will also be replaced with some file extension-specific HTML for referencing the file in the output HTML. -
copyout: Takes one argument and copies it directly into the out directory(NOT the static directory). This is useful for resources such as images and videos.