Librarian comes with a CLI helper that you can use to create new content, manipulate cache, and build the static version of your site.
./librarian help to get a complete list of available commands:
_ ____ ____ ____ ____ ____ ____ ____ ____ | | | || \ | \ / || \ | | / || \ | | | | | o )| D )| o || D ) | | | o || _ | | |___ | | | || / | || / | | | || | | | | | | | O || \ | _ || \ | | | _ || | | | | | | | || . \| | || . \ | | | | || | | |_____||____||_____||__|\_||__|__||__|\_||____||__|__||__|__| Type "./librarian help" for help with available commands. Namespace Command example ./librarian example help ./librarian help create ./librarian create content ./librarian create cache ./librarian cache clear ./librarian cache ./librarian cache refresh build ./librarian build
example command is a demo command included within the Librarian application template, located at the
app/Command directory. The built-in
build commands are implemented as separate packages living in their own repositories.
You can write your own commands in the
app/Command directory. Check the creating CLI commands section for more information on how to do that.
Creates new content based on pre-defined Stencil templates. Defaults to
post content type.
./librarian create content [contentType]
Used to clear or refresh the cache used by the development server.
Clearing the cache
./librarian cache clear
Refreshing the cache (clears and warms up)
./librarian cache refresh
Used to output a static build of your website. By default, it saves files in the