-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align build with OSCAL Reference (#63)
* Replace submodule with Hugo module * Added makefile for hugo and lychee operations
- Loading branch information
1 parent
29f412b
commit 5b2d3b8
Showing
11 changed files
with
92 additions
and
33 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,5 @@ | |
node_modules/ | ||
src/public | ||
src/resources/_gen | ||
|
||
lychee_report.md | ||
.hugo_build.lock |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
SHELL:=/usr/bin/env bash | ||
|
||
.PHONY: help | ||
# Run "make" or "make help" to get a list of user targets | ||
# Adapted from https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | ||
help: ## Show this help message | ||
@grep -E '^[a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | awk 'BEGIN { \ | ||
FS = ":.*?## "; \ | ||
printf "\033[1m%-30s %s\033[0m\n", "TARGET", "DESCRIPTION" \ | ||
} \ | ||
{ printf "\033[32m%-30s\033[0m %s\n", $$1, $$2 }' | ||
|
||
.PHONY: clean | ||
clean: clean-site clean-linkcheck ## Clean all | ||
|
||
# | ||
# Website generation / hugo | ||
# | ||
|
||
SITE_OUTPUT_DIR:=src/public | ||
|
||
.PHONY: serve | ||
serve: modeldoc release-assets ## Spin up a static web server for local dev | ||
cd src; hugo serve | ||
|
||
.PHONY: site | ||
site: $(SITE_OUTPUT_DIR) ## Build the site | ||
|
||
$(SITE_OUTPUT_DIR): | ||
cd src; hugo --minify | ||
|
||
.PHONY: clean-site | ||
clean-site: ## Clean the site | ||
rm -fr $(SITE_OUTPUT_DIR) | ||
|
||
# | ||
# Checks | ||
# | ||
|
||
LYCHEE_OUTPUT_FILE:=lychee_report.md | ||
LYCHEE_CONFIG_FILE:=./src/lychee.toml | ||
# Flags that currently cannot be configured via the configuration file | ||
LYCHEE_FLAGS:=--verbose --format markdown | ||
# Extra flags for the user to override (used to set github token in GHA workflow) | ||
LYCHEE_EXTRA_FLAGS:= | ||
|
||
.PHONY: linkcheck | ||
linkcheck: $(LYCHEE_OUTPUT_FILE) ## Generate a report of all site links | ||
|
||
$(LYCHEE_OUTPUT_FILE): $(SITE_OUTPUT_DIR) | ||
lychee \ | ||
--config '$(LYCHEE_CONFIG_FILE)' \ | ||
--output $(LYCHEE_OUTPUT_FILE) \ | ||
$(LYCHEE_FLAGS) $(LYCHEE_EXTRA_FLAGS) \ | ||
'$(SITE_OUTPUT_DIR)/**/*.html' | ||
|
||
clean-linkcheck: ## Clean the linkcheck report | ||
rm -f $(LYCHEE_OUTPUT_FILE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module github.com/usnistgov/OSCAL-Pages/src | ||
|
||
go 1.20 | ||
|
||
require github.com/usnistgov/hugo-uswds v1.0.0 // indirect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/usnistgov/hugo-uswds v1.0.0 h1:6Nwrs4XWOkxOheWWM8VTEl6aMM7cLQUNv0chuUokB8o= | ||
github.com/usnistgov/hugo-uswds v1.0.0/go.mod h1:MkgH5fvt5GIZo70VkBav+wP6br+MzrD/+OMZ9EqDkHM= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
no_progress = true | ||
exclude_mail = true | ||
accept = [200, 206, 429] | ||
exclude = [ | ||
'https://defense.gov/', | ||
'https://federal-agency.gov/.*', | ||
'http://federal-agency.gov/ns/oscal', | ||
'http://fedramp.gov/ns/oscal', | ||
'https://fedramp.gov/ns/oscal', | ||
'http://www.first.org/cvss/v2.0', | ||
'http://www.first.org/cvss/v3.0', | ||
'http://www.first.org/cvss/v3.1', | ||
'https://tools.ietf.org/html.*', | ||
'http://csrc.nist.gov/ns/.*', | ||
'http://csrc.nist.gov/oscal', | ||
'https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/xxxx', | ||
'https://cdn.telos.com/wp-content/uploads/2021/06/22150746/Xacta-360-EULA-US.pdf', | ||
'https://search.usa.gov/search', | ||
'https://example.com/.*', | ||
'https://doi.org/.*', | ||
'http://doi.org/.*', | ||
] |
Submodule uswds
deleted from
96c1d7