This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch fix/WW-5488-script
in repository https://gitbox.apache.org/repos/asf/struts-site.git

commit c440fe7f8d57d00bb4b06d14dd0be93468560114
Author: Lukasz Lenart <lukaszlen...@apache.org>
AuthorDate: Fri Nov 29 13:05:28 2024 +0100

    WW-5488 Adds missing pages for script & link tags
---
 source/tag-developers/link-tag.md      | 33 ++++++++++++++++++++++++++
 source/tag-developers/script-tag.md    | 43 ++++++++++++++++++++++++++++++++++
 source/tag-developers/tag-reference.md | 29 +++++++++++------------
 3 files changed, 90 insertions(+), 15 deletions(-)

diff --git a/source/tag-developers/link-tag.md 
b/source/tag-developers/link-tag.md
new file mode 100644
index 000000000..a49bfe024
--- /dev/null
+++ b/source/tag-developers/link-tag.md
@@ -0,0 +1,33 @@
+---
+layout: default
+title: link tag
+parent:
+  title: Tag Reference
+  url: tag-reference.html
+---
+
+# link
+
+Please make sure you have read the [Tag Syntax](tag-syntax) document and 
understand how tag attribute syntax works.
+
+## Description
+
+Render a `<link>` tag. Uses to reference a script inside your page, it 
automatically adds `nonce` attribute when available.
+
+**Note**: please be aware not all attributes are supported by tag. They are 
present because the `Link` class inherits
+all the fields from the `Component` class.   
+
+{% remote_file_content 
https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/link-description.html
 %}
+
+## Attributes
+
+{% remote_file_content 
https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/link-attributes.html
 %}
+
+## Examples
+
+**Example**
+
+```jsp
+<s:url var="myCss" value="./styles/my-style.css" encode="false"/>
+<s:link href="%{myCss}" rel="stylesheet" type="text/css" media="all"/>
+```
\ No newline at end of file
diff --git a/source/tag-developers/script-tag.md 
b/source/tag-developers/script-tag.md
new file mode 100644
index 000000000..0d73568de
--- /dev/null
+++ b/source/tag-developers/script-tag.md
@@ -0,0 +1,43 @@
+---
+layout: default
+title: script tag
+parent:
+  title: Tag Reference
+  url: tag-reference.html
+---
+
+# script
+
+Please make sure you have read the [Tag Syntax](tag-syntax) document and 
understand how tag attribute syntax works.
+
+## Description
+
+Render a `<script>` tag. Uses to reference a script inside your page, it 
automatically adds `nonce` attribute when available.
+
+**Note**: please be aware not all attributes are supported by tag. They are 
present because the `Script` class inherits
+all the fields from the `Component` class.   
+
+{% remote_file_content 
https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/script-description.html
 %}
+
+## Attributes
+
+{% remote_file_content 
https://raw.githubusercontent.com/apache/struts/master/core/src/site/resources/tags/script-attributes.html
 %}
+
+## Examples
+
+**Example 1**
+
+```jsp
+<s:url var="myScript" value="./js/my-script.js" encode="false"/>
+<s:script src="%{myScript}"/>
+```
+
+**Example 2**
+
+```jsp
+<s:script>
+    $(function () {
+        ...
+    });
+</s:script>
+```
diff --git a/source/tag-developers/tag-reference.md 
b/source/tag-developers/tag-reference.md
index 8d7dcb33a..da1f1628d 100644
--- a/source/tag-developers/tag-reference.md
+++ b/source/tag-developers/tag-reference.md
@@ -25,21 +25,20 @@ or action executions.
 
 Struts Generic Tags control the execution flow as pages render.
 
-|**Control Tags**|                               |**Data Tags**|               
  
-|                |[if](if-tag)              |             |[a](a-tag)          
    |   
-|                |[elseif](elseif-tag)      |             
|[action](action-tag)    |
-|                |[else](else-tag)          |             |[bean](bean-tag)    
    |
-|                |[append](append-tag)      |             |[date](date-tag)    
    |
-|                |[generator](generator-tag)|             |[debug](debug-tag)  
    |
-|                |[iterator](iterator-tag)  |             |[i18n](i18n-tag)    
    |
-|                |[merge](merge-tag)        |             
|[include](include-tag)  |
-|                |[sort](sort-tag)          |             |[param](param-tag)  
    |   
-|                |[subset](subset-tag)      |             
|[property](property-tag)|
-|                |                               |             
|[push](push-tag)        |
-|                |                               |             |[set](set-tag) 
         |
-|                |                               |             
|[text](text-tag)        |
-|                |                               |             |[url](url-tag) 
         |
-
+|**Control Tags**| |**Data Tags**| |**Other Tags** |                 
+| |[if](if-tag)              | |[a](a-tag)              | | 
[script](script-tag) |   
+| |[elseif](elseif-tag)      | |[action](action-tag)    | | [link](link-tag) |
+| |[else](else-tag)          | |[bean](bean-tag)        | | |
+| |[append](append-tag)      | |[date](date-tag)        | | |
+| |[generator](generator-tag)| |[debug](debug-tag)      | | |
+| |[iterator](iterator-tag)  | |[i18n](i18n-tag)        | | |
+| |[merge](merge-tag)        | |[include](include-tag)  | | |
+| |[sort](sort-tag)          | |[param](param-tag)      | | |   
+| |[subset](subset-tag)      | |[property](property-tag)| | |
+| | | |[push](push-tag)        | | |
+| | | |[set](set-tag)          | | |
+| | | |[text](text-tag)        | | |
+| | | |[url](url-tag)          | | |
 
 ## UI Tag Reference
 

Reply via email to