From 066f54a0b4d2fd226a38da6ce6a7d3bb963ec335 Mon Sep 17 00:00:00 2001 From: gchoqueux Date: Wed, 16 Dec 2020 15:04:03 +0100 Subject: [PATCH] fix(workflow): wrong path to build docs link. --- docs/publish.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/publish.js b/docs/publish.js index 14c3f644c0..36b8069fce 100644 --- a/docs/publish.js +++ b/docs/publish.js @@ -5,6 +5,8 @@ const template = require('jsdoc/template'); const helper = require('./templateHelper'); +const rootProject = path.normalize(`${__dirname}/..`); + // globals const outDir = path.normalize(env.opts.destination); let view; @@ -22,8 +24,8 @@ function find(spec) { }); } -function linkToSource(filename, path) { - const location = path.split('itowns/')[1]; +function linkToSource(filename, pathFile) { + const location = path.relative(rootProject, pathFile); return `${location}/${filename}`; }