ml5js / ml5-website-v02-docsify

This repository is a work-in-progress website, containing documentation and reference materials for the ml5.js library models.
https://docs.ml5js.org/
Other
1 stars 11 forks source link

Add topMargin property in window.$docsify for better layout #70

Open alanvww opened 7 months ago

alanvww commented 7 months ago

Hi folks, for the current docsify page, there is an issue that when the user uses the section links in the sidebar, the scroll offset is not ideal. CleanShot 2024-04-16 at 14 40 31

After some research, there is a option called "topMargin" in docsify can solve this problem.

in index.html

<script>
window.$docsify = {
    ......
    topMargin: 30,
.........
</script>

after this option applied

CleanShot 2024-04-16 at 14 44 29

Related https://github.com/ml5js/ml5-website-v02-docsify/issues/68

QuinnHe commented 7 months ago

Thanks, @alanvww! Love it! Feel free to create a PR and we will merge your changes to the main. cc @MOQN

alanvww commented 7 months ago

Thanks, @alanvww! Love it! Feel free to create a PR and we will merge your changes to the main. cc @MOQN

Done! Sorry for the reformatting of the files :( I Please use the "ignore whitespace" when reviewing the code.

71