parent
6c7ebc989d
commit
ee72dd05e5
6 changed files with 192 additions and 142 deletions
|
|
@ -204,7 +204,7 @@ export class Compiler {
|
|||
title = str
|
||||
|
||||
if (
|
||||
!/:|(\/{2})/.test(href) &&
|
||||
!isAbsolutePath(href) &&
|
||||
!_self._matchNotCompileLink(href) &&
|
||||
!config.ignore
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ function formatUpdated(html, updated, fn) {
|
|||
updated =
|
||||
typeof fn === 'function' ?
|
||||
fn(updated) :
|
||||
typeof fn === 'string' ? tinydate(fn)(new Date(updated)) : updated
|
||||
typeof fn === 'string' ?
|
||||
tinydate(fn)(new Date(updated)) :
|
||||
updated
|
||||
|
||||
return html.replace(/{docsify-updated}/g, updated)
|
||||
}
|
||||
|
|
@ -229,6 +231,10 @@ export function initRender(vm) {
|
|||
html += tpl.cover()
|
||||
}
|
||||
|
||||
if (config.logo) {
|
||||
config.logo = getPath(vm.router.getBasePath(), config.logo)
|
||||
}
|
||||
|
||||
html += tpl.main(config)
|
||||
// Render main app
|
||||
vm._renderTo(el, html, true)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,11 @@ export function main(config) {
|
|||
'</button>' +
|
||||
'<aside class="sidebar">' +
|
||||
(config.name ?
|
||||
`<h1><a class="app-name-link" data-nosearch>${config.name}</a></h1>` :
|
||||
`<h1><a class="app-name-link" data-nosearch>${
|
||||
config.logo ?
|
||||
`<img alt=${config.name} src=${config.logo}>` :
|
||||
config.name
|
||||
}</a></h1>` :
|
||||
'') +
|
||||
'<div class="sidebar-nav"><!--sidebar--></div>' +
|
||||
'</aside>'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue