Skip to content

Commit

Permalink
Inject GitHub info into build step (#250)
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Handl <ralf.handl@sap.com>
  • Loading branch information
HeikoTheissen and ralfhandl authored Apr 11, 2024
1 parent 2ac78a7 commit d431c2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/pages.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const pandoc = require("./pandoc");
const fs = require("fs");

const VOCAB = require("../package.json").name;
const PKG = require("../package.json");
const GITHUB_REPO = PKG.repository.url.match(/^git\+(.*?)\.git$/)[1];
const REPO = process.argv[process.argv.length - 1];

function file(dir, title, filename) {
Expand All @@ -14,9 +15,10 @@ function file(dir, title, filename) {
),
},
{
"-c": `/${VOCAB}/styles/style.css`,
"-c": `/${PKG.name}/styles/style.css`,
"-F": `${__dirname}/md2html.js`,
"-M": `title=${REPO}${title ? " - " + title : ""}`,
"-V": [`github-repo=${GITHUB_REPO}`, `github-path=${dir}/${filename}`],
"--template": "assets/template",
},
);
Expand Down

0 comments on commit d431c2f

Please sign in to comment.