Tips and tricks: Difference between revisions
(→Markup) |
No edit summary |
||
(19 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This page collects tips on how to create good content | This page collects tips on how to create good content within the vagaries of the MediaWiki ecosystem. Document Byzantine things and struggles here, and use heading structure appropriately so that items appear in the contents box . Available external help pages are linked to where possible. | ||
== | == Wiki navigation and special pages == | ||
=== | === Make a new page === | ||
Insert a link into an existing page with the name of the new page, save edit, click on link to new page, and lastly edit that new page by clicking "create". | |||
== Navigation popups == | [[wikipedia:Help:Wikitext|https://en.wikipedia.org/wiki/Help:Wikitext]] | ||
[[File:Screenshot 2022-11-03 at 18.30.26.png|thumb|Popup error when no text precedes headers.]] | |||
Navigation popups are nice feature, but all too easy to break or make ugly. | https://en.wikipedia.org/wiki/Help:Cheatsheet | ||
=== Text required at page head === | |||
https://meta.wikimedia.org/wiki/Help:Wikitext_examples | |||
== Images == | |||
https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax | |||
=== SVG === | |||
Using SVG graphics are preferred mainly for quality, but also file size reasons. SVGs can be compressed with the https://vecta.io/nano tool and also usually compress down again using zip of server HTML compression. (PNG and JPGs do not compress so file size differences can easily be 10x.) | |||
== Navigation == | |||
=== Side bar editing === | |||
Edit source on [[MediaWiki:Sidebar]] to change sidebar content. | |||
=== Navigation popups === | |||
[[File:Screenshot 2022-11-03 at 18.30.26.png|thumb|Popup error when no text precedes headers.]]Navigation popups are nice feature, but all too easy to break or make ugly. | |||
==== Text required at page head ==== | |||
Before any headers, a paragraph of body text is required for the popup to display correctly and not generate an error. This text should summarise the page in a couple of sentences which is what appears in the popup. | Before any headers, a paragraph of body text is required for the popup to display correctly and not generate an error. This text should summarise the page in a couple of sentences which is what appears in the popup. | ||
=== | |||
==== Popup images ==== | |||
To make [[wikipedia:Wikipedia:Tools/Navigation_popups|Navigation_popups]] show an image (which is preferred), the image apparently needs to be included on the page and downloaded on page load -- if a gallery image, for instance, this is not the case. | To make [[wikipedia:Wikipedia:Tools/Navigation_popups|Navigation_popups]] show an image (which is preferred), the image apparently needs to be included on the page and downloaded on page load -- if a gallery image, for instance, this is not the case. | ||
Line 21: | Line 38: | ||
== Markup == | == Markup == | ||
Writing markup and especially writing about markup in markup is maddening. | |||
<code><nowiki> | * Find a good example and use view/edit source (rather than visual editor) to see how things are done. | ||
* Not all/many formatting options are available in visual editor, some things have to be added in source. | |||
<code><nowiki><nowiki>...</nowiki></nowiki></code> | |||
<code><nowiki><nowiki><nowiki>...</nowiki></nowiki></nowiki></code> | <code><nowiki><nowiki><nowiki>...</nowiki></nowiki></nowiki></code> | ||
<code><nowiki><code><nowiki><!-- popup [[File:Desired_Preview_Image.jpg]] --></nowiki><nowiki></code></nowiki>/ | <code><nowiki><code><nowiki><!-- popup [[File:Desired_Preview_Image.jpg]] --></nowiki></nowiki><nowiki></code></nowiki></code> | ||
<pre> | |||
The <pre> tag ignores [[Wiki]] ''markup''. It also doesn't reformat text. It still interprets special characters: → | |||
This example shows how the above markup reference is generated - | |||
<code><nowiki><code><nowiki><!-- popup [[File:Desired_Preview_Image.jpg]] --></nowiki></nowiki><nowiki></code></nowiki></code> | |||
...but quoting the </p r e> tag is more difficult. | |||
</pre> |
Latest revision as of 10:35, 18 November 2022
This page collects tips on how to create good content within the vagaries of the MediaWiki ecosystem. Document Byzantine things and struggles here, and use heading structure appropriately so that items appear in the contents box . Available external help pages are linked to where possible.
Make a new page
Insert a link into an existing page with the name of the new page, save edit, click on link to new page, and lastly edit that new page by clicking "create".
https://en.wikipedia.org/wiki/Help:Wikitext
https://en.wikipedia.org/wiki/Help:Cheatsheet
https://meta.wikimedia.org/wiki/Help:Wikitext_examples
Images
https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax
SVG
Using SVG graphics are preferred mainly for quality, but also file size reasons. SVGs can be compressed with the https://vecta.io/nano tool and also usually compress down again using zip of server HTML compression. (PNG and JPGs do not compress so file size differences can easily be 10x.)
Side bar editing
Edit source on MediaWiki:Sidebar to change sidebar content.
Navigation popups are nice feature, but all too easy to break or make ugly.
Text required at page head
Before any headers, a paragraph of body text is required for the popup to display correctly and not generate an error. This text should summarise the page in a couple of sentences which is what appears in the popup.
Popup images
To make Navigation_popups show an image (which is preferred), the image apparently needs to be included on the page and downloaded on page load -- if a gallery image, for instance, this is not the case.
Use this <!-- popup [[File:Desired_Preview_Image.jpg]] -->
hint in source edit to use any particular image.
Markup
Writing markup and especially writing about markup in markup is maddening.
- Find a good example and use view/edit source (rather than visual editor) to see how things are done.
- Not all/many formatting options are available in visual editor, some things have to be added in source.
<nowiki>...</nowiki>
<nowiki><nowiki>...</nowiki></nowiki>
<code><nowiki><!-- popup [[File:Desired_Preview_Image.jpg]] --></nowiki></code>
The <pre> tag ignores [[Wiki]] ''markup''. It also doesn't reformat text. It still interprets special characters: → This example shows how the above markup reference is generated - <code><code><nowiki><!-- popup [[File:Desired_Preview_Image.jpg]] --></nowiki></code></code> ...but quoting the </p r e> tag is more difficult.