mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-20 23:28:42 -05:00
Updated sidebar links to include root
This commit is contained in:
+3
-1
@@ -58,7 +58,8 @@ hexo.extend.helper.register('doc_sidebar', function(className){
|
||||
var itemClass = className + '-link'
|
||||
if (link === path) itemClass += ' current'
|
||||
|
||||
result += '<a href="/' + href + '" class="' + itemClass + '">' + self.__(prefix + text) + '</a>'
|
||||
result += `<a href="${self.config.root + href}" class="${itemClass}">
|
||||
${self.__(prefix + text)}</a>`
|
||||
})
|
||||
})
|
||||
|
||||
@@ -83,6 +84,7 @@ hexo.extend.helper.register('header_menu', function(className){
|
||||
|
||||
hexo.extend.helper.register('canonical_url', function(lang){
|
||||
var path = this.page.canonical_path
|
||||
|
||||
if (lang && lang !== 'en') path = lang + '/' + path
|
||||
|
||||
return this.config.url + '/' + path
|
||||
|
||||
Reference in New Issue
Block a user