This is an automated email from the ASF dual-hosted git repository.
skygo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/netbeans-antora-ui.git
The following commit(s) were added to refs/heads/main by this push:
new 514fefd add template for blog
new d020f91 Merge pull request #2 from ebarboni/initialsetup
514fefd is described below
commit 514fefd777dcea36fc618648f432c006706337b4
Author: Eric Barboni <[email protected]>
AuthorDate: Tue Oct 10 19:25:11 2023 +0200
add template for blog
---
build/netbeans-ui-bundle.zip | Bin 1517862 -> 1520001
bytes
gulpfile.js | 1 +
src/helpers/eq.js | 3 +
src/helpers/iftaginpage.js | 4 +
src/helpers/nicedate.js | 13 ++
src/helpers/pages-blog.js | 18 +++
src/helpers/pages-with-tag.js | 23 ++++
src/helpers/relativize.js | 24 ++++
src/helpers/wikiindex.js | 52 +++++++
.../wiki-devindexbread.hbs => layouts/404.hbs} | 4 +-
src/layouts/blogentry.hbs | 26 ++--
src/layouts/blogindex.hbs | 51 +++----
src/layouts/page_front.hbs | 2 +-
src/layouts/page_noaside.hbs | 22 +--
src/layouts/platform_tutorial.hbs | 34 ++---
src/layouts/tutorial.hbs | 41 ++----
src/layouts/wiki.hbs | 24 ++--
src/layouts/wikidev.hbs | 41 +++---
src/layouts/wikidevindex.hbs | 153 ++++++---------------
src/partials/footer.hbs | 10 +-
src/partials/menu.hbs | 12 +-
src/partials/news.hbs | 2 +-
src/partials/wiki-devbread.hbs | 6 +-
src/partials/wiki-devindexbread.hbs | 6 +-
src/partials/wiki-index.hbs | 6 +-
25 files changed, 307 insertions(+), 271 deletions(-)
diff --git a/build/netbeans-ui-bundle.zip b/build/netbeans-ui-bundle.zip
index 5bf9f0e..cb388e1 100644
Binary files a/build/netbeans-ui-bundle.zip and b/build/netbeans-ui-bundle.zip
differ
diff --git a/gulpfile.js b/gulpfile.js
index e886912..31cb94c 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -49,6 +49,7 @@ async function bundle () {
vfs.src('css/*.css', opts),
vfs.src('js/**/*.js', opts),
// here we exclude some script for conversion
+ vfs.src('helpers/*.js', opts),
vfs.src('images/**/*.{svg,png,gif,jpg}', opts),
vfs.src('layouts/*.hbs', opts),
vfs.src('partials/*.hbs', opts))
diff --git a/src/helpers/eq.js b/src/helpers/eq.js
new file mode 100644
index 0000000..16dc287
--- /dev/null
+++ b/src/helpers/eq.js
@@ -0,0 +1,3 @@
+'use strict'
+
+module.exports = (a, b) => a === b
diff --git a/src/helpers/iftaginpage.js b/src/helpers/iftaginpage.js
new file mode 100644
index 0000000..f1f599b
--- /dev/null
+++ b/src/helpers/iftaginpage.js
@@ -0,0 +1,4 @@
+module.exports = (page, custom) => {
+ var tagarray = page.attributes.tags.split(', ')
+ return tagarray.indexOf(custom) !== - 1;
+}
diff --git a/src/helpers/nicedate.js b/src/helpers/nicedate.js
new file mode 100644
index 0000000..9fa0598
--- /dev/null
+++ b/src/helpers/nicedate.js
@@ -0,0 +1,13 @@
+module.exports = (d) => {
+ const date = new Date(d)
+ const dayofweekl = date.toLocaleString(
+ 'default', { weekday: 'long' }
+ );
+ const month = date.toLocaleString(
+ 'default', { month: 'long' });
+ const dayinmonth = (date.getDate() < 10 ? '0' : '') + date.getDate();
+ year = date.getFullYear();
+ return dayofweekl + ' ' + month + ' ' + dayinmonth + ', ' + year
+}
+
+
diff --git a/src/helpers/pages-blog.js b/src/helpers/pages-blog.js
new file mode 100644
index 0000000..5d33b52
--- /dev/null
+++ b/src/helpers/pages-blog.js
@@ -0,0 +1,18 @@
+module.exports = (tag, { data }) => {
+ const { contentCatalog, site } = data.root
+ const pages = contentCatalog.getPages(({ asciidoc, out }) => {
+ if (! out || ! asciidoc)
+ return
+ const pageTags = asciidoc.attributes['page-tags']
+ const rvalue = pageTags && pageTags.split(', ').includes(tag)
+ return rvalue
+ })
+ const { buildPageUiModel } =
require.main.require('@antora/page-composer/build-ui-model')
+ return pages.map((page) => buildPageUiModel(site, page, contentCatalog)).
+ sort(sortByDate)
+}
+
+function sortByDate (a, b) {
+ return new Date(b.attributes.revdate) - new Date(a.attributes.revdate)
+}
+
diff --git a/src/helpers/pages-with-tag.js b/src/helpers/pages-with-tag.js
new file mode 100644
index 0000000..85e82c1
--- /dev/null
+++ b/src/helpers/pages-with-tag.js
@@ -0,0 +1,23 @@
+module.exports = (tag, custom, { data }) => {
+ const { contentCatalog, site } = data.root
+ const pages = contentCatalog.getPages(({ asciidoc, out }) => {
+ if (! out || ! asciidoc)
+ return
+ const pageTags = asciidoc.attributes['page-tags']
+ const pagewikiSection = asciidoc.attributes['page-wikidevsection']
+ const rvalue = pageTags && pageTags.split(', ').includes(tag) &&
pagewikiSection && pagewikiSection.split(', ').includes(custom)
+ return rvalue
+ })
+ const { buildPageUiModel } =
require.main.require('@antora/page-composer/build-ui-model')
+ return pages.map((page) => buildPageUiModel(site, page,
contentCatalog)).sort(
+ (a, b) => (getPosition(a, custom) - getPosition(b, custom)))
+}
+
+function getPosition (page, custom) {
+ const val = page.attributes.wikidevsection.split(', ')
+ const index = val.indexOf(custom)
+ const valpos = page.attributes.position.split(', ')
+ const r = valpos[index]
+ return Number(r)
+}
+
diff --git a/src/helpers/relativize.js b/src/helpers/relativize.js
new file mode 100644
index 0000000..6fdfb45
--- /dev/null
+++ b/src/helpers/relativize.js
@@ -0,0 +1,24 @@
+'use strict'
+
+const { posix: path } = require('path')
+
+module.exports = (to, from, ctx) => {
+ if (!to) return '#'
+ // NOTE only legacy invocation provides both to and from
+ if (!ctx) from = (ctx = from).data.root.page.url
+ if (to.charAt() !== '/') return to
+ if (!from) return (ctx.data.root.site.path || '') + to
+ let hash = ''
+ const hashIdx = to.indexOf('#')
+ if (~hashIdx) {
+ hash = to.substr(hashIdx)
+ to = to.substr(0, hashIdx)
+ }
+ return to === from
+ ? hash || (isDir(to) ? './' : path.basename(to))
+ : (path.relative(path.dirname(from + '.'), to) || '.') + (isDir(to) ? '/'
+ hash : hash)
+}
+
+function isDir (str) {
+ return str.charAt(str.length - 1) === '/'
+}
diff --git a/src/helpers/wikiindex.js b/src/helpers/wikiindex.js
new file mode 100644
index 0000000..3b5c2d1
--- /dev/null
+++ b/src/helpers/wikiindex.js
@@ -0,0 +1,52 @@
+'use strict'
+
+module.exports = () => {
+ return [
+ { id: '_getting_started', name: 'Getting Started' },
+ { id: '_tutorials_and_important_starting_points', name: 'Tutorials and
important starting points' },
+ { id: '_getting_support_where_to_find_examples', name: 'Getting support,
where to find examples' },
+ { id: '_application_lifecycle_and_hooks', name: 'Application Lifecycle and
Hooks' },
+ { id:
'_development_issues_module_basics_and_classpath_issues_and_information_about_rcpplatform_application_configuration',
name: 'Development issues, module basics and classpath issues, and information
about RCP/Platform application configuration' },
+ { id: '_mavenized_builds', name: 'Mavenized Builds' },
+ { id: '_configuration_how_modules_install_things', name: 'Configuration:
How Modules Install Things' },
+ { id: '_when_there_are_multiple_ways_to_do_something', name: 'When There
Are Multiple Ways To Do Something...' },
+ { id:
'_actions_how_to_add_things_to_files_folders_menus_toolbars_and_more', name:
'Actions: How to add things to Files, Folders, Menus, Toolbars and more' },
+ { id: '_key_bindings', name: 'Key Bindings' },
+ { id: '_lookup', name: 'Lookup' },
+ { id: '_files_and_data_objects', name: 'Files and Data Objects' },
+ { id: '_converting_between_common_data_types_and_finding_things', name:
'Converting between common data types and finding things' },
+ { id: '_editor_and_edited_files', name: 'Editor and Edited Files' },
+ { id: '_file_management_within_the_ideapplication', name: 'File Management
(within the IDE/Application)' },
+ { id: '_module_system', name: 'Module System' },
+ { id: '_nodes_and_explorer', name: 'Nodes and Explorer' },
+ { id: '_tasks_and_progressbar', name: 'Tasks and Progressbar' },
+ { id: '_command_line_parsing', name: 'Command Line Parsing' },
+ { id: '_threading', name: 'Threading' },
+ { id: '_creating_a_custom_programming_language', name: 'Creating a Custom
Programming Language' },
+ { id: '_settings', name: 'Settings' },
+ { id: '_window_system', name: 'Window System' },
+ { id: '_dialogs_api', name: 'Dialogs API' },
+ { id: '_xml_multiview_api', name: 'XML Multiview API' },
+ { id: '_project_handling', name: 'Project Handling' },
+ { id: '_project_types', name: 'Project Types' },
+ { id: '_versioning', name: 'Versioning' },
+ { id: '_printing', name: 'Printing' },
+ { id: '_html_browser', name: 'HTML Browser' },
+ { id: '_wizards_and_templates', name: 'Wizards and Templates' },
+ { id: '_properties_and_propertysheet', name: 'Properties and
PropertySheet' },
+ { id: '_output_window', name: 'Output Window' },
+ { id: '_using_enterprise_resources_from_netbeans_module', name: 'Using
Enterprise Resources from NetBeans module' },
+ { id: '_running_and_writing_tests', name: 'Running and Writing tests' },
+ { id: '_branding_your_application', name: 'Branding your application' },
+ { id: '_authentication_and_authorization_in_platform_apps', name:
'Authentication and Authorization in Platform Apps' },
+ { id: '_logging_and_error_handling', name: 'Logging and Error Handling' },
+ { id: '_javahelp', name: 'JavaHelp' },
+ { id: '_look_and_design', name: 'Look and Design' },
+ { id: '_deploying_changes_through_autoupdate_and_using_autoupdate_api',
name: 'Deploying Changes through AutoUpdate and using Autoupdate API' },
+ { id: '_deployment_using_installers_nbi', name: 'Deployment using
installers / NBI' },
+ { id: '_programmatic_access_to_java_sources', name: 'Programmatic access
to Java Sources' },
+ { id: '_when_things_go_wrong_troubleshooting', name: 'When things go
wrong: Troubleshooting' },
+ { id: '_licensing_issues', name: 'Licensing Issues' },
+ { id: '_using_sounds', name: 'Using Sounds' }];
+
+}
diff --git a/src/partials/wiki-devindexbread.hbs b/src/layouts/404.hbs
similarity index 81%
copy from src/partials/wiki-devindexbread.hbs
copy to src/layouts/404.hbs
index 20e9e00..617f35f 100644
--- a/src/partials/wiki-devindexbread.hbs
+++ b/src/layouts/404.hbs
@@ -18,6 +18,4 @@
under the License.
*/%>
-<div class='aside' style='text-align: left; padding: 20px;'>
- <a href="/wiki/index.html" title="Apache NetBeans WIKI">Apache NetBeans
Wiki Index</a>/Apache NetBeans Developer FAQ
-</div>
+${content.body}
diff --git a/src/layouts/blogentry.hbs b/src/layouts/blogentry.hbs
index a8ffd5d..3925e6d 100644
--- a/src/layouts/blogentry.hbs
+++ b/src/layouts/blogentry.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,25 +17,25 @@
specific language governing permissions and limitations
under the License.
-*/%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content'>
- <h1 class="sect1">${content.title}</h1>
- <div class="blogdate"><% out.print(content.date.format('EEEEE MMMM dd,
YYYY')); %></div>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ <h1 class="sect1">{{{page.title}}}</h1>
+ <div class="blogdate">{{{ nicedate page.attributes.revdate }}}</div>
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/blogindex.hbs b/src/layouts/blogindex.hbs
index b588177..f6150e7 100644
--- a/src/layouts/blogindex.hbs
+++ b/src/layouts/blogindex.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,44 +17,31 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
- */%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
- */%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content'>
- <h1 class="sect1">${content.title}</h1>
- <%
- // content by aggregation
- TreeMap sectionsubitm = [:]
- for ( atag in tags ) {
- if ( atag.name=="blogentry") {
- for ( mydoc in atag.tagged_documents ) {
-
sectionsubitm.put(mydoc.date.format('YYYY-MM-DD').toString(),mydoc);
- }
- }
- }
- TreeMap desc = sectionsubitm.descendingMap();
- for (adoc in desc) {
- out.println('<div class="blogdate">'+adoc.value.date.format('EEEEE
MMMM dd, YYYY')+'</div>');
- out.println('<div class="blogtitle"><a
href="'+content.rootpath+adoc.value.uri+'">'+adoc.value.title+'</a></div>');
- out.println('<div class="blogbody">');
- out.println(adoc.value.body);
- out.println('</div>');
- }
-
-%>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ <h1 class="sect1">{{{page.title}}}</h1>
+ {{#each (pages-blog 'blogentry')}}
+ <div class="blogdate">{{{ nicedate ./attributes.revdate }}}</div>
+ <div class="blogtitle"><a href="{{{relativize ./url}}}">{{ ./title
}}</a></div>
+ <div class="blogbody">
+ {{{ ./contents }}}
+ </div>
+ {{/each}}
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/page_front.hbs b/src/layouts/page_front.hbs
index ea13462..1edaa87 100644
--- a/src/layouts/page_front.hbs
+++ b/src/layouts/page_front.hbs
@@ -31,7 +31,7 @@
{{>news}}
<div class='grid-container'>
<div style='margin: 2rem 0' class='grid-x grid-margin-x align-middle'>
- <div class='cell large-2 medium-3 small-5'><img
src='/images/apache-netbeans.svg'></img>
+ <div class='cell large-2 medium-3 small-5'><img
src='{{{uiRootPath}}}/images/apache-netbeans.svg'></img>
</div>
<div class='cell large-10 medium-9 small-7'>
<h1>Apache NetBeans</h1>
diff --git a/src/layouts/page_noaside.hbs b/src/layouts/page_noaside.hbs
index 80830a0..b96676e 100644
--- a/src/layouts/page_noaside.hbs
+++ b/src/layouts/page_noaside.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,23 +17,23 @@
specific language governing permissions and limitations
under the License.
-*/%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
+ {{>menu}}
<div class='grid-container main-content'>
- <h1 class="sect0">${content.title}</h1>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ <h1 class="sect0">{{{page.title}}}</h1>
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/platform_tutorial.hbs
b/src/layouts/platform_tutorial.hbs
index 797bd30..b6fc6c4 100644
--- a/src/layouts/platform_tutorial.hbs
+++ b/src/layouts/platform_tutorial.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,16 +19,17 @@
tutorial.gsp: A main area with a right aside for TOCs and tutorial
sections.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content tutorial'>
- <h1 class="sect0">${content.title}</h1>
- <% if (content.reviewed == null) {
+ <h1 class="sect0">{{{page.title}}}</h1>
+ {{#unless page.attributes.reviewed }}
+ {{!
/*
jbake's 'content.file' has this structure:
"/home/user/directory/of/the/clone/netbeans-website/netbeans.apache.org/build/generated-bake/content/plugins/index.asciidoc"
we're interested in the part after "generated-bake"
@@ -39,30 +40,31 @@
// Adds support for Windows builds
idx = idx == -1 ?
tutorial_content_file.lastIndexOf("build\\generated-bake") : idx;
tutorial_file = idx == -1 ? "???" + tutorial_content_file :
tutorial_content_file.substring(idx + "build/generated-bake".length());
- %>
+ }}
+
<div class="sectionbody">
<div class="admonitionblock note">
<table>
<tbody><tr>
<td class="icon"><i class="fa icon-note"
title="Note"></i></td>
<td class="content">This tutorial needs a review.
- You can <a
href="https://github.com/apache/netbeans-website/blob/master/netbeans.apache.org/src${tutorial_file}"
title="Edit this tutorial in github">edit it in GitHub </a>
+ You can <a href="{{{page.editUrl}}}" title="Edit this
tutorial in github">edit it in GitHub </a>
following these <a
href="/kb/docs/contributing.html">contribution guidelines.</a></td>
</tr></tbody>
</table>
</div>
</div>
- <% } else { %>
+ {{ else }}
<div class="sectionbody">
<div class="paragraph">
- <p class='reviewed'><i class="fa fa-check-circle"></i> Last
reviewed on <%= content.reviewed %></p>
+ <p class='reviewed'><i class="fa fa-check-circle"></i> Last
reviewed on {{{ page.attributes.reviewed }}}</p>
</div>
</div>
- <% } %>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ {{/unless}}
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/tutorial.hbs b/src/layouts/tutorial.hbs
index 4ab53ae..d66fe0e 100644
--- a/src/layouts/tutorial.hbs
+++ b/src/layouts/tutorial.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -19,50 +19,39 @@
tutorial.gsp: A main area with a right aside for TOCs and tutorial
sections.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content tutorial'>
- <h1 class="sect0">${content.title}</h1>
- <% if (content.reviewed == null) {
- /*
- jbake's 'content.file' has this structure:
"/home/user/directory/of/the/clone/netbeans-website/netbeans.apache.org/build/generated-bake/content/plugins/index.asciidoc"
- we're interested in the part after "generated-bake"
- */
- String tutorial_file="/";
- String tutorial_content_file = content.get("file");
- int idx =
tutorial_content_file.lastIndexOf("build/generated-bake");
- // Adds support for Windows builds
- idx = idx == -1 ?
tutorial_content_file.lastIndexOf("build\\generated-bake") : idx;
- tutorial_file = idx == -1 ? "???" + tutorial_content_file :
tutorial_content_file.substring(idx + "build/generated-bake".length());
- %>
+ <h1 class="sect0">{{{page.title}}}</h1>
+ {{#unless page.attributes.reviewed }}
<div class="sectionbody">
<div class="admonitionblock note">
<table>
<tbody><tr>
<td class="icon"><i class="fa icon-note"
title="Note"></i></td>
<td class="content">This tutorial needs a review.
- You can <a
href="https://github.com/apache/netbeans-website/blob/master/netbeans.apache.org/src${tutorial_file}"
title="Edit this tutorial in github">edit it in GitHub </a>
+ You can <a href="{{{page.editUrl}}}" title="Edit this
tutorial in github">edit it in GitHub </a>
following these <a
href="/kb/docs/contributing.html">contribution guidelines.</a></td>
</tr></tbody>
</table>
</div>
</div>
- <% } else { %>
+ {{ else }}
<div class="sectionbody">
<div class="paragraph">
- <p class='reviewed'><i class="fa fa-check-circle"></i> Last
reviewed on <%= content.reviewed %></p>
+ <p class='reviewed'><i class="fa fa-check-circle"></i> Last
reviewed on {{{ page.attributes.reviewed }}}</p>
</div>
</div>
- <% } %>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ {{/unless}}
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/wiki.hbs b/src/layouts/wiki.hbs
index 3ee2f5d..50761cf 100644
--- a/src/layouts/wiki.hbs
+++ b/src/layouts/wiki.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,24 +17,24 @@
specific language governing permissions and limitations
under the License.
-*/%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content'>
- <%include "templatesparts/wiki-index.gsp"%>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ {{>wiki-index}}
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/wikidev.hbs b/src/layouts/wikidev.hbs
index c6a8131..d185a08 100644
--- a/src/layouts/wikidev.hbs
+++ b/src/layouts/wikidev.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,36 +17,29 @@
specific language governing permissions and limitations
under the License.
-*/%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content'>
- <h1 class="sect1">${content.title}</h1>
- <%
- def needreview=false
- for ( atag in content.tags ) {
- if (atag=='needsreview') {
- needreview = true
- }
- }
- if (needreview) { %>
- <%include "templatesparts/wiki-index.gsp"%>
- <% } else { %>
- <%include "templatesparts/wiki-devbread.gsp"%>
- <% } %>
- ${content.body}
- <%include "templatesparts/tools.gsp"%>
+ <h1 class="sect1">{{{page.title}}}</h1>
+ {{#if (iftaginpage page 'needsreview') }}
+ {{>wiki-index}}
+ {{else}}
+ {{>wiki-devbread}}
+ {{/if}}
+ {{{page.contents}}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/layouts/wikidevindex.hbs b/src/layouts/wikidevindex.hbs
index d0450cb..01da459 100644
--- a/src/layouts/wikidevindex.hbs
+++ b/src/layouts/wikidevindex.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,124 +17,53 @@
specific language governing permissions and limitations
under the License.
-*/%>
-<%/*
+}}
+{{!
page_noaside.gsp: A main area with no aside.
-*/%>
+}}
<!doctype html>
<html class="no-js" lang="en" dir="ltr">
- <%include "templatesparts/head.gsp"%>
+ {{>head}}
<body>
- <%include "templatesparts/menu.gsp"%>
- <%include "templatesparts/news.gsp"%>
+ {{>menu}}
+ {{>news}}
<div class='grid-container main-content'>
- <h1 class="sect1">${content.title}</h1>
- <%include "templatesparts/wiki-devindexbread.gsp"%>
- ${content.body}
- <%
-// order by wiki section on former wiki
-def sectionMap=['_getting_started':'Getting Started',
- '_tutorials_and_important_starting_points':'Tutorials and
important starting points',
- '_getting_support_where_to_find_examples':'Getting support,
where to find examples',
- '_application_lifecycle_and_hooks':'Application Lifecycle and
Hooks',
-
'_development_issues_module_basics_and_classpath_issues_and_information_about_rcpplatform_application_configuration':'Development
issues, module basics and classpath issues, and information about RCP/Platform
application configuration',
- '_mavenized_builds':'Mavenized Builds',
- '_configuration_how_modules_install_things':'Configuration:
How Modules Install Things',
- '_when_there_are_multiple_ways_to_do_something':'When There
Are Multiple Ways To Do Something...',
-
'_actions_how_to_add_things_to_files_folders_menus_toolbars_and_more':'Actions:
How to add things to Files, Folders, Menus, Toolbars and more',
- '_key_bindings':'Key Bindings',
- '_lookup':'Lookup',
- '_files_and_data_objects':'Files and Data Objects',
-
'_converting_between_common_data_types_and_finding_things':'Converting between
common data types and finding things',
- '_editor_and_edited_files':'Editor and Edited Files',
- '_file_management_within_the_ideapplication':'File Management
(within the IDE/Application)',
- '_module_system':'Module System',
- '_nodes_and_explorer':'Nodes and Explorer',
- '_tasks_and_progressbar':'Tasks and Progressbar',
- '_command_line_parsing':'Command Line Parsing',
- '_threading':'Threading',
- '_creating_a_custom_programming_language':'Creating a Custom
Programming Language',
- '_settings':'Settings',
- '_window_system':'Window System',
- '_dialogs_api':'Dialogs API',
- '_xml_multiview_api':'XML Multiview API',
- '_project_handling':'Project Handling',
- '_project_types':'Project Types',
- '_versioning':'Versioning',
- '_printing':'Printing',
- '_html_browser':'HTML Browser',
- '_wizards_and_templates':'Wizards and Templates',
- '_properties_and_propertysheet':'Properties and PropertySheet',
- '_output_window':'Output Window',
- '_using_enterprise_resources_from_netbeans_module':'Using
Enterprise Resources from NetBeans module',
- '_running_and_writing_tests':'Running and Writing tests',
- '_branding_your_application':'Branding your application',
-
'_authentication_and_authorization_in_platform_apps':'Authentication and
Authorization in Platform Apps',
- '_logging_and_error_handling':'Logging and Error Handling',
- '_javahelp':'JavaHelp',
- '_look_and_design':'Look and Design',
-
'_deploying_changes_through_autoupdate_and_using_autoupdate_api':'Deploying
Changes through AutoUpdate and using Autoupdate API',
- '_deployment_using_installers_nbi':'Deployment using
installers / NBI',
- '_programmatic_access_to_java_sources':'Programmatic access to
Java Sources',
- '_when_things_go_wrong_troubleshooting':'When things go wrong:
Troubleshooting',
- '_licensing_issues':'Licensing Issues',
- '_using_sounds':'Using Sounds'
-]
-// toc section first
-out.println('<div id="toc" class="toc">');
-out.println('<div id="toctitle"></div>');
-out.println('<ul class="sectlevel1">');
-out.println('<li>'+content.title+'</a>');
-out.println('<ul class="sectlevel2">');
-for (asection in sectionMap) {
- out.println('<li><a href="#'+asection.key+'">'+asection.value+'</a></li>');
-}
-out.println('</ul></li></ul></div>');
-// content by aggregation
-for (asection in sectionMap) {
- out.println('<div class="sect2">');
- out.println('<h3 id="'+asection.key+'">'+asection.value+'</h3>');
- TreeMap sectionsubitm = [:]
- for ( atag in tags ) {
- if ( atag.name=="devfaq") {
- for ( mydoc in atag.tagged_documents ) {
- // wikidevsection and position may have space separated value
length must match, by index mapping
- if ( mydoc.position!=null && mydoc.wikidevsection!=null) {
- String[] sections = mydoc.wikidevsection.split(" ");
- String[] positions = mydoc.position.split(" ");
- int i = 0;
- for (String section in sections) {
- if ( asection.key==section ) {
-
sectionsubitm.put(positions[i].toInteger(),mydoc);
- }
- i++;
- }
- }
- }
- }
- }
- sectionsubitm.sort();
- out.println('<div class="ulist">');
- out.println('<ul>');
- for (adoc in sectionsubitm) {
- out.println('<li><p>');
- out.println('<a
href="'+content.rootpath+adoc.value.uri+'">'+adoc.value.title+'</a>');
- if (adoc.value.tags.contains('needsreview')) {
- out.println("[needs review]")
- }
- out.println('</p></li>');
- }
- out.println('</ul>');
- out.println('</div>');
- out.println('</div>');
-}
-
- %>
- <%include "templatesparts/tools.gsp"%>
+ <h1 class="sect1">{{{page.title}}}</h1>
+ {{>wiki-devindexbread}}
+ {{{page.contents}}}
+{{! order by wiki section on former wiki }}
+{{! toc section first }}
+ <div id="toc" class="toc">
+ <div id="toctitle"></div>
+ <ul class="sectlevel1">
+ <li>{{page.title}}<br>
+ <ul class="sectlevel2">
+{{#each (wikiindex)}}
+ <li><a href="#{{id}}">{{name}}</a></li>
+{{/each}}
+ </ul>
+ </li>
+ </ul>
+ </div>
+{{! content by aggregation }}
+{{#each (wikiindex)}}
+ <div class="sect2">
+ <h3 id="{{id}}">{{name}}</h3>
+ <div class="ulist">
+ <ul>
+ {{#each (pages-with-tag 'devfaq' id)}}
+ <li><p><a href="{{{relativize ./url}}}">{{{./title}}}</a>
+{{#if (iftaginpage this 'needsreview') }}[needs review]{{/if}}</p></li>
+ {{/each}}
+ </ul>
+ </div>
+ </div>
+{{/each}}
+ {{>tools}}
</div>
- <%include "templatesparts/footer.gsp"%>
- <%include "templatesparts/scripts.gsp"%>
+ {{>footer}}
+ {{>scripts}}
</body>
</html>
diff --git a/src/partials/footer.hbs b/src/partials/footer.hbs
index 62beab2..5ac4f7f 100644
--- a/src/partials/footer.hbs
+++ b/src/partials/footer.hbs
@@ -47,18 +47,18 @@
{{! See
https://www.apache.org/foundation/marks/pmcs#navigation }}
<h1><a href="/about/index.html">About</a></h1>
<ul>
- <li><a
href="https://netbeans.apache.org/community/who.html">Who's Who</a></li>
+ <li><a
href="{{{siteRootPath}}}/front/main/community/who.html">Who's Who</a></li>
<li><a
href="https://www.apache.org/foundation/thanks.html">Thanks</a></li>
<li><a
href="https://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
<li><a href="https://www.apache.org/security/">Security</a></li>
</ul>
</div>
<div class="large-auto cell">
- <h1><a href="/community/index.html">Community</a></h1>
+ <h1><a
href="{{{siteRootPath}}}/front/main/community/index.html">Community</a></h1>
<ul>
- <li><a href="/community/mailing-lists.html">Mailing
lists</a></li>
- <li><a href="/community/committer.html">Becoming a
committer</a></li>
- <li><a href="/community/events.html">NetBeans Events</a></li>
+ <li><a
href="{{{siteRootPath}}}/front/main/community/mailing-lists.html">Mailing
lists</a></li>
+ <li><a
href="{{{siteRootPath}}}/front/main/community/committer.html">Becoming a
committer</a></li>
+ <li><a
href="{{{siteRootPath}}}/front/main/community/events.html">NetBeans
Events</a></li>
<li><a
href="https://www.apache.org/events/current-event.html">Apache Events</a></li>
</ul>
</div>
diff --git a/src/partials/menu.hbs b/src/partials/menu.hbs
index 0e52518..000318c 100644
--- a/src/partials/menu.hbs
+++ b/src/partials/menu.hbs
@@ -25,16 +25,16 @@
</div>
<div class="top-bar" id="responsive-menu">
<div class='top-bar-left'>
- <a class='title' href="/"><img
src='{{{uiRootPath}}}/images/apache-netbeans.svg' style='padding: 8px; height:
48px;'></img> Apache NetBeans</a>
+ <a class='title' href="{{siteRootPath}}/index.html"><img
src='{{{uiRootPath}}}/images/apache-netbeans.svg' style='padding: 8px; height:
48px;'></img> Apache NetBeans</a>
</div>
<div class="top-bar-right">
<ul class="vertical medium-horizontal menu"
data-responsive-menu="drilldown medium-dropdown">
- <li> <a href="/community/index.html">Community</a> </li>
- <li> <a href="/participate/index.html">Participate</a> </li>
- <li> <a href="/blogs/index.html">Blog</a></li>
- <li> <a href="/help/index.html">Get Help</a> </li>
+ <li> <a
href="{{siteRootPath}}/front/main/community/index.html">Community</a> </li>
+ <li> <a
href="{{siteRootPath}}/front/main/participate/index.html">Participate</a> </li>
+ <li> <a
href="{{siteRootPath}}/front/main/blogs/index.html">Blog</a></li>
+ <li> <a href="{{siteRootPath}}/front/main/help/index.html">Get
Help</a> </li>
<li> <a href="https://plugins.netbeans.apache.org/">Plugins</a>
</li>
- <li> <a href="/download/index.html">Download</a> </li>
+ <li> <a
href="{{siteRootPath}}/front/main/download/index.html">Download</a> </li>
</ul>
</div>
</div>
diff --git a/src/partials/news.hbs b/src/partials/news.hbs
index b4022ac..19dc523 100644
--- a/src/partials/news.hbs
+++ b/src/partials/news.hbs
@@ -24,7 +24,7 @@
<div class='cell'>
<div class="annotation">Latest release</div>
<h1>Apache NetBeans 19</h1>
- <p><a class="button success"
href="/download/nb19/">Download</a></p>
+ <p><a class="button success"
href="{{{siteRootPath}}}/front/main/download/nb19/index.html">Download</a></p>
</div>
</div>
</section>
diff --git a/src/partials/wiki-devbread.hbs b/src/partials/wiki-devbread.hbs
index c89bef8..0eb0972 100644
--- a/src/partials/wiki-devbread.hbs
+++ b/src/partials/wiki-devbread.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-*/%>
+}}
<div class='aside' style='text-align: left; padding: 20px;'>
- <a href="/wiki/index.hml" title="Apache NetBeans WIKI">Apache NetBeans
Wiki Index</a>/<a href="/wiki/DevFaqIndex.html" title="Apache NetBeans
Developer FAQ WIKI">Apache NetBeans Developer FAQ</a>
+ <a href="{{{siteRootPath}}}/wiki/main/wiki/index.html" title="Apache
NetBeans WIKI">Apache NetBeans Wiki Index</a>/<a
href="{{{siteRootPath}}}/wiki/main/wiki/DevFaqIndex.html" title="Apache
NetBeans Developer FAQ WIKI">Apache NetBeans Developer FAQ</a>
</div>
diff --git a/src/partials/wiki-devindexbread.hbs
b/src/partials/wiki-devindexbread.hbs
index 20e9e00..b05aa2a 100644
--- a/src/partials/wiki-devindexbread.hbs
+++ b/src/partials/wiki-devindexbread.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-*/%>
+}}
<div class='aside' style='text-align: left; padding: 20px;'>
- <a href="/wiki/index.html" title="Apache NetBeans WIKI">Apache NetBeans
Wiki Index</a>/Apache NetBeans Developer FAQ
+ <a href="{{{siteRootPath}}}/wiki/main/wiki/index.html" title="Apache
NetBeans WIKI">Apache NetBeans Wiki Index</a>/Apache NetBeans Developer FAQ
</div>
diff --git a/src/partials/wiki-index.hbs b/src/partials/wiki-index.hbs
index bd43775..86da11d 100644
--- a/src/partials/wiki-index.hbs
+++ b/src/partials/wiki-index.hbs
@@ -1,4 +1,4 @@
-<%/*
+{{!
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,8 +17,8 @@
specific language governing permissions and limitations
under the License.
-*/%>
+}}
<div class='aside' style='text-align: center; padding: 20px;'>
- <a href="/wiki/index.html" title="Apache NetBeans WIKI">Apache NetBeans
Wiki Index</a>
+ <a href="{{{siteRootPath}}}/wiki/main/wiki/index.html" title="Apache
NetBeans WIKI">Apache NetBeans Wiki Index</a>
<p><b>Note:</b> These pages are being reviewed.</p>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists