You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint: react imports are StudlyCased
chore: aligned README.md
ci: added the custom deploy script
chore: align on `docusaurus.config.ts`
ci: align on `.gitlab-ci.yml`
fix: remove `pluginClientRedirects` as it is not being used
fix: avoid warning on broken links
Sometimes when you change branches, certain LFS references may not yet be resolved, in those cases you should just use (such as doing a `git lfs migrate import`):
43
+
44
+
```sh
45
+
git lfs pull
39
46
```
40
47
41
48
## Contributing
@@ -46,15 +53,15 @@ Because we use docusaurus, we can choose to write in markdown, TSX or MDX.
46
53
47
54
Sometimes markdown syntax just doesn't cut it, and HTML syntax needs to be used.
48
55
49
-
While `docusaurus` is flexible, GitHub is not.
56
+
While `docusaurus` is flexible, GitHub/GitLab is not.
50
57
51
-
GitHub will process the markdown and then sanitizes the HTML: https://github.com/github/markup#github-markup.
58
+
GitHub/GitLab will process the markdown and then sanitizes the HTML: https://github.com/github/markup#github-markup.
52
59
53
60
There is a limited set of HTML tags are here: https://github.com/gjtorikian/html-pipeline/blob/03ae30d713199c2562951d627b98b75dc16939e4/lib/html/pipeline/sanitization_filter.rb#L40-L49
54
61
55
62
Furthermore not all attributes are kept. The `style` attribute for example is filtered out.
56
63
57
-
The most common styling attributes to be used will most likely be `align`, `width`, and `height`. See: https://davidwells.io/snippets/how-to-align-images-in-markdown
64
+
The most common styling attributes to be used will most likely be `align`, `width`, and `height`. See: https://davidwells.io/snippets/how-to-align-images-in-markdown
The former is markdown syntax, the latter is HTML tag.
69
76
70
-
In order to maintain portability, we always use absolute paths. This works on both GitHub markdown rendering and also for `docusaurus`.
77
+
In order to maintain portability, we always use absolute paths. This works on both GitHub/GitLab markdown rendering and also for `docusaurus`.
71
78
72
-
On GitHub, which renders the markdown directly, the relative paths are considered relative to the location of the markdown file referencing the path. The absolute paths are considered relative to the root of the project repository. Therefore because `images` directory is located at the project root, it ends up being routable.
79
+
On GitHub/GitLab, which renders the markdown directly, the relative paths are considered relative to the location of the markdown file referencing the path. The absolute paths are considered relative to the root of the project repository. Therefore because `images` directory is located at the project root, it ends up being routable.
73
80
74
81
With `docusaurus`, the absolute paths are looked up relative to `static` directory. Inside the `static` directory we have created symlinks pointing back to `../images`. This allows `docusaurus` to also resolve these paths which will be copied into the `/build/` directory.
75
82
@@ -79,19 +86,19 @@ Note that `docusaurus` doesn't do any special rendering for HTML tags, it uses t
However this does not work in GitHub. So this is not recommended to use.
89
+
However this does not work in GitHub/GitLab. So this is not recommended to use.
83
90
84
91
Therefore if you want to add inline styles to an image and still use markdown syntax so you get the benefit of `docusaurus` asset processing, the styles must be applied outside the image reference in a surrounding tag:
85
92
86
-
```ms
93
+
```md
87
94
<div align="center">
88
95
89
96

90
97
91
98
</div>
92
99
```
93
100
94
-
Take note of the whitespace newlines between, if no newlines are used, GitHub will interpret this as all HTML. Also note that `<p></p>` will not work.
101
+
Take note of the whitespace newlines between, if no newlines are used, GitHub/GitLab will interpret this as all HTML. Also note that `<p></p>` will not work.
95
102
96
103
Note that this won't work for resizing the images unfortunately. You have to apply the `width` attribute directly to the `<img />` tag. See: https://github.com/facebook/docusaurus/discussions/6465 for more information.
0 commit comments