Skip to content

Commit 07a50ff

Browse files
committed
test
1 parent cdc5a32 commit 07a50ff

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

preview/preview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const requestHandler = async (core, parsedUrl, response) => {
8282
const lang = await file.lang();
8383
const initialJsState = await buildInitialJsState(file.alternativesReport);
8484
const templated = template.apply(
85-
file.stream[Symbol.asyncIterator](), lang.trim(), initialJsState
85+
file.stream[Symbol.asyncIterator](), lang.trim(), initialJsState, path,
8686
);
8787
return new Promise((resolve, reject) => {
8888
file.stream.on("error", reject);

resources/web/air_gapped_template.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
<div class="col-12 order-2 col-md-4 order-md-1 col-lg-3 h-almost-full-md sticky-top-md" id="left_col">
6161
<!-- The TOC is appended here -->
6262
</div>
63+
<div id="what-the-what">
64+
<!-- DOCS CURRENT -->
65+
</div>
6366

6467
<div class="col-12 order-1 col-md-8 order-md-2 col-lg-7 order-lg-2 guide-section" id="middle_col">
6568
<!-- start body -->

template/template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const readFile = promisify(fs.readFile);
3232
const stat = promisify(fs.stat);
3333

3434
module.exports = templateSource => {
35-
const apply = (rawItr, lang, initialJsState, currentPath, destPath) => {
35+
const apply = (rawItr, lang, initialJsState, destPath) => {
3636
/*
3737
* We apply the template by walking a stream for the template and a stream
3838
* for the raw page in parallel. We do this instead of pulling everything
@@ -108,7 +108,7 @@ module.exports = templateSource => {
108108
yield `lang="${lang}"`;
109109

110110
yield* template.gather("<!-- DOCS CURRENT -->");
111-
yield `<div id="custom-content">Current path: ${currentPath}<br>Dest path: ${destPath}</div>`;
111+
yield `<div id="custom-content">Dest path: ${destPath}</div>`;
112112

113113
yield* template.gather("<!-- DOCS BODY -->");
114114
await raw.dump("<body>");
@@ -189,7 +189,7 @@ module.exports = templateSource => {
189189
const raw = fs.createReadStream(source, {encoding: 'UTF-8'});
190190
const write = fs.createWriteStream(dest, {encoding: 'UTF-8'});
191191
await new Promise((resolve, reject) => {
192-
const out = apply(raw[Symbol.asyncIterator](), lang, initialJsState, source, dest);
192+
const out = apply(raw[Symbol.asyncIterator](), lang, initialJsState, dest);
193193
write.on("close", resolve);
194194
write.on("error", reject);
195195
out.on("error", err => write.destroy(err));

0 commit comments

Comments
 (0)