Skip to content

Commit e2eafeb

Browse files
authored
Merge pull request #145 from KubaO/staging
Justthedocs performance fixes and book content gathering.
2 parents f54ed24 + a1c6187 commit e2eafeb

28 files changed

Lines changed: 2088 additions & 595 deletions

BOOKPLAN.md

Lines changed: 12 additions & 5 deletions
Large diffs are not rendered by default.

WIP.md

Lines changed: 127 additions & 1 deletion
Large diffs are not rendered by default.

docs/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ _pdf/
66
.jekyll-cache
77
.jekyll-metadata
88
*.af~lock~
9-
_bak
9+
_bak
10+
_profile/out/
11+
_profile/rbspy.exe

docs/Gemfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ gem "logger"
1111
gem "fiddle"
1212
gem "bigdecimal"
1313

14+
# Profiling. Not loaded by Jekyll automatically (not in :jekyll_plugins).
15+
# Activated by _profile/profile.rb via `require "ruby-prof"`.
16+
# force_ruby_platform: ruby-prof's x64-mingw-ucrt gem ships no
17+
# precompiled .so for Ruby 3.4+, so we compile from source instead.
18+
gem "ruby-prof", force_ruby_platform: true
19+
1420
group :jekyll_plugins do
1521
gem "jekyll-sass-converter", "~> 2.2"
1622
gem "jekyll-include-cache"

docs/Gemfile.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ GEM
7474
logger (1.7.0)
7575
mercenary (0.4.0)
7676
octicons (19.21.1)
77+
ostruct (0.6.3)
7778
pathutil (0.16.2)
7879
forwardable-extended (~> 2.6)
7980
public_suffix (7.0.0)
@@ -83,6 +84,12 @@ GEM
8384
ffi (~> 1.0)
8485
rexml (3.4.4)
8586
rouge (4.6.1)
87+
ruby-prof (2.0.4)
88+
base64
89+
ostruct
90+
ruby-prof (2.0.4-x64-mingw-ucrt)
91+
base64
92+
ostruct
8693
safe_yaml (1.0.5)
8794
sassc (2.4.0)
8895
ffi (~> 1.9)
@@ -112,6 +119,7 @@ DEPENDENCIES
112119
jekyll-sitemap
113120
just-the-docs (= 0.10.1)
114121
logger
122+
ruby-prof
115123
tzinfo (>= 1, < 3)
116124
tzinfo-data
117125
wdm (~> 0.1)
@@ -150,13 +158,16 @@ CHECKSUMS
150158
logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
151159
mercenary (0.4.0) sha256=b25a1e4a59adca88665e08e24acf0af30da5b5d859f7d8f38fba52c28f405138
152160
octicons (19.21.1) sha256=52f7330d7896fd18521999d1f6e9191f8b85ab22268b77e9f6d983a988556485
161+
ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
153162
pathutil (0.16.2) sha256=e43b74365631cab4f6d5e4228f812927efc9cb2c71e62976edcb252ee948d589
154163
public_suffix (7.0.0) sha256=f7090b5beb0e56f9f10d79eed4d5fbe551b3b425da65877e075dad47a6a1b095
155164
rake (13.4.2) sha256=cb825b2bd5f1f8e91ca37bddb4b9aaf345551b4731da62949be002fa89283701
156165
rb-fsevent (0.11.2) sha256=43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe
157166
rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e
158167
rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142
159168
rouge (4.6.1) sha256=5075346d5797d6864be93f7adc75a16047a7dbfa572c63c502419ffa582c77de
169+
ruby-prof (2.0.4) sha256=42190ff6870e055a9d58b39df63e83442113ef7169c0e27b599942c3f15d1435
170+
ruby-prof (2.0.4-x64-mingw-ucrt) sha256=5d8bcba77a384aa65234688be1199375753380b877c5cac4a70517779bd190a0
160171
safe_yaml (1.0.5) sha256=a6ac2d64b7eb027bdeeca1851fe7e7af0d668e133e8a88066a0c6f7087d9f848
161172
sassc (2.4.0) sha256=4c60a2b0a3b36685c83b80d5789401c2f678c1652e3288315a1551d811d9f83e
162173
terminal-table (3.0.2) sha256=f951b6af5f3e00203fb290a669e0a85c5dd5b051b3b023392ccfd67ba5abae91

