Skip to content

Commit 819c8f6

Browse files
authored
Merging in modern HTML stylesheet (#21)
* Merging in modern HTML stylesheet * fix sonar issue * update html stylesheet use for xslTNG * generate misspelling and context * check spelling in script
1 parent 3f5a963 commit 819c8f6

27 files changed

Lines changed: 660 additions & 216 deletions

.github/workflows/docs.yaml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##
2-
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
## Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
## Laboratory LLC.
44
##
55
## This file is part of the Asynchronous Network Management System (ANMS).
@@ -37,23 +37,38 @@ jobs:
3737
contents: read
3838
steps:
3939
- name: Checkout repository
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v6
4141
with:
4242
fetch-depth: 0
4343
submodules: recursive
4444
- name: Set up OS
4545
run: |
46-
sudo rm /var/lib/man-db/auto-update
47-
sudo apt-get update && sudo apt-get install -y cmake make coreutils ruby asciidoctor graphviz inkscape dblatex docbook-xsl-ns xsltproc xmlstarlet
48-
sudo gem install asciidoctor-diagram
46+
sudo apt-get update
47+
sudo apt-get install -y \
48+
cmake make coreutils \
49+
ruby asciidoctor graphviz plantuml inkscape \
50+
dblatex xmlstarlet aspell
51+
sudo gem install \
52+
asciidoctor-diagram \
53+
'asciidoctor-diagram-plantuml:~>1.2024.8'
4954
- name: Build
5055
env:
5156
DESTDIR: public
5257
run: ./build.sh
53-
- uses: actions/upload-artifact@v4
58+
- name: Misspelling
59+
run: ./build.sh docs-spelling
60+
- uses: actions/upload-artifact@v7
5461
with:
5562
name: docs
5663
path: public
64+
- uses: actions/upload-artifact@v7
65+
with:
66+
archive: false
67+
path: public/product-guide/anms-product-guide.pdf
68+
- uses: actions/upload-artifact@v7
69+
with:
70+
archive: false
71+
path: public/user-guide/anms-user-guide.pdf
5772

5873
deploy:
5974
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -73,16 +88,16 @@ jobs:
7388
if: github.ref == 'refs/heads/main'
7489
runs-on: ubuntu-24.04
7590
steps:
76-
- uses: actions/download-artifact@v4
91+
- uses: actions/download-artifact@v8
7792
with:
7893
name: docs
7994
path: public
8095
- name: Setup Pages
81-
uses: actions/configure-pages@v3
96+
uses: actions/configure-pages@v6
8297
- name: Upload artifact
83-
uses: actions/upload-pages-artifact@v3
98+
uses: actions/upload-pages-artifact@v5
8499
with:
85100
path: public
86101
- name: Deploy to GitHub Pages
87102
id: deployment
88-
uses: actions/deploy-pages@v4
103+
uses: actions/deploy-pages@v5

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
##
2-
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
## Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
## Laboratory LLC.
44
##
55
## This file is part of the Asynchronous Network Management System (ANMS).

CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#[[
2-
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
Laboratory LLC.
44
55
This file is part of the Asynchronous Network Management System (ANMS).
@@ -24,10 +24,24 @@ cmake_minimum_required(VERSION 3.16)
2424
project(anms-docs LANGUAGES )
2525
set(CMAKE_INSTALL_PREFIX "")
2626

27+
include(FetchContent)
28+
FetchContent_Declare(
29+
xsltng
30+
URL https://codeberg.org/DocBook/xslTNG/releases/download/2.8.0/docbook-xslTNG-2.8.0.zip
31+
URL_HASH SHA256=adbbddbf33a4fcc5c949a2851cac53e8111d30a5fd0b32429eeec68aedb61efd
32+
DOWNLOAD_EXTRACT_TIMESTAMP OFF
33+
)
34+
FetchContent_MakeAvailable(xsltng)
35+
file(GLOB xsltng_JAR "${xsltng_SOURCE_DIR}/libs/*.jar")
36+
if(NOT xsltng_JAR)
37+
message(FATAL_ERROR "No xslTNG jar file found under ${xsltng_SOURCE_DIR}")
38+
endif(NOT xsltng_JAR)
39+
2740
add_subdirectory(user-guide)
2841
add_subdirectory(product-guide)
2942

3043
install(
31-
FILES index.html
44+
FILES deploy-index.html
45+
RENAME index.html
3246
DESTINATION .
3347
)

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
Laboratory LLC.
44
55
This file is part of the Asynchronous Network Management System (ANMS).

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
Laboratory LLC.
44
55
This file is part of the Asynchronous Network Management System (ANMS).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
2+
Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
33
Laboratory LLC.
44
55
This file is part of the Asynchronous Network Management System (ANMS).

apply_license.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
##
3-
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
3+
## Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
44
## Laboratory LLC.
55
##
66
## This file is part of the Asynchronous Network Management System (ANMS).
@@ -33,7 +33,7 @@ set -e
3333
SELFDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
3434

3535
LICENSEOPTS="${LICENSEOPTS} --tmpl ${SELFDIR}/apply_license.tmpl"
36-
LICENSEOPTS="${LICENSEOPTS} --years 2023-$(date +%Y)"
36+
LICENSEOPTS="${LICENSEOPTS} --years 2023-2026"
3737
# Excludes only apply to directory (--dir) mode and not file mode
3838
#LICENSEOPTS="${LICENSEOPTS} --exclude *.yml "
3939

build.sh

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
##
3-
## Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
3+
## Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
44
## Laboratory LLC.
55
##
66
## This file is part of the Asynchronous Network Management System (ANMS).
@@ -25,11 +25,39 @@
2525
set -e
2626

2727
SELFDIR=$(realpath $(dirname "${BASH_SOURCE[0]}"))
28-
2928
cd ${SELFDIR}
30-
cmake -S . -B build
31-
cmake --build build $@
32-
if [[ -n "${DESTDIR}" ]]
29+
30+
if [[ "$1" == "docs-spelling" ]]
3331
then
34-
cmake --install build
32+
USER_MISSPELLING_TXT="build/user-guide/misspelling.txt"
33+
USER_MISSPELLING_CTX_TXT="build/user-guide/misspelling-ctx.txt"
34+
PROD_MISSPELLING_TXT="build/product-guide/misspelling.txt"
35+
PROD_MISSPELLING_CTX_TXT="build/product-guide/misspelling-ctx.txt"
36+
# success means file is present and empty
37+
FAILURES=0
38+
if [[ -s "${USER_MISSPELLING_TXT}" ]]
39+
then
40+
printf "\nUser guide:\n"
41+
cat "${USER_MISSPELLING_TXT}"
42+
printf "\nIn context:\n"
43+
cat "${USER_MISSPELLING_CTX_TXT}"
44+
((FAILURES += 1))
45+
fi
46+
if [[ -s "${PROD_MISSPELLING_TXT}" ]]
47+
then
48+
printf "\nProduct guide:\n"
49+
cat "${PROD_MISSPELLING_TXT}"
50+
printf "\nIn context:\n"
51+
cat "${PROD_MISSPELLING_CTX_TXT}"
52+
((FAILURES += 1))
53+
fi
54+
exit ${FAILURES}
55+
else
56+
# actual build
57+
cmake -S . -B build
58+
cmake --build build "$@"
59+
if [[ -n "${DESTDIR}" ]]
60+
then
61+
cmake --install build
62+
fi
3563
fi

index.html renamed to deploy-index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<!--
3-
-- Copyright (c) 2023-2025 The Johns Hopkins University Applied Physics
3+
-- Copyright (c) 2023-2026 The Johns Hopkins University Applied Physics
44
-- Laboratory LLC.
55
--
66
-- This file is part of the Asynchronous Network Management System (ANMS).
@@ -20,7 +20,7 @@
2020
-- the prime contract 80NM0018D0004 between the Caltech and NASA under
2121
-- subcontract 1658085.
2222
-->
23-
<html xmlns="http://www.w3.org/1999/xhtml">
23+
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us">
2424
<head>
2525
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
2626
<title>Index</title>

0 commit comments

Comments
 (0)