Skip to content

Commit 185aa62

Browse files
Rossbugginsnhs/2025 10 14/docs rendering 001 (#50)
* prettier. * prettier. * update build for webpack. * docs update. * docs update with icons. * make some async.
1 parent bd72ad5 commit 185aa62

30 files changed

+18249
-65
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
**/.hg
55
**/node_modules
66
**/package-lock.json
7+
docs/assets/js/zzzz-search-data.json

docs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ node_modules
99
_config.version.yml
1010
schemas
1111
_data/schema
12+
assets-webpack/*
13+
Gemfile-dev.lock
14+
Gemfile.lock

docs/Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ gem "jekyll", "~> 4.4.1"
1717
group :jekyll_plugins do
1818
gem "jekyll-feed", "~> 0.12"
1919
gem "jekyll-drawio"
20+
gem "jekyll-pdf-embed"
21+
gem 'jekyll-random'
2022
end
2123

2224
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
@@ -37,3 +39,6 @@ gem "just-the-docs", "~> 0.10.1"
3739
gem 'jemoji'
3840

3941
gem 'sass-embedded', '1.78'
42+
gem 'jekyll-webpack'
43+
44+
gem 'rubocop', require: false

docs/Gemfile-dev

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
source "https://rubygems.org"
2+
# Hello! This is where you manage which Jekyll version is used to run.
3+
# When you want to use a different version, change it below, save the
4+
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
5+
#
6+
# bundle exec jekyll serve
7+
#
8+
# This will help ensure the proper Jekyll version is running.
9+
# Happy Jekylling!
10+
gem "jekyll", "~> 4.4.1"
11+
# This is the default theme for new Jekyll sites. You may change this to anything you like.
12+
#gem "minima", "~> 2.5"
13+
gem "rake"
14+
gem "just-the-docs", "~> 0.10.1"
15+
gem 'sass-embedded', '1.78'
16+
gem 'jekyll-webpack'
17+
18+
19+
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
20+
# uncomment the line below. To upgrade, run `bundle update github-pages`.
21+
# gem "github-pages", group: :jekyll_plugins
22+
# If you have any plugins, put them here!
23+
group :jekyll_plugins do
24+
gem "jekyll-pdf-embed"
25+
gem 'jekyll-random'
26+
gem "jekyll-feed", "~> 0.12"
27+
gem "jekyll-drawio"
28+
end
29+
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
30+
# and associated library.
31+
platforms :mingw, :x64_mingw, :mswin, :jruby do
32+
gem "tzinfo", "~> 1.2"
33+
gem "tzinfo-data"
34+
end
35+
36+
# Performance-booster for watching directories on Windows
37+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
38+
gem 'jemoji'
39+
# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
40+
# do not have a Java counterpart.
41+
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]
42+
43+
gem 'rubocop', require: false

docs/Gemfile.lock

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ GEM
1313
tzinfo (~> 2.0)
1414
addressable (2.8.7)
1515
public_suffix (>= 2.0.2, < 7.0)
16+
ast (2.4.3)
1617
base64 (0.2.0)
1718
bigdecimal (3.1.8)
1819
cgi (0.4.2)
@@ -66,12 +67,19 @@ GEM
6667
jekyll (>= 3.7, < 5.0)
6768
jekyll-include-cache (0.2.1)
6869
jekyll (>= 3.7, < 5.0)
70+
jekyll-pdf-embed (1.1.3)
71+
jekyll
72+
jekyll-random (0.1)
73+
jekyll (>= 3.3, < 5.0)
6974
jekyll-sass-converter (3.1.0)
7075
sass-embedded (~> 1.75)
7176
jekyll-seo-tag (2.8.0)
7277
jekyll (>= 3.8, < 5.0)
7378
jekyll-watch (2.2.1)
7479
listen (~> 3.0)
80+
jekyll-webpack (0.2.7)
81+
jekyll
82+
listen
7583
jemoji (0.13.0)
7684
gemoji (>= 3, < 5)
7785
html-pipeline (~> 2.2)
@@ -86,6 +94,8 @@ GEM
8694
rexml (>= 3.3.9)
8795
kramdown-parser-gfm (1.1.0)
8896
kramdown (~> 2.0)
97+
language_server-protocol (3.17.0.5)
98+
lint_roller (1.1.0)
8999
liquid (4.0.4)
90100
listen (3.9.0)
91101
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -95,16 +105,38 @@ GEM
95105
mutex_m (0.2.0)
96106
nokogiri (1.18.9-x86_64-linux-gnu)
97107
racc (~> 1.4)
108+
parallel (1.27.0)
109+
parser (3.3.9.0)
110+
ast (~> 2.4.1)
111+
racc
98112
pathutil (0.16.2)
99113
forwardable-extended (~> 2.6)
114+
prism (1.5.2)
100115
public_suffix (6.0.2)
101116
racc (1.8.1)
117+
rainbow (3.1.1)
102118
rake (13.2.1)
103119
rb-fsevent (0.11.2)
104120
rb-inotify (0.11.1)
105121
ffi (~> 1.0)
122+
regexp_parser (2.11.3)
106123
rexml (3.4.4)
107124
rouge (4.6.1)
125+
rubocop (1.81.1)
126+
json (~> 2.3)
127+
language_server-protocol (~> 3.17.0.2)
128+
lint_roller (~> 1.1.0)
129+
parallel (~> 1.10)
130+
parser (>= 3.3.0.2)
131+
rainbow (>= 2.2.2, < 4.0)
132+
regexp_parser (>= 2.9.3, < 3.0)
133+
rubocop-ast (>= 1.47.1, < 2.0)
134+
ruby-progressbar (~> 1.7)
135+
unicode-display_width (>= 2.4.0, < 4.0)
136+
rubocop-ast (1.47.1)
137+
parser (>= 3.3.7.2)
138+
prism (~> 1.4)
139+
ruby-progressbar (1.13.0)
108140
safe_yaml (1.0.5)
109141
sass-embedded (1.78.0-x86_64-linux-gnu)
110142
google-protobuf (~> 4.27)
@@ -123,8 +155,12 @@ DEPENDENCIES
123155
jekyll (~> 4.4.1)
124156
jekyll-drawio
125157
jekyll-feed (~> 0.12)
158+
jekyll-pdf-embed
159+
jekyll-random
160+
jekyll-webpack
126161
jemoji
127162
just-the-docs (~> 0.10.1)
163+
rubocop
128164
sass-embedded (= 1.78)
129165
tzinfo (>= 1, < 3)
130166
tzinfo-data

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ install:
2525
bundle install
2626

2727
s serve:
28-
bundle exec jekyll serve --trace --livereload
28+
npm run
2929

3030
define baseurlparam =
3131
$(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "")

docs/_config.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ plugins:
4040
- jemoji
4141

4242
#color_scheme: nhs
43-
mermaid:
44-
# Version of mermaid library
45-
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
46-
version: "11.12.0"
43+
color_scheme: ce
44+
# mermaid:
45+
# # Version of mermaid library
46+
# # Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
47+
# version: "11.12.0"
4748

4849
aux_links:
4950
"NHS Notify Digital Letters on GitHub":

docs/_includes/fullscreen.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
<button type="button" name="fullScreenButton" id="fullScreenButton" class="btn" onclick="fullScreenToggle()">
22
Full Screen View
33
</button>
4+
5+
<input type="checkbox" id="fullscreenCheckbox" name="fullscreenCheckbox" title="Full Screen"
6+
style="visibility: hidden;">
7+
<label for="fullscreenCheckbox" class="text-small text-grey-dk-000 mb-0" style="visibility: hidden;"> Full
8+
Screen</label>

docs/_includes/head_custom.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<script type="text/javascript" src="{{ '/assets/js/imageopen.js' | relative_url }}"></script>
2+
<script type="text/javascript" src="{{ '/assets/js/nhs-notify.js' | relative_url }}"></script>
3+
<script type="text/javascript" src="{{ '/assets-webpack/js/main.js' | relative_url }}"></script>
4+
5+
6+
<script type="module">
7+
await window.nhsce.UseMermaid(document);
8+
$(document).ready(function() {
9+
window.nhsce.hookFullScreen();
10+
});
11+
</script>
12+
<link rel="stylesheet" href="{{ '/assets-webpack/css/main.css' | relative_url }}">

docs/_plugins/rawcontent.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
module Jekyll
2+
class RawContent < Generator
3+
def generate(site)
4+
site.collections.each do |collection|
5+
collection.each do |label, docs|
6+
docs = [label] if label.is_a?(Jekyll::Document)
7+
next if docs.nil?
8+
9+
docs.each do |doc|
10+
doc.data['raw_content'] = doc.content.dup
11+
end
12+
end
13+
end
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)