Skip to content

Commit

Permalink
Fix outputs and names
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonstyle committed Jul 13, 2023
1 parent 99f2a96 commit 8559167
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/render/notebook/notebook-contributor-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function outputFile(
nbAbsPath: string,
): string {
const [_dir, stem] = dirAndStem(basename(nbAbsPath));
return `${stem}.html`;
return `${stem}-preview.html`;
}

function resolveHtmlNotebook(
Expand Down
4 changes: 2 additions & 2 deletions tests/smoke/embed/render-embed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const output = outputForInput(input, format);

// Test qmd embedding
// The notebook preview that is generated
const nbOutput = join(dirname(output.outputPath), "notebook.html");
const nbOutput = join(dirname(output.outputPath), "notebook-preview.html");
const nbSupporting = join(dirname(nbOutput), "notebook_files");

testRender(input, format, false, [
Expand Down Expand Up @@ -56,7 +56,7 @@ const ipynbOutput = outputForInput(ipynbInput, format);

const ipynbPreviewNb = join(
dirname(ipynbOutput.outputPath),
"penguins.html",
"penguins-preview.html",
);
const ipynbPreviewSupporting = join(
dirname(ipynbOutput.outputPath),
Expand Down
12 changes: 6 additions & 6 deletions tests/smoke/manuscript/render-manuscript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const ipynbSingleOutputs = [
"data/lapalma_ign.csv",
"images/la-palma-map.png",
"images/reservoirs.png",
"article.ipynb.html",
"article-preview.html",
"article.out.ipynb",
];
testManuscriptRender(
Expand All @@ -40,13 +40,13 @@ const ipynbFullOutputs = [
"images/reservoirs.png",
"images/stations.png",
"notebooks/data-screening.ipynb",
"notebooks/data-screening.ipynb.html",
"notebooks/data-screening-preview.html",
"notebooks/data-screening.out.ipynb",
"notebooks/seismic-monitoring-stations.out.ipynb",
"notebooks/seismic-monitoring-stations.qmd",
"notebooks/seismic-monitoring-stations.qmd.html",
"notebooks/seismic-monitoring-stations-preview.html",
"notebooks/visualization-figure-creation-seaborn.ipynb",
"notebooks/visualization-figure-creation-seaborn.ipynb.html",
"notebooks/visualization-figure-creation-seaborn-preview.html",
"notebooks/visualization-figure-creation-seaborn.out.ipynb",
];
testManuscriptRender(
Expand All @@ -61,7 +61,7 @@ const qmdSingleOutputs = [
"index-meca.zip",
"images/la-palma-map.png",
"images/reservoirs.png",
"index.qmd.html",
"index-preview.html",
"index.out.ipynb",
];

Expand All @@ -79,7 +79,7 @@ const qmdFullOutputs = [
"images/reservoirs.png",
"notebook.qmd",
"notebook.out.ipynb",
"notebook.qmd.html",
"notebook-preview.html",
];
testManuscriptRender(
qmdFullArticle,
Expand Down

0 comments on commit 8559167

Please sign in to comment.