Skip to content

Commit

Permalink
Generate ACVP site without raw HTML/CSS, update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ronaldtse committed Sep 23, 2022
1 parent 05135b4 commit 11fb6dd
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 714 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,19 @@ jobs:
password: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || github.token }}
submodules: true

- uses: actions/cache@v2
with:
path: /config/fonts
key: metanorma-nist-fonts
restore-keys: metanorma-nist-fonts

- name: Cache built documents
uses: actions/cache@v2
with:
path: site/
key: ${{ hashFiles('metanorma.yml') }}-${{ hashFiles('src/*.adoc') }}

- uses: metanorma/metanorma-build-scripts/gh-rubygems-setup-action@main
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
Expand All @@ -35,6 +38,16 @@ jobs:
with:
agree-to-terms: true

- name: Build NIST site on GitHub Pages
run: |
rm -f site/index.html
find site/documents/src \( -name '*.html' -or -name '*.pdf' -or \
-name '*.rxl' -or -name '*.xml' \) -exec mv \{} site/ \;
rm -rf site/documents
cp _config.yml site/
cp -a _includes site/
cp README.md site/index.md
- uses: actions/upload-artifact@v2
with:
name: site
Expand All @@ -53,7 +66,7 @@ jobs:

- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GH_DEPLOY_KEY }}
github_token: ${{ github.token }}
publish_dir: ./site
publish_branch: nist-pages
force_orphan: true
Expand Down
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
*.DS_Store
*.html
!index.html
*.txt
*.xml
*.nits
.DS_Store
.sass-cache
*.err
*.log
Gemfile.lock
Expand Down
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "metanorma-cli"
gem "metanorma-nist", source: "https://rubygems.pkg.github.com/metanorma"
4 changes: 4 additions & 0 deletions Gemfile.jekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://rubygems.org"

gem "github-pages"
gem "webrick"
508 changes: 276 additions & 232 deletions README.md

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
theme: jekyll-theme-slate
title: ACVP
description: Industry Working Group on Automated Cryptographic Algorithm Validation

# TODO: Uncomment this block after merging into usnistgov/ACVP
# url: https://pages.nist.gov
# baseurl: "/ACVP" # the subpath of your site, e.g. "/blog"
# repository: "usnistgov/ACVP"

# This disables the "View on GitHub" button on the Slate theme
github:
is_project_page: false

# Reading Files
# include:
exclude:
- slides
- iev
- relaton
- Images
- src
- metanorma.yml

plugins:
- jekyll-coffeescript
- jekyll-default-layout
- jekyll-gist
- jekyll-github-metadata
- jekyll-optional-front-matter
- jekyll-paginate
- jekyll-readme-index
- jekyll-titles-from-headings
- jekyll-relative-links
32 changes: 32 additions & 0 deletions _includes/head-custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!-- start custom head snippets, customize with your own _includes/head-custom.html file -->
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script>
<link rel="stylesheet" href="https://pages.nist.gov/nist-header-footer/css/nist-combined.css">
<script src="https://pages.nist.gov/nist-header-footer/js/nist-header-footer.js" type="text/javascript" defer="defer"></script>
<script src="https://pages.nist.gov/leaveNotice/js/jquery.leaveNotice-nist.min.js" type="text/javascript"></script>

<script async type="text/javascript" id="_fed_an_ua_tag" src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=NIST&subagency=github&pua=UA-66610693-1&yt=true&exts=ppsx,pps,f90,sch,rtf,wrl,txz,m1v,xlsm,msi,xsd,f,tif,eps,mpg,xml,pl,xlt,c"></script>

<script type="text/javascript">
$(document).ready(function(){
// Mark external (non-nist.gov) 'a' tags with class "external"
// If the address start with https and ends with nist.gov
var re_nist = new RegExp('^https?:\/\/((^\/)*\.)*nist\\.gov(\/|$)');
// Regex to find address that start with https
var re_absolute_address = new RegExp('^((https?:)?\/\/)');
$("a").each(function(){
var url=$(this).attr('href');
if(re_nist.test(url) || !re_absolute_address.test(url)){
$(this).addClass('local');
}else{
$(this).addClass('external');
}
});

// Add leaveNotice to external 'a' elements
$('a.external').leaveNotice({
siteName: 'ACVP Specification',
});
});
</script>
<link rel="stylesheet" type="text/css" href="https://pages.nist.gov/leaveNotice/css/jquery.leaveNotice.css" />
<!-- end custom head snippets -->
471 changes: 0 additions & 471 deletions index.html

This file was deleted.

1 change: 0 additions & 1 deletion slate.css

This file was deleted.

0 comments on commit 11fb6dd

Please sign in to comment.