mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-07-26 00:29:45 +02:00
Docker image optimization (#150)
This commit is contained in:
parent
8d9c19e595
commit
c6e2db0245
15 changed files with 167 additions and 2359 deletions
|
@ -4,6 +4,7 @@
|
|||
import twig from 'twig';
|
||||
import fs from 'fs';
|
||||
import urlify from './urlify';
|
||||
import path from 'path';
|
||||
|
||||
export default (function () {
|
||||
'use strict';
|
||||
|
@ -16,7 +17,7 @@ export default (function () {
|
|||
* @returns {string} - svg code
|
||||
*/
|
||||
twig.extendFunction('svg', function (filename: string) {
|
||||
return fs.readFileSync(`./src/frontend/svg/${filename}.svg`, 'utf-8');
|
||||
return fs.readFileSync(path.join(__dirname, `./../../frontend/svg/${filename}.svg`), 'utf-8');
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue