Skip to content

Update Docusaurus and Web Docs Styling + Workflow Fix #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/release-build-outputs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# HMS Networks; Americas
# Build Outputs Action for Maven-based Ewon ETK Project Releases
# Version: 3.0.0
# Date: February 8, 2024
# Version: 3.0.1
# Date: March 18, 2024
#
# This action is configured to automatically run when a release
# tag is created in the following syntax: `v*`.
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
target_commitish: ${{ github.sha }}
name: Release ${{ env.VERSION_NUMBER }}
draft: false
prerelease: ${{ steps.check_pre_release.outputs.IS_PRE_RELEASE }}
prerelease: ${{ env.IS_PRE_RELEASE }}
generate_release_notes: false
body_path: ${{ env.RELEASE_BODY_FILE }}
files: |
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!-- PROJECT NAME -->
<name>Java Maven Starter Project</name>
<!-- PROJECT VERSION -->
<version>0.0.7</version>
<version>0.0.8</version>
<!-- PROJECT GROUP ID (PARENT PACKAGE) -->
<groupId>com.hms_networks.americas.sc</groupId>
<!-- PROJECT ARTIFACT ID (ROOT PACKAGE NAME) -->
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/example/package.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Example package for Solution Center Java Starter Project. This package includes a basic example
class with sample code to begin with.

@version 0.0.7
@version 0.0.8
@author HMS Networks, MU Americas Solution Center
</BODY>
</HTML>
2 changes: 1 addition & 1 deletion starting-files/jvmrun
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-heapsize 25M -classpath /usr/sc-java-maven-starter-project-0.0.7-full.jar -emain com.example.ExampleMain
-heapsize 25M -classpath /usr/sc-java-maven-starter-project-0.0.8-full.jar -emain com.example.ExampleMain
1 change: 1 addition & 0 deletions web-docs/ScDocusaurusConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const ScDocusaurusConfig = {
configFileName : 'ExampleConfigurationFile.json',
applicationJarFileName : 'sc-java-maven-starter-project-X.Y.Z-full.jar',
commonDocRepoTargetBranchOrTag: 'v1.0.0',
keywords: 'ewon, jtk, java, maven, project, template, build, ant, modern, structure, starting, guide, features, license, requirements, troubleshooting, support',
};

// EXPORT ZONE - DON'T TOUCH BELOW THIS LINE
Expand Down
12 changes: 12 additions & 0 deletions web-docs/docs/02-CHANGELOG.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ sidebar_label: Change Log
toc_max_heading_level: 2
---

## Version 0.0.8
### Features
- Updated web documentation to use Docusaurus v3 (3.1.1)
- Updated web documentation font to match HMS communication guidelines recommendations
- Updated web documentation colorization to match HMS communication guidelines recommendations
- Added support for PWA (Progressive Web App) functionality to web documentation
- Added missing metadata required by Open Graph protocol to web documentation
- Added support for SEO keywords to web documentation
### Bug Fixes
- Fixed a bug causing tagged pre-releases to not properly be marked as pre-releases in their GitHub
release metadata

