grafana / k6-docs

The k6 documentation website.
https://grafana.com/docs/k6/latest/
85 stars 216 forks source link

Add import.meta.resolve documentation #1691

Closed mstoykov closed 1 month ago

mstoykov commented 1 month ago

What?

Add documentation for https://github.com/grafana/k6/pull/3873 and fix eslint to support it.

Checklist

Related PR(s)/Issue(s)

mstoykov commented 1 month ago

I don't really like the current way of the dedupping that means that they are shared documents for all the versions and opted to not try to fix this given the time constraint.

cc @heitortsergent - if you can point me how to reuse any file that will be nice.

heitortsergent commented 1 month ago

Also @mstoykov I didn't understand your comment about the shared documents for all the versions, could you please explain that to me? 🙏

We have this tutorial in the Writers' Toolkit about how to create shared content if that helps: https://grafana.com/docs/writers-toolkit/write/reuse-content/reuse-shared-content/

mstoykov commented 1 month ago

It seems I got confused by the way it is written and taught the shared files were under docs/shared instead of under docs/sources/<version>/shared which in that case means that the ones for v50 aren't the same as the one for v053.

So it is all good ! Sorry for the confusion.

heitortsergent commented 1 month ago

I think the shared files can be in the docs/sources/<version>/shared for version-specific files, or under docs/sources/shared. Is that correct @jdbaldry? 🤓

jdbaldry commented 1 month ago

I think the shared files can be in the docs/sources/<version>/shared for version-specific files, or under docs/sources/shared. Is that correct @jdbaldry? 🤓

I think in theory you can look up in either location. All the directories will be synced to the website repository and you can look up "unversioned" documentation by setting version="".