Account portal, download page, non-standard module docs

This ends v1 on the website. Docs archive still available through a
sidebar nav link in the docs.
This commit is contained in:
Matthew Holt 2020-07-16 15:51:46 -06:00
parent 49ed10d267
commit 4f6d355a97
No known key found for this signature in database
GPG key ID: 2A349DD577D586A5
37 changed files with 1678 additions and 56 deletions

View file

@ -7,3 +7,27 @@ document.addEventListener('DOMContentLoaded', function() {
debug: false // Set debug to true if you want to inspect the dropdown
});
});
const caddyImportPath = 'github.com/caddyserver/caddy/v2';
function isStandard(packagePath) {
return packagePath.startsWith(caddyImportPath);
}
function substrBeforeLastDot(s) {
return s.substr(0, s.lastIndexOf('.'))
}
function substrAfterLastDot(s) {
return s.substr(s.lastIndexOf('.'))
}
function truncate(str, len) {
if (!str) return "";
var startLen = str.length;
str = str.substring(0, len);
if (startLen > len) {
str += "...";
}
return str;
}