<% if(typeof description !== 'undefined') { %> <%# If the description is explicitly set use it %> <% } else if(typeof company !== 'undefined') { %> <%# If the description isn't explicitly set but the company name is (company variable) then assume this a generic company Helm chart repository and set the description as such %> <% } %> <% if (typeof keywords !== 'undefined') { %> <%# If the keywords are explicitly set use them %> <% } else { %> <%# If the keywords aren't explicitly set then use the default keywords %> <% } %> <% if (typeof author !== 'undefined') { %> <%# If the author is explicitly set use it %> <% } else if (typeof company !== 'undefined') { %> <%# If the author isn't explicitly set but the company name is (company variable) then use it as the author %> <% } %> <% if(typeof title !== 'undefined' && title.length > 0) { %> <% if (typeof titlePrefix !== 'undefined') { %><%= titlePrefix %><% } %><%= title %><% if (typeof titleSuffix !== 'undefined') { %><%= titleSuffix %><% } %> <% } %> <%# %> <%# %> <%# %> <%# %> <%# Add any additional stylesheets specified within a controller etc... %> <%# This can either be a singular string or a array of strings %> <%# Note, that the string should be the name of the stylesheet WITHOUT the `.css` extension and exist in the `css/` directory %> <% if (typeof extraStyles !== 'undefined') { %> <% if (Array.isArray(extraStyles)) { %> <%# Because it's an array, we need to loop through each stylesheet and include it %> <% for (let style of extraStyles) { %> <% } %> <% } else { %> <%# Include the singular stylesheet %> <% } %> <% } %> <%# %> <%# %> <%# %> <%# %> <%# Add any additional scripts specified within a controller etc... %> <%# %> <%# Note, that these can come in multiple formats as described in the table below: %> <%# | Type | Description | Format | Use Cases | %> <%# | ------ | --------------------------------------------------- | ----------------------------------------------------------------------- | --------------------------------------------------------------------------- | %> <%# | string | The name of the script to include | ` <% } else { %> <%# Because the `.script` property doesn't start with `http` or `https` we assume it's a "local" script and include it as a local script (from the `js/` folder and with a `.js` extension) %> <% } %> <% } else { %> <% if(script.startsWith('http') || script.startsWith('https')) { %> <%# Because the string starts with `http` or `https` we assume it's an "external" script and include it as a straight URL %> <% } else { %> <%# Because the string doesn't start with `http` or `https` we assume it's a "local" script and include it as a local script (from the `js/` folder and with a `.js` extension) %> <% } %> <% } %> <% } %> <% } else if (typeof extraScripts === 'object') { %> <% if(extraScripts.script.startsWith('http') || extraScripts.script.startsWith('https')) { %> <%# Because the `.script` property of the singular object starts with `http` or `https` we assume it's an "external" script and include it as a straight URL %> <% } else { %> <%# Because the `.script` property of the singular object doesn't start with `http` or `https` we assume it's a "local" script and include it as a local script (from the `js/` folder and with a `.js` extension) %> <% } %> <% } else { %> <% if(extraScripts.startsWith('http') || extraScripts.startsWith('https')) { %> <%# Because the singular string starts with `http` or `https` we assume it's an "external" script and include it as a straight URL %> <% } else { %> <%# Because the singular string doesn't start with `http` or `https` we assume it's a "local" script and include it as a local script (from the `js/` folder and with a `.js` extension) %> <% } %> <% } %> <% } %>
<% if(typeof header !== 'undefined') { %> <%# Because the controller has explicitly set the header, we use the specified header here (within the `
` tags) %> <%- include(header) %> <% } else { %> <%# Because no explicitly header was set use the default header %> <%- include('includes/header.ejs') %> <% } %>
<%- include(page) %>