arolstar52/zhtest
ZH Wikipedia Local MediaWiki on Hugging Face Space
v14: fixes SecurePoll installation, verifies every required extension at build time, and scans dump content models before import.
Progress page:
/import-status.txtDefault dump:
https://dumps.wikimedia.org/zhwiki/20260601/zhwiki-20260601-pages-articles.xml.bz2Installed extensions:
ParserFunctions
Cite
Scribunto
TemplateStyles
SyntaxHighlight_GeSHi
Echo
Flow
MassMessage
Gadgets
JsonConfig
SecurePoll
ParsoidBefore importing, v12 scans all <model>...</model> values in the dump and writes:
/data/logs/content-models.txt
/data/logs/unknown-content-models.txtRecommended variables:
MW_SERVER=https://your-space.hf.space
MW_DB_PASSWORD=your-password
MW_SECRET_KEY=random-long-string
MW_UPGRADE_KEY=random-long-string
MYSQL_BUFFER_POOL_SIZE=6G
AUTO_IMPORT=1
IMPORT_NAMESPACES=
STRICT_CONTENT_MODEL_CHECK=1Empty IMPORT_NAMESPACES means importing all dump pages.
v13 fix: SecurePoll
The 2026-06-01 zhwiki dump preflight scan showed these models:
MassMessageListContent
Scribunto
SecurePoll
css
flow-board
javascript
json
sanitized-css
wikitextv13 adds the real extension:
wfLoadExtension( 'SecurePoll' );It also adds SecurePoll to the preflight known-model list.
v14 fix
v13 enabled SecurePoll in LocalSettings.php but the Dockerfile clone list accidentally did not clone SecurePoll.
v14 fixes the clone list and adds a build-time integrity check:
for ext in Scribunto ParserFunctions Cite TemplateStyles SyntaxHighlight_GeSHi Echo Flow MassMessage Gadgets JsonConfig SecurePoll; do
test -f "$ext/extension.json" || (echo "Missing extension.json for $ext" && exit 1)
doneSo if any required extension is not actually installed, the Docker build fails immediately instead of failing at runtime.
