Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How to write Guides

These guides are written in Markdown using mdBook.
There are a couple good tutorials available such as markdowntutorial.com.

If you want to contribute directly, you can visit the repository on GitHub and submit changes by editing the files there and then submitting a Pull request.

Because of how mdBook works and the adjustments we made, many markdown previews won't display correctly. But if you are following good practices and the examples here, it should display just fine on the final site.

If you run into any issues, don't hesitate to ask in our Discord.

Below are a couple of examples on how to use the adjustments we made to mdBook for writing Boktai guides specifically.

Examples

Elemental colors

Used to mark the use of elements. For example on recommended Lenses or Enchantments.
Legible on the Dark themes but on the Light themes they are not exactly great.

  • Sol
    <span class="sol">Sol</span>
  • Luna
    <span class="luna">Luna</span>
  • Dark
    <span class="dark">Dark</span>
  • Flame
    <span class="flame">Flame</span>
  • Frost
    <span class="frost">Frost</span>
  • Earth
    <span class="earth">Earth</span>
  • Cloud
    <span class="cloud">Cloud</span>

Markers

Used to mark headers and strategies. Font color changes on hover.

  • Safety / Backup strat
    <span class="safety">Safety / Backup strat</span>
  • Trap
    <span class="trap">Trap</span>
  • Mission
    <span class="mission">Mission</span>
  • Boss fight
    <span class="boss">Boss fight</span>
  • Purification
    <span class="purification">Purification</span>
  • Puzzle
    <span class="puzzle">Puzzle</span>

Embedded video files

Encoded using:

ffmpeg -i "input.mkv" -vf "scale=2*iw:2*ih:flags=neighbor" -c:v libvpx-vp9 -b:v 0 -crf 38 -row-mt 1 -deadline best -pix_fmt yuv420p -pass 1 -an -f null NUL &&
ffmpeg -i "input.mkv" -vf "scale=2*iw:2*ih:flags=neighbor" -c:v libvpx-vp9 -b:v 0 -crf 38 -row-mt 1 -deadline best -pix_fmt yuv420p -pass 2 -c:a libopus -b:a 96k "output.webm"

Slow to encode and higher quality than needed but videos in guides are never going to be long anyway.

Embedded using:

<video controls muted>
  <source src="./boktai/assets/video/test.webm" type="video/webm" />
</video>

YouTube, Twitch embeds

Make sure the URL is formatted like this:

Set aspect-ratio to the aspect ratio of your video. Usually 16/9 but direct GBA exports are 3/2.
Title is not mandatory but it helps to identify the video when you don't have a markdown preview.

Sadly the embed system of Twitch is terrible and the video will only load if the "parent" parameter in the URL is set and matches the page it's embedded into. For local testing you'll have to set that "parent" parameter to localhost.

YouTube:

<iframe
  style="aspect-ratio: 2/1"
  src="https://www.youtube.com/embed/uHMaErqqU_E"
  title="Boktai 1 28 Dungeons in 2:16:15"
  allowfullscreen
></iframe>

Twitch:

<iframe
  style="aspect-ratio: 16/9"
  src="https://player.twitch.tv/?video=2328442079&parent=shenef.github.io&autoplay=false"
  title="Boktai 1: Any% Normal 2 speedrun in 1:30:06"
  allowfullscreen
></iframe>

Interactive elements

You can use javascript within a book, which allows for some interactivity.
Below is a simple example but theoretically that allows for

  • conditional Guides that show/hide strats based user input
  • inlined tools like calculators, RNG manip helpers, ...
  • etc.

Example:
Write something here:
Then press this to show it as a popup.

Admonishments

These are styled messages that can have an icon, a color, a title and can be collapsible.
Documentation: https://tommilligan.github.io/mdbook-admonish/
Some examples:

Info

A beautifully styled message.

Data loss

The following steps can lead to irrecoverable data corruption.

Box without a title.

Markdown and HTML

Markdown and HTML can be used in the inner content and title.

Tip

Runnable rust code within an admonishment:

fn main() {
  println!("Hello, World!");
}

Collapsible:

Note

Collapsible.

Collapsible with no title:

Collapsible and no title

Table of Contents

The table of contents doesn't work correctly for level 5+ headers, so please avoid those.

ToC Level 4

Lorem ipsum dolor sit amet

ToC Level 5

The header is now smaller than the text and breaks the sidebar on the right.