useful-wiki-features.mdx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. ---
  2. sidebar_position: 4
  3. ---
  4. import {YouTube, Twitch} from 'mdx-embed'
  5. # Useful wiki features
  6. This page will go over some of the main features you can use to format and present information in the wiki.
  7. Feel free to reference from the official [Docusaurus Guide](https://docusaurus.io/docs/markdown-features) (link to the markdown features page) as well.
  8. ## Code
  9. ### Code block
  10. ````
  11. ```
  12. balls
  13. ```
  14. ````
  15. ### Inline Code
  16. ```
  17. `inline code`
  18. ```
  19. (looks like this): `inline code`
  20. ## Admonitions
  21. ### How-to
  22. To make an admonition, you do something like this:
  23. ```
  24. :::note
  25. Sample Text
  26. :::
  27. ```
  28. Which turns into this:
  29. :::note
  30. Sample Text
  31. :::
  32. ### Standard Admonitions
  33. :::note
  34. :::
  35. :::tip
  36. :::
  37. :::info
  38. :::
  39. :::caution
  40. :::
  41. :::danger
  42. :::
  43. ### Custom ones for labeling strat difficulty (stolen from Titanfall 2 wiki xd)
  44. :::diffe
  45. this one is called `diffe`
  46. :::
  47. :::diffm
  48. this one is called `diffm`
  49. :::
  50. :::diffh
  51. this one is called `diffh`
  52. :::
  53. ### Custom admonition title text
  54. You can make these have custom titles instead of the default by putting words in brackets at the end:
  55. ```
  56. :::info[COCK AND BALL TORTURE]
  57. test
  58. :::
  59. ```
  60. :::info[COCK AND BALL TORTURE]
  61. test
  62. :::
  63. ### Nesting admonitions
  64. Read [here](https://docusaurus.io/docs/markdown-features/admonitions#nested-admonitions)
  65. ## Video Embeds
  66. This is a two step thing:
  67. At the top of the page you'll have to insert this (replace `YouTube` with `Twitch` if needed). You can also do `{YouTube, Twitch}` if you plan to embed videos from both sites on the same page.
  68. ```
  69. import {YouTube} from 'mdx-embed'
  70. ```
  71. After this, when you want to embed a YouTube or Twitch video, you write something like this (obviously replace the id with the one from your video of choice):
  72. ```
  73. <YouTube youTubeId="ULYV5wadhNQ"/>
  74. <Twitch twitchId="1980957789"/>
  75. ```
  76. If you were to copy and paste the YouTube line, you'd get this:
  77. <YouTube youTubeId="ULYV5wadhNQ"/>
  78. ## Image Embeds
  79. You can embed external images with normal markdown syntax:
  80. ```
  81. ![epic image](https://i.imgur.com/gjUlkjt.png)
  82. ```
  83. However, it's preferred that we keep everything in the repository so that we don't have to worry about external files potentially getting deleted or becoming inaccessible for any reason.
  84. This can be achieved by putting the image in the repo, ~~either in a central folder (let's say `assets`),~~ or in a subfolder of the current folder (named `img`). Both are arbitrary, dunno which is easier/better to work with overall. **For now we'll stick to subfolders named `img`**
  85. Either way, you can then reference the image with a relative path. For example, if I put an image in a subfolder of the current folder where this markdown file resides (and the subfolder is named `img`), it would look like this:
  86. ```
  87. ![epic image](./img/TopGPeakAlphaSigmaMale.jpg)
  88. ```
  89. Try to keep everything as `jpg` rather than `png`. Additionally, do not use `gif`, please use `webp` instead.
  90. ![epic image](./img/TopGPeakAlphaSigmaMale.jpg)