mesqueeb / is-what

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
https://mesqueeb.github.io/is-what/
MIT License
170 stars 18 forks source link

Add docs website #43

Closed jcbhmr closed 1 year ago

jcbhmr commented 1 year ago

This PR would...

Note that you'd need to make sure that GitHub Pages in Settings tab is set to receive from GitHub Actions. By default it's set to OFF.

image

You can view the website yourself on GitHub Codespaces via the "Code" dropdown on this PR, then run:

npm run build-docs
python -m http.server -d docs/dist

You could change:

I'd recommend adding more extensive JSDoc blocks with @example and other documentation stuff to each of the functions. This would help the doc gen and the tooltip hovers in VSCode and other LSP editors. Here's what isPlainObject() looks like right now:

image

Note that right now "is-what" is terrible for Google SEO since even refinements like "is-what npm" or "is-what github" all are like "What is GitHub?" and "What is npm? A quick intro." instead of this package. 🤣 I think that a website would be a good idea to make a presence for Googlers and also provide valuable documentation overview that is generated from code and doesn't need to be custom-made in the readme. Specifically, examples are CRUCIAL.

mesqueeb commented 1 year ago

@jcbhmr thank you so much

adding more extensive JSDoc blocks with @example and other documentation

made an issue for this: https://github.com/mesqueeb/is-what/issues/45

will this also improve SEO?

jcbhmr commented 1 year ago

You're welcome! Thanks for fixing the mistakes I had 😬 oopsies on me for opening PRs with literal non-working code. my bad.

I think the examples a) make the docs better b) improve knowing what the function does c) document edge cases like null-prototype objects, etc. and c) make the website "full" in the eyes of our GoogleBot overlords so that it ranks higher and is not just a "stub website"