Skip to content

Commit

Permalink
Merge pull request #2025 from TripleCamera/main
Browse files Browse the repository at this point in the history
Fix main page name for wikis with base URL rewritten
  • Loading branch information
audiodude committed Jul 14, 2024
2 parents 7f8ebd2 + 42d6569 commit c09bc92
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/MediaWiki.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,7 @@ class MediaWiki {
throw new Error(`Mediawiki version ${mwVersion} not supported should be >=${mwMinimalVersion}`)
}

// Base will contain the default encoded article id for the wiki.
const mainPage = decodeURIComponent(entries.base.split('/').pop())
const mainPage = entries.mainpage.replace(/ /g, '_')
const siteName = entries.sitename

// Gather languages codes (en remove the 'dialect' part)
Expand Down

0 comments on commit c09bc92

Please sign in to comment.