Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| batocera_wiki_code_snippets [2021/09/25 01:37] – renamed title to "Batocera Wiki Code Snippets/Templates" and added templates from good wiki editing practices atari | batocera_wiki_code_snippets [2023/10/20 06:02] (current) – [Embedded images]: Explain how to avoid font issues in SVG ssokolow | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Batocera Wiki Code Snippets/ | ====== Batocera Wiki Code Snippets/ | ||
| + | |||
| + | <WRAP center round tip> | ||
| + | A cheat-sheet can be found [[wiki: | ||
| + | </ | ||
| + | |||
| ===== In-links ===== | ===== In-links ===== | ||
| Line 49: | Line 54: | ||
| <WRAP center round tip 60%> | <WRAP center round tip 60%> | ||
| You can always click the little " | You can always click the little " | ||
| + | </ | ||
| + | |||
| + | ===== Inter-wiki links ===== | ||
| + | |||
| + | Let's face it, Wikipedia is a great source of information for technical aspects at times. If you ever need to link to a Wikipedia page specifically, | ||
| + | |||
| + | [[wp> | ||
| + | |||
| + | which is invoked by | ||
| + | |||
| + | < | ||
| + | [[wp> | ||
| + | </ | ||
| + | |||
| + | Note that you don't need to include the full URL, just the Wikipedia page title. It also appears with the Wikipedia icon, isn't that neat? | ||
| + | |||
| + | This also works for embedding Youtube videos using only their video ID, like so: | ||
| + | |||
| + | {{youtube> | ||
| + | |||
| + | which is invoked by | ||
| + | |||
| + | < | ||
| + | {{youtube> | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important> | ||
| + | Currently, embedding Youtube links is bugged. When the mouse hovers over the " | ||
| </ | </ | ||
| Line 74: | Line 107: | ||
| Sample SVG file: | Sample SVG file: | ||
| - | {{: | + | {{: |
| - | ===== Inter-wiki links ===== | + | The wiki's media manager can actually accept SVG files even though it doesn' |
| - | Let's face it, Wikipedia | + | However, by using the official DokuWiki [[https:// |
| - | [[wp> | + | [{{ wiki: |
| - | which is invoked by | + | [{{ wiki: |
| + | |||
| + | ===== Embedded videos ===== | ||
| + | |||
| + | It is recommended to convert the video to a WEBM with a resolution of 655x368 to prepare it for embedding into the wiki page and not have interruptions during playback. With that said, the wiki supports many video formats (check what you can upload in the media uploading tool) and the resolution will always be downscaled to whatever size you specify in the embed code itself. For example: | ||
| < | < | ||
| - | [[wp> | + | {{URL-to-video? |
| </ | </ | ||
| - | Note that you don't need to include | + | This would result in the video looking similar to this: |
| + | |||
| + | {{blog: | ||
| + | |||
| + | <WRAP center round tip> | ||
| + | A quick way to record videos from Batocera itself is to sign in via SSH and run the '' | ||
| + | </ | ||
| ===== Unformatted code ===== | ===== Unformatted code ===== | ||
| Line 189: | Line 232: | ||
| Genesis plus GX, Master system/ | Genesis plus GX, Master system/ | ||
| </ | </ | ||
| + | |||
| + | ===== Adding a collapsible section ===== | ||
| + | |||
| + | With the addition of the collapsible sidebar via the [[https:// | ||
| + | |||
| + | The beginning of a section has to be marked with %%--> Title%%'' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Sections can be closed by using %%<--%% on a new line. Sections can also be nested. Example: | ||
| + | |||
| + | < | ||
| + | --> Section 1 without preview (recommended)# | ||
| + | |||
| + | First level content. This can be pretty much anything. | ||
| + | * If ending with an list such as a bullet list, remember to add one space after the list so as to avoid syntax errors, like so: | ||
| + | |||
| + | --> Second level nested section# | ||
| + | |||
| + | Second level content. It's also just good practice to use a spare extra line when closing a section, though it's not always necessary. | ||
| + | |||
| + | <-- | ||
| + | |||
| + | First level content continues. | ||
| + | |||
| + | <-- | ||
| + | |||
| + | --> [[: | ||
| + | |||
| + | If the user clicks the blue text, they will both simultaneously open the section and be taken to the linked page. If the instead click only the box around the text, they will just open the text instead. This is really only useful for the sidebar. Does not work with section-specific in-links (ones that require a %%#%%), as that conflicts with the '' | ||
| + | |||
| + | --> [[: | ||
| + | |||
| + | Notice how it instead shows the syntax instead of actually linking? | ||
| + | |||
| + | <-- | ||
| + | |||
| + | <-- | ||
| + | |||
| + | --> Section with a preview on hover. Not recommended for general use. | ||
| + | |||
| + | Here's a bunch of text in some code. | ||
| + | |||
| + | <-- | ||
| + | </ | ||
| + | |||
| + | which would appear like so: | ||
| + | |||
| + | --> Section 1 without preview (recommended)# | ||
| + | |||
| + | First level content. This can be pretty much anything. | ||
| + | * If ending with an list such as a bullet list, remember to add one space after the list so as to avoid syntax errors, like so: | ||
| + | |||
| + | --> Second level nested section# | ||
| + | |||
| + | Second level content. It's also just good practice to use a spare extra line when closing a section, though it's not always necessary. | ||
| + | |||
| + | <-- | ||
| + | |||
| + | First level content continues. | ||
| + | |||
| + | <-- | ||
| + | |||
| + | --> [[: | ||
| + | |||
| + | If the user clicks the blue text, they will both simultaneously open the section and be taken to the linked page. If the instead click only the box around the text, they will just open the text instead. This is really only useful for the sidebar. Does not work with section-specific in-links (ones that require a %%#%%), as that conflicts with the '' | ||
| + | |||
| + | --> [[: | ||
| + | |||
| + | Notice how it instead shows the syntax instead of actually linking? | ||
| + | |||
| + | <-- | ||
| + | |||
| + | <-- | ||
| + | |||
| + | --> Section with a preview on hover. Not recommended for general use. | ||
| + | |||
| + | Here's a bunch of text in some code. | ||
| + | |||
| + | <-- | ||
| + | |||
| + | ===== File tree ASCII art ===== | ||
| + | |||
| + | When you need to display a folder' | ||
| + | |||
| + | < | ||
| + | roms/ | ||
| + | ├─ psx/ | ||
| + | │ ├─ Final Fantasy VII (Disc 1).bin | ||
| + | │ └─ Final Fantasy VII (Disc 1).cue | ||
| + | └─ Final Fantasy VII (Disc 1).m3u | ||
| + | </ | ||
| + | |||
| + | Although it may be fun to write these out yourself, an automatic tool to create them is available at https:// | ||
| ===== CSV SAMPLE OUTPUT GOOGLE ===== | ===== CSV SAMPLE OUTPUT GOOGLE ===== | ||
| Line 211: | Line 350: | ||
| - Copy the link (check it ends with output=csv) and paste it into your dokuwiki CSV table using the file= attribute described above. | - Copy the link (check it ends with output=csv) and paste it into your dokuwiki CSV table using the file= attribute described above. | ||
| </ | </ | ||
| + | |||
| + | ===== Embed a website into a wiki page ===== | ||
| + | |||
| + | Batocera wiki supports iframes, showing another web page inside of the article. Simple example: | ||
| + | |||
| + | < | ||
| + | {{url> | ||
| + | </ | ||
| + | |||
| + | Full syntax: | ||
| + | |||
| + | < | ||
| + | {{url> | ||
| + | </ | ||
| + | |||
| + | Javascript URLs are not supported. More info at https:// | ||
| ===== Templates ===== | ===== Templates ===== | ||
| Line 238: | Line 393: | ||
| * GRID List View -> themename_grid | * GRID List View -> themename_grid | ||
| * Resolution 1920x1080 | * Resolution 1920x1080 | ||
| - | |||
| - | ==== EMULATOR HEAD PAGE ==== | ||
| - | |||
| - | <WRAP center round box 100%> | ||
| - | {{ : | ||
| - | |||
| - | ====== DOKUWIKI-Dokumentation System ====== | ||
| - | |||
| - | <csv> | ||
| - | Emulator, ROM Folder, Extension, BIOS, Config [and/or Savestates] | ||
| - | lr-lbrpdx, / | ||
| - | </ | ||
| - | </ | ||
| - | |||
| - | < | ||
| - | {{ : | ||
| - | |||
| - | ======= SYSTEMNAME ======= | ||
| - | |||
| - | <csv> | ||
| - | Emulator, ROM Folder, Extension, BIOS, Config [and/or Savestates] | ||
| - | lr-xxxx, / | ||
| - | </ | ||
| - | </ | ||
- batocera_wiki_code_snippets.1632533868.txt.gz
- Last modified: 5 years ago
- by atari