Try to fix config_padding

This commit is contained in:
lowlighter
2021-05-18 23:37:44 +02:00
parent 1adf6d340e
commit ac7e11b3ba
2 changed files with 2 additions and 1 deletions

2
settings.example.json generated
View File

@@ -13,7 +13,7 @@
"debug.headless": false, "//": "Debug puppeteer process", "debug.headless": false, "//": "Debug puppeteer process",
"mocked": false, "//": "Use mocked data instead of live APIs (use 'force' to use mocked token even if real token are defined)", "mocked": false, "//": "Use mocked data instead of live APIs (use 'force' to use mocked token even if real token are defined)",
"repositories": 100, "//": "Number of repositories to use", "repositories": 100, "//": "Number of repositories to use",
"padding": ["6%", "13%"], "//": "Image padding (default)", "padding": ["20", "40 + 2%"], "//": "Image padding (default)",
"hosted": { "hosted": {
"by": "", "//": "Web instance host (displayed in footer)", "by": "", "//": "Web instance host (displayed in footer)",
"link": "", "//": "Web instance host link (displayed in footer)" "link": "", "//": "Web instance host link (displayed in footer)"

View File

@@ -97,6 +97,7 @@ async function wait(seconds) {
const q = {...query, ...(_repo ? {repo:_repo} : null), template} const q = {...query, ...(_repo ? {repo:_repo} : null), template}
const _output = ["svg", "jpeg", "png", "json", "markdown", "markdown-pdf"].includes(config["config.output"]) ? config["config.output"] : metadata.templates[template].formats[0] ?? null const _output = ["svg", "jpeg", "png", "json", "markdown", "markdown-pdf"].includes(config["config.output"]) ? config["config.output"] : metadata.templates[template].formats[0] ?? null
const filename = _filename.replace(/[*]/g, {jpeg:"jpg", markdown:"md", "markdown-pdf":"pdf"}[_output] ?? _output) const filename = _filename.replace(/[*]/g, {jpeg:"jpg", markdown:"md", "markdown-pdf":"pdf"}[_output] ?? _output)
config["config.padding"] = core.getInput("config_padding") || config["config.padding"]
//Docker image //Docker image
if (_image) if (_image)