fix(site): no prepended slash

This commit is contained in:
Daniel Imhoff 2018-05-02 11:28:40 -05:00
parent 49ad2118a3
commit cea1dc14d3
2 changed files with 4 additions and 2 deletions

View File

@ -34,8 +34,10 @@ module.exports = function jekyll(renderDocsProcessor) {
.replace('content/', '');
// add trailing slash to plugin pages
if(!doc.URL.endsWith("/") && !doc.URL.endsWith(".html")) {
doc.URL = doc.URL+'/';
doc.URL = doc.URL + '/';
}
doc.URL = '/' + doc.URL;
});
const betaDocs = [];

View File

@ -6,5 +6,5 @@
</li>
<@- for doc in docs @><@ if doc.URL and doc.private != true @>
<li class="capitalize {% if page.id == '<$ doc.name|lower|dashify $>' %}active{% endif %}">
<a href="/<$ doc.URL $>"><$ doc.name $><@ if doc.paid == true @> <span class="paid">Paid</span><@ endif @><@ if doc.beta == true @> <span class="beta">&beta;</span><@ endif @></a>
<a href="<$ doc.URL $>"><$ doc.name $><@ if doc.paid == true @> <span class="paid">Paid</span><@ endif @><@ if doc.beta == true @> <span class="beta">&beta;</span><@ endif @></a>
</li><@ endif @><@ endfor @>