![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Generates a static site from template files with YAML and Liquid. Stack supports template transformation through Markdown, Textile and Less CSS.
Within template files, stack allows you to use bi-directional YAML variables and include files.
Available through Gemcutter.
gem install stack
cd /path/to/my/site
stack [command] [options]
generate
Generate runs through the source and transforms the templates, if no source is specified the current directory will be used.
gen
Alias of generate
.
server
Runs a web server serving the output of the transformed source, by default when running stack in server mode your templates will be automatically transformed when changed (this can be disabled).
watch
Watches a directory and re-builds whenever theres file changes.
--source [DIR]
Directory to use as the source for generating a site with stack, by default the current directory will be used.
--target [DIR]
Directory to use as the target directory, if none is specified the target will be a folder called _stack
in the source directory.
--port [PORT]
Specifies the port number the server should use when serving content through the server
command.
--disable-watch
Disables automatic transformation when serving content through the server
command.
require 'stack'
Stack::Generator.new("/path/to/source", "/path/to/target")
Template files can contain YAML block's that are processed by stack and can be used to define Liquid variables for use in your templates. A YAML block can be something like;
---
layout: application
title: Page Title
---
layout
This specifies the layout file to use around the content, theres no need to specify the extension. The layout must be defined in a file inside a _layout
folder that is within the current template scope, if you have templates defined in a sub-folder you can have a _layout
folder that only templates in the sub-folder can access.
generator
This variable holds the current hash used to transform the current template. You should not override this from the YAML block.
generator.time
The current Time from when the stack processed and transformed the templates.
generator.processed_at
The current Time the generator
processed the templates.
generator.transformed_at
The current Time the generator
transformed the templates.
Its out of the scope of this project's README file to describe how Liquid templating can be used, for more information see the Liquid Wiki.
{{ generator.time | date_to_xmlschema }} #=> 2009-10-31T21:16:06+00:00
Transforms a Time into a XML schema format string.
{{ generator.time | date_to_string }} #=> 31 Oct 2009
Transforms a Time into a formatted string.
{{ title | xml_escape }} #=>
Escapes the specified string for use in XML.
Copyright (c) 2009 Adam Livesley (sixones). See LICENSE for details.
FAQs
Unknown package
We found that stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.