NativeScript / docs-v8

https://docs.nativescript.org
29 stars 42 forks source link

Fix biometrics and fingerprint-auth broken links #76

Closed minhnhut closed 2 years ago

minhnhut commented 2 years ago

Fix two broken links on plugins/biometrics and plugins/fingerprint-auth

cla-bot[bot] commented 2 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign the CLA at https://www.nativescript.org/cla. CLA has not been signed by users: @minhnhut. After signing the CLA, you can ask me to recheck this PR by posting @cla-bot check as a comment to the PR.

minhnhut commented 2 years ago

@cla-bot check

cla-bot[bot] commented 2 years ago

The cla-bot has been summoned, and re-checked this pull request!

rigor789 commented 2 years ago

Thanks for the fixes, this is not too clear but these markdown files are updated daily from the plugins repo (in a CI job) - so any change like this should go into the plugins repo instead - since the change would otherwise be overridden the next time the CI job runs.

https://github.com/NativeScript/plugins https://github.com/NativeScript/plugins/tree/main/packages/biometrics https://github.com/NativeScript/plugins/tree/main/packages/fingerprint-auth

For these links to work on the website as well as GitHub - it would probably make sense to use a full url like https://docs.nativescript.org/plugins/biometrics.html

minhnhut commented 2 years ago

@rigor789 could you point me to that CI job script?

On package's README, I see link was: https://github.com/NativeScript/plugins/blob/main/packages/fingerprint-auth

What logic is applied when CI run? It replaces the "blob/main/packages" to ".."?

minhnhut commented 2 years ago

I think we should avoid full url: "https://docs.nativescript.org/plugins/biometrics.html", that final URL should be decided by CI job when it generate HTML site. In case of doc site is down, everyone can still always have a nice working docs in Markdown format on Github.

rigor789 commented 2 years ago

@minhnhut we are reading the raw markdown file from GitHub, where the link is ../ (if you right clicked and copied link - that's different, because GitHub does post-processing when rendering the markdown):

https://github.com/NativeScript/plugins/blob/f6f4a863459e1aefdfa84ec5cd193586c1321ada/packages/biometrics/README.md?plain=1#L9

Screenshot 2022-03-18 at 9 57 18 PM

The workflow is here: https://github.com/NativeScript/docs-new/blob/develop/.github/workflows/scrape-plugins.yml

But we basically just run the script yarn scrape.plugins: https://github.com/NativeScript/docs-new/blob/develop/scripts/plugin-scraper.mjs

A new transformer could be added to catch cases like these, but it should be fine to just link to https://docs.nativescript.org/plugins/biometrics.html and the other one...

rigor789 commented 2 years ago

Closing as per the notes above.