From 6ca67a8bffe0e187f778cf7b6a462167af6b0bf0 Mon Sep 17 00:00:00 2001 From: domurtag Date: Wed, 31 Dec 2014 13:36:07 +0000 Subject: [PATCH 1/2] docs for tags and commands #195 --- src/docs/ref/Command Line/asset-clean.gdoc | 5 +++++ src/docs/ref/Tags/assetPath.gdoc | 18 ++++++++++++++++++ src/docs/ref/Tags/assetPathExists.gdoc | 11 +++++++++++ src/docs/ref/Tags/deferredScripts.gdoc | 6 ++++++ src/docs/ref/Tags/image.gdoc | 14 ++++++++++++++ src/docs/ref/Tags/javascript.gdoc | 14 ++++++++++++++ src/docs/ref/Tags/link.gdoc | 16 ++++++++++++++++ src/docs/ref/Tags/script.gdoc | 12 ++++++++++++ src/docs/ref/Tags/stylesheet.gdoc | 15 +++++++++++++++ 9 files changed, 111 insertions(+) create mode 100644 src/docs/ref/Command Line/asset-clean.gdoc create mode 100644 src/docs/ref/Tags/assetPath.gdoc create mode 100644 src/docs/ref/Tags/assetPathExists.gdoc create mode 100644 src/docs/ref/Tags/deferredScripts.gdoc create mode 100644 src/docs/ref/Tags/image.gdoc create mode 100644 src/docs/ref/Tags/javascript.gdoc create mode 100644 src/docs/ref/Tags/link.gdoc create mode 100644 src/docs/ref/Tags/script.gdoc create mode 100644 src/docs/ref/Tags/stylesheet.gdoc diff --git a/src/docs/ref/Command Line/asset-clean.gdoc b/src/docs/ref/Command Line/asset-clean.gdoc new file mode 100644 index 00000000..48510a57 --- /dev/null +++ b/src/docs/ref/Command Line/asset-clean.gdoc @@ -0,0 +1,5 @@ +h1. asset-clean + +h2. Description + +Cleans the directory where precompiled assets are stored (@target/assets@). \ No newline at end of file diff --git a/src/docs/ref/Tags/assetPath.gdoc b/src/docs/ref/Tags/assetPath.gdoc new file mode 100644 index 00000000..31728713 --- /dev/null +++ b/src/docs/ref/Tags/assetPath.gdoc @@ -0,0 +1,18 @@ +h1. asset:assetPath + +h2. Description + +Returns the runtime URL of an asset. This tag automatically handle swapout of cache digest names during production +use as well as any custom URL mapping changes, e.g. + +{code} + +{code} + +h2. Attributes + +{table} +*Name* | *Required* | *Description* +*src* | Yes | Path to the asset from @grails-app/assets@ (excluding the first subdirectory) +*absolute* | No | If truthy, an absolute URL will be returned. By default, a relative URL is used. +{table} diff --git a/src/docs/ref/Tags/assetPathExists.gdoc b/src/docs/ref/Tags/assetPathExists.gdoc new file mode 100644 index 00000000..41d5a9ad --- /dev/null +++ b/src/docs/ref/Tags/assetPathExists.gdoc @@ -0,0 +1,11 @@ +h1. asset:assetPathExists + +h2. Description + +If an asset with the specified path exists, the body of this tag will be rendered, e.g. + +{code} + +This will only be displayed if there is an asset at foo/test.js + +{code} \ No newline at end of file diff --git a/src/docs/ref/Tags/deferredScripts.gdoc b/src/docs/ref/Tags/deferredScripts.gdoc new file mode 100644 index 00000000..bc3fea7b --- /dev/null +++ b/src/docs/ref/Tags/deferredScripts.gdoc @@ -0,0 +1,6 @@ +h1. asset:deferredScripts + +h2. Description + +Indicates the point in a page where inline JavaScript blocks (created by @@) should be rendered. Typically +this is at the bottom of a layout GSP. \ No newline at end of file diff --git a/src/docs/ref/Tags/image.gdoc b/src/docs/ref/Tags/image.gdoc new file mode 100644 index 00000000..67e28f0a --- /dev/null +++ b/src/docs/ref/Tags/image.gdoc @@ -0,0 +1,14 @@ +h1. asset:image + +h2. Description + +Creates an @@ element, e.g. {code}{code} +Any attributes other than those described below will be forwarded to the @@ element generated by this tag. + +h2. Attributes + +{table} +*Name* | *Required* | *Description* +*src* | Yes | Path to the image file +*absolute* | No | If truthy, an absolute URL will be used for the @src@ attribute of the generated @@ element. By default, a relative URL is used. +{table} diff --git a/src/docs/ref/Tags/javascript.gdoc b/src/docs/ref/Tags/javascript.gdoc new file mode 100644 index 00000000..a51a7ef6 --- /dev/null +++ b/src/docs/ref/Tags/javascript.gdoc @@ -0,0 +1,14 @@ +h1. asset:javascript + +h2. Description + +Include a JavaScript file in a page, e.g. {code}{code} +Any attributes other than those described below will be forwarded to the @