mirror of
https://github.com/caddyserver/website.git
synced 2025-04-21 20:46:15 -04:00
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:
parent
49ed10d267
commit
4f6d355a97
37 changed files with 1678 additions and 56 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue