Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
eResearch
CalcyteJS
Commits
7b81e0c2
Commit
7b81e0c2
authored
Oct 03, 2018
by
Mike Lynch
Browse files
index.init() now uses the default catalog HTML template if one isn't passed in
parent
be980778
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/index_html.js
View file @
7b81e0c2
...
...
@@ -53,7 +53,7 @@ const back_links = {
hasMember
:
"
memberOf
"
};
const
default_template
=
path
.
join
(
__dirname
,
"
defaults/catalog_template.html
"
);
const
dont_back_link
=
new
Set
(
Object
.
values
(
back_links
));
// TODO - Put this in a utility function
...
...
@@ -609,7 +609,7 @@ module.exports = function () {
return
html
;
},
init
:
function
init
(
crate_data
,
out_path
,
multiple_files
,
template_path
)
{
init
:
function
init
(
crate_data
,
out_path
,
multiple_files
,
template_path
=
defaults
.
catalog_template
)
{
if
(
template_path
)
{
var
temp
=
fs
.
readFileSync
(
template_path
,
{
encoding
:
"
utf8
"
});
this
.
template
=
ejs
.
compile
(
temp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment