Improved Main Page
Improved Main Page (IMP) layout is a customizable template system commonly used on wikis hosted by wiki.gg (a MediaWiki hosting service) for creating modern, grid-based homepages. It's designed to make the main page more visually appealing and organized, often with sections like welcome messages, featured content, news, and navigation boxes arranged in a responsive CSS grid.
This setup is popular for gaming, community, or fan wikis and relies on:
- Template:Main page: The core template that structures the layout.
- Module:Main page: A Lua module that handles the dynamic arrangement of content boxes.
- Custom CSS in MediaWiki:Common.css for styling (specifically the "Main page layout" section).
See https://defaultloadout.wiki.gg/wiki/Category:Main_page_templates for all template.
Dependencies
- https://www.mediawiki.org/wiki/Extension:VariablesLua
- https://github.com/wiki-gg-oss/mediawiki-extensions-ParserPower - https://river.me/blog/argmap/
- https://www.mediawiki.org/wiki/Extension:Variables - https://river.me/blog/variables-and-parsoid/
- https://www.mediawiki.org/wiki/Extension:Description2
- Ranking in Google
- Not be needed for non-public wikis
How to Create or Implement an IMP Main Page
To set up an IMP Main Page on your MediaWiki installation
1. Set the Main Page Location:
- Search for MediaWiki:Mainpage in your wiki's search bar.
- Edit it to point to your desired page title (e.g., replace the default "Main Page" with "Home" or whatever your main page is called).
- This system message controls where users land when clicking the logo or "Main page" sidebar link.
- Optionally, customize the displayed title with MediaWiki:Mainpage-title (for guests) or MediaWiki:Mainpage-title-loggedin (for logged-in users).
2. Install Required Templates and Modules:
- Create or import Template:Main page (see documentation below).
- Create Module:Main page to manage box layouts (this is a Lua script for dynamic grids).
- Each `
Template:Main page boxis not intended to be used directly, please use Template:Main page box/start and Template:Main page box/end.` pulls content from subpages (e.g., "WikiName/welcome"). If a keyword (like "news") doesn't exist, previewing will prompt you to create it.
3. Add CSS Styling:
- Edit MediaWiki:Common.css and add styles under a "Main page layout" section.
- Add Gadget CSS
- MediaWiki:Gadgets/imp/mainReadonly.css
- https://defaultloadout.wiki.gg/wiki/MediaWiki:Gadgets/imp/mainReadonly.css#L-12
- https://defaultloadout.wiki.gg/wiki/MediaWiki:Gadgets/imp
- MediaWiki:Gadgets/mpEditLinks? with JS/CSS for quick-edit links on main page boxes (code examples available in wiki.gg docs).
5. Test and Preview:
- Preview your main page edits to check for warnings (e.g., missing boxes).
- If a box is omitted intentionally, ignore the warning.
Columns
The default CSS for a desktop is 2fr, 1fr, 2fr.
- This gives you a
External links
- https://defaultloadout.wiki.gg/wiki/Default_Loadout_Wiki/pages
- subpages
- https://test.wiki.gg/
- https://www.semantic-mediawiki.org/wiki/MediaWiki_Users_and_Developers_Conference_Fall_2025/wiki.gg%27s_IMProved_Main_Page