Adjustments for backup of wiki.gruntnetwork.com

This commit is contained in:
Suzanne Soy 2023-05-08 00:00:13 +01:00
parent 29cb1c45c8
commit bc54d8f299
3 changed files with 8346 additions and 2 deletions

8335
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -36,7 +36,7 @@
"quick-lru": "^1.0.0",
"request": "*",
"request-promise-native": "^1.0.5",
"sharp": "^0.22.1",
"sharp": "^0.32.1",
"sqlite": "^2.8.0",
"sqlite3": "*",
"uuid": "^3.4.0"

View File

@ -550,7 +550,7 @@ class WikiItem {
// }
class ArticleStub extends WikiItem {
constructor ( pageInfo ) {
super( 'A', urlconv.resolve( wiki.articleUriPrefix, pageInfo.fullurl ), pageInfo.title )
super( '.', urlconv.resolve( wiki.articleUriPrefix, pageInfo.fullurl ), pageInfo.title ) // 'A'
this.info = pageInfo
this.mwId = pageInfo.pageid
this.revision = pageInfo.lastrevid
@ -613,6 +613,15 @@ class Article extends ArticleStub {
dom( elem ).remove()
})
// Add "All pages" link in sidebar
try {
dom( '#t-specialpages' ).replaceWith(
cheerio.load('<li class="mw-list-item" id="t-allpages"><a href="Toutes_les_pages" title="Toutes les pages [q]" accesskey="q" rel="alternate">Toutes les pages</a></li>')('li')
)
} catch ( err ) {
log( 'allpages', err )
}
// modify links
let css = dom( '#layout-css' )
css.attr( 'href', this.relativePath( css.attr( 'href' )))