Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
WORKDIR /usr/src/yarn-project
RUN ./bootstrap.sh

# Make COMMIT_TAG visible to build scripts
ARG COMMIT_TAG=""
ENV COMMIT_TAG=$COMMIT_TAG

WORKDIR /usr/src/docs
RUN yarn && yarn build

Expand Down
13 changes: 8 additions & 5 deletions docs/src/preprocess/include_code.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,14 @@ async function preprocessIncludeCode(markdownContent, filePath, rootDir) {
filePath
);

const relativeCodeFilePath = path.resolve(rootDir, codeFilePath);

let urlText = `${relativeCodeFilePath}#L${startLine}-L${endLine}`;
const tag = "master";
const url = `https://github.com/AztecProtocol/aztec-packages/blob/${tag}/${relativeCodeFilePath}#L${startLine}-L${endLine}`;
const relativeCodeFilePath = path
.resolve(rootDir, codeFilePath)
.replace(/^\//, "");
const urlText = `${relativeCodeFilePath}#L${startLine}-L${endLine}`;
const tag = process.env.COMMIT_TAG
? `aztec-packages-${process.env.COMMIT_TAG}`
: "master";
const url = `https://github.com/AztecProtocol/aztec-packages/blob/${tag}/${urlText}`;

const title = noTitle ? "" : `title="${identifier}"`;
const lineNumbers = noLineNumbers ? "" : "showLineNumbers";
Expand Down