## Version 0.0.7
### Features
- Updated and formatted GitHub Workflows
Expand Down
2 changes: 1 addition & 1 deletion web-docs/docs/08-developer/03-MAVEN_LIFECYCLES.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ mvn test -f pom.xml`
### Package Lifecycle

During the 'package' lifecycle, the application source code and resources will be compiled and
packaged in to a JAR file with the name '{artifactId}-{version}-full.jar'. This lifecycle is
packaged in to a JAR file with the name `{artifactId}-{version}-full.jar`. This lifecycle is
automatically invoked by the [install](#install-lifecycle)
and [deploy](#deploy-lifecycle) lifecycles.

Expand Down
49 changes: 42 additions & 7 deletions web-docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
import { themes as prismThemes } from 'prism-react-renderer';
const ScDocusaurusConfig = require('./ScDocusaurusConfig');

/** @type {import('@docusaurus/types').Config} */
Expand Down Expand Up @@ -41,6 +40,7 @@ const config = {
name: "imported-docs",
sourceBaseUrl: ScDocusaurusConfig.commonDocsRepoUrl + 'docs/',
outDir: "docs/imported",
noRuntimeDownloads: true,
documents: [
"setup/_configuration.mdx",
"setup/_installation_or_upgrade.mdx",
Expand All @@ -57,6 +57,7 @@ const config = {
name: "imported-images",
sourceBaseUrl: ScDocusaurusConfig.commonDocsRepoUrl + 'img',
outDir: "static/img/imported",
noRuntimeDownloads: true,
documents: [
"ewon/pages/ewon-tag-config-page-hist-logging.webp",
"ewon/pages/ewon-web-page-home.webp",
Expand All @@ -76,12 +77,41 @@ const config = {
name: "imported-js",
sourceBaseUrl: ScDocusaurusConfig.commonDocsRepoUrl + 'js',
outDir: "src/components/imported",
noRuntimeDownloads: true,
documents: [
"highlight.js",
"popover.js"
],
}
]
],
[
'@docusaurus/plugin-pwa',
{
debug: true,
offlineModeActivationStrategies: [
'appInstalled',
'standalone',
'queryString',
],
pwaHead: [
{
tagName: 'link',
rel: 'icon',
href: '/img/pwa/HMS-Logo-192x192.png',
},
{
tagName: 'link',
rel: 'manifest',
href: '/manifest.json',
},
{
tagName: 'meta',
name: 'theme-color',
content: 'rgb(4, 61, 93)',
},
],
},
],
],

presets: [
Expand All @@ -108,7 +138,7 @@ const config = {
title: ScDocusaurusConfig.title,
logo: {
alt: 'HMS Networks Logo',
src: 'img/hms-logo-rgb.webp',
src: '/img/imported/hms/hms-logo-rgb.webp',
},
items: [
{
Expand Down Expand Up @@ -163,10 +193,15 @@ const config = {
copyright: `Copyright © ${new Date().getFullYear()} HMS Networks Inc. Built with Docusaurus.`,
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
image: '/img/imported/hms/hms-logo-rgb.webp',
metadata: [
{name: 'og:type', content: 'website'},
{name: 'keywords', content: ScDocusaurusConfig.keywords},
]
}),
};

module.exports = config;
module.exports = config;
40 changes: 22 additions & 18 deletions web-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,35 @@
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"start": "yarn fetch-remote-content && docusaurus start",
"build": "yarn fetch-remote-content && docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"clear": "yarn clear-remote-content && docusaurus clear",
"serve": "docusaurus serve",
"fetch-remote-content": "docusaurus download-remote-imported-docs && docusaurus download-remote-imported-images && docusaurus download-remote-imported-js",
"clear-remote-content": "docusaurus clear-remote-imported-docs && docusaurus clear-remote-imported-images && docusaurus clear-remote-imported-js",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "^2.4.1",
"@docusaurus/preset-classic": "^2.4.1",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.2.1",
"docusaurus-plugin-remote-content": "^3.1.0",
"prism-react-renderer": "^1.3.5",
"@docusaurus/core": "^3.1.1",
"@docusaurus/plugin-pwa": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.1.0",
"docusaurus-plugin-remote-content": "^4.0.0",
"prism-react-renderer": "^2.1.0",
"raw-loader": "^4.0.2",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^2.4.1",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.7.4"
"@docusaurus/module-type-aliases": "^3.1.1",
"@docusaurus/tsconfig": "^3.1.1",
"@docusaurus/types": "^3.1.1",
"typescript": "^5.3.3"
},
"resolutions": {
"trim": "^0.0.3",
Expand All @@ -41,12 +45,12 @@
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=16.14"
"node": ">=18.0"
}
}
23 changes: 13 additions & 10 deletions web-docs/src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,31 @@
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #1268b3;
--ifm-color-primary: #043d5d;
--ifm-color-primary-dark: #1268b3;
--ifm-color-primary-darker: #595959;
--ifm-color-primary-darker: #485f70;
--ifm-color-primary-darkest: #043d5d;
--ifm-color-primary-light: #1268b3;
--ifm-color-primary-light: #166ab4;
--ifm-color-primary-lighter: #166ab4;
--ifm-color-primary-lighter: #1268b3;
--ifm-color-primary-lightest: #1268b3;
--ifm-font-color-base: #333333;
--ifm-font-color-base-inverse: #EFF0F1;
--ifm-font-color-secondary: #333333;
--ifm-code-font-size: 95%;
--ifm-font-family-base: 'Calibri', sans-serif;
--ifm-heading-font-family: 'Lato', sans-serif;
--ifm-heading-font-weight: 300;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme="dark"] {
--ifm-color-primary: #1268b3;
--ifm-color-primary-dark: #595959;
--ifm-color-primary-darker: #043d5d;
--ifm-color-primary-darkest: #043d5d;
--ifm-color-primary-light: #166ab4;
--ifm-color-primary-lighter: #166ab4;
--ifm-color-primary-lightest: #166ab4;
--ifm-font-color-base: #EFF0F1;
--ifm-font-color-base-inverse: #333333;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
Binary file modified web-docs/static/img/favicon.ico
Binary file not shown.
Binary file added web-docs/static/img/pwa/HMS-Logo-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added web-docs/static/img/pwa/HMS-Logo-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions web-docs/static/img/pwa/HMS-Logo-515x512.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions web-docs/static/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"short_name": "HMS EJMSP",
"name": "HMS Ewon Java Maven Starter Project",
"description": "Home of the Ewon Java Maven Starter Project",
"icons": [
{
"src": "/sc-java-maven-starter-project/img/pwa/HMS-Logo-515x512.svg",
"type": "image/svg+xml",
"sizes": "512x512"
},
{
"src": "/sc-java-maven-starter-project/img/pwa/HMS-Logo-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/sc-java-maven-starter-project/img/pwa/HMS-Logo-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"id": "/sc-java-maven-starter-project/?source=pwa",
"start_url": "/sc-java-maven-starter-project/?source=pwa",
"background_color": "#043d5d",
"display": "standalone",
"scope": "/sc-java-maven-starter-project/",
"theme_color": "#043d5d",
"shortcuts": [
{
"name": "Homepage",
"short_name": "Home",
"description": "View the homepage",
"url": "/sc-java-maven-starter-project/?source=pwa&link=homepage",
"icons": [
{
"src": "/sc-java-maven-starter-project/img/pwa/home-icon-colorized-public-domain-192x.png",
"sizes": "192x192"
}
]
},
{
"name": "Documentation",
"short_name": "Docs",
"description": "View the documentation",
"url": "/sc-java-maven-starter-project/docs?source=pwa",
"icons": [
{
"src": "/sc-java-maven-starter-project/img/pwa/documentation-icon-colorized-public-domain-192x.png",
"sizes": "192x192"
}
]
},
{
"name": "Quick Start Guide",
"short_name": "Quick Start",
"description": "View the quick start guide",
"url": "/sc-java-maven-starter-project/docs/quick-start-guide?source=pwa",
"icons": [
{
"src": "/sc-java-maven-starter-project/img/pwa/quick-start-icon-colorized-public-domain-192x.png",
"sizes": "192x192"
}
]
}
]
}
2 changes: 2 additions & 0 deletions web-docs/static/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User-agent: *
Disallow: /docs/imported/
2 changes: 1 addition & 1 deletion web-docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
// This file is not used in compilation. It is here just for a nice editor experience.
"extends": "@tsconfig/docusaurus/tsconfig.json",
"extends": "@docusaurus/tsconfig",
"compilerOptions": {
"baseUrl": "."
}
Expand Down
Loading