diff --git a/packages/oslo-generator-html/lib/HtmlGenerationService.ts b/packages/oslo-generator-html/lib/HtmlGenerationService.ts
index dc6149c..0f11163 100644
--- a/packages/oslo-generator-html/lib/HtmlGenerationService.ts
+++ b/packages/oslo-generator-html/lib/HtmlGenerationService.ts
@@ -11,7 +11,7 @@ import { SpecificationType } from './utils/specificationTypeEnum';
export class HtmlGenerationService implements IService {
public readonly logger: Logger;
public readonly configuration: HtmlGenerationServiceConfiguration;
- public dirs: string[] = [resolve(`${__dirname}/templates`)];
+ public dirs: string[] = [];
public constructor(
@inject(ServiceIdentifier.Logger) logger: Logger,
@@ -33,6 +33,8 @@ export class HtmlGenerationService implements IService {
const customTemplatesDir: string = resolve(templatesPath);
this.dirs.push(customTemplatesDir);
+ } else {
+ this.dirs.push(resolve(`${__dirname}/templates`));
}
const env = nj.configure(this.dirs);
@@ -48,7 +50,7 @@ export class HtmlGenerationService implements IService {
]);
if (this.configuration.templates && this.configuration.rootTemplate) {
- indexPath = `${this.dirs[1]}/${this.configuration.rootTemplate}`;
+ indexPath = `${this.dirs[0]}/${this.configuration.rootTemplate}`;
} else {
indexPath =
this.configuration.specificationType === SpecificationType.Vocabulary
diff --git a/packages/oslo-generator-html/package.json b/packages/oslo-generator-html/package.json
index c1ca938..95ceef9 100644
--- a/packages/oslo-generator-html/package.json
+++ b/packages/oslo-generator-html/package.json
@@ -1,6 +1,6 @@
{
"name": "@oslo-flanders/html-generator",
- "version": "0.0.19-alpha.0",
+ "version": "0.0.20-alpha.0",
"description": "Generates an HTML file using an OSLO webuniversum config",
"author": "Digitaal Vlaanderen ",
"homepage": "https://github.com/informatievlaanderen/OSLO-UML-Transformer/tree/main/packages/oslo-generator-html#readme",