docs/Tutorials/CustomControls/Painting-drawing to your control.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ Private Sub OnPaint(ByVal Canvas As CustomControls.Canvas) _
2323
You are passed a [`Canvas`](../../tB/Packages/CustomControls/Framework/Canvas) object that offers the following methods:
2424

2525
```tb
26-
Canvas.Width As Long [Property-Get]
27-
Canvas.Height As Long [Property-Get]
28-
Canvas.Dpi As Long [Property-Get]
29-
Canvas.DpiScaleFactor As Double [Property-Get]
26+
Canvas.Width As Long ' Property-Get
27+
Canvas.Height As Long ' Property-Get]
28+
Canvas.Dpi As Long ' Property-Get]
29+
Canvas.DpiScaleFactor As Double ' Property-Get
3030
Canvas.AddElement(Descriptor As ElementDescriptor)
3131
```
3232

docs/Tutorials/CustomControls/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: CustomControls
33
parent: Tutorials
4-
permalink: /Tutorials/CustomControls
4+
permalink: /Tutorials/CustomControls/
55
redirect_from:
66
- /CustomControls
77
- /CustomControls/Introduction
@@ -24,4 +24,4 @@ A few highlights;
2424

2525
## See also
2626

27-
- [CustomControls package reference](../tB/Packages/CustomControls/) -- the full reference for the built-in `Waynes…` controls and the framework they are built on, including [`ICustomControl`](../tB/Packages/CustomControls/Framework/ICustomControl), [`Canvas`](../tB/Packages/CustomControls/Framework/Canvas), and the style helpers ([`Fill`](../tB/Packages/CustomControls/Styles/Fill), [`Corners`](../tB/Packages/CustomControls/Styles/Corners), [`Borders`](../tB/Packages/CustomControls/Styles/Borders), [`TextRendering`](../tB/Packages/CustomControls/Styles/TextRendering), …)
27+
- [CustomControls package reference](../../tB/Packages/CustomControls/) -- the full reference for the built-in `Waynes…` controls and the framework they are built on, including [`ICustomControl`](../../tB/Packages/CustomControls/Framework/ICustomControl), [`Canvas`](../../tB/Packages/CustomControls/Framework/Canvas), and the style helpers ([`Fill`](../../tB/Packages/CustomControls/Styles/Fill), [`Corners`](../../tB/Packages/CustomControls/Styles/Corners), [`Borders`](../../tB/Packages/CustomControls/Styles/Borders), [`TextRendering`](../../tB/Packages/CustomControls/Styles/TextRendering), …)

docs/_config.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,16 @@ also_build_pdf: true
146146
# Patterns for files Jekyll produces in _site/ that have no purpose
147147
# in the offline tree -- Pages / crawler metadata, jekyll-redirect-
148148
# from output, Windows batch scripts Jekyll picks up from the source
149-
# directory, and the concatenated `book.html` that exists only to
150-
# feed `_plugins/pdfify.rb` (which copies it to _site-pdf/ and deletes
151-
# the _site/ copy). The online _site/ keeps the metadata files;
152-
# offlinify strips them from _site-offline/.
149+
# directory, and the concatenated `book.html` that feeds the PDF
150+
# build. When `also_build_pdf: true` the pdfify plugin captures
151+
# book.html in memory at :pages, :post_render and drops it from
152+
# site.pages at :site, :post_render, so `_site/book.html` is never
153+
# written -- but offlinify's per-page hook fires for book.html
154+
# before pdfify's removal, so the exclude pattern is what keeps it
155+
# out of _site-offline/. When `also_build_pdf: false` book.html
156+
# renders as a normal page on _site/ and the exclude does the same
157+
# job from a different angle. The online _site/ keeps the metadata
158+
# files; offlinify strips them from _site-offline/.
153159
#
154160
# Patterns are File.fnmatch-style with FNM_PATHNAME, matched against
155161
# each file's path relative to the site root. `*` does NOT cross
@@ -170,5 +176,16 @@ offline_exclude:
170176
exclude:
171177
- _site-offline
172178
- _site-pdf
179+
- _profile
173180
- redirects.json
174181
- "*.bat"
182+
183+
# Bypass just-the-docs's vendor/compress.html Liquid layout: it spends
184+
# ~3.5s on a single pre-block-protected whitespace collapse done via
185+
# Liquid split/join filters. The same compression runs as a Ruby
186+
# plugin in `_plugins/html-compress.rb`, ~10x faster.
187+
compress_html:
188+
ignore:
189+
envs: all
190+
191+

0 commit comments

Comments
 (0)