Commit Graph

10 Commits

Author SHA1 Message Date
Aditya Bidwai
0861ba0088 fix(docs): invert vectorized diagram SVGs in dark mode (#27574)
* fix(docs): invert vectorized diagram SVGs in dark mode

* docs(docs): Apply fix as a class

* Add yarn lock to fix CI

---------

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2026-06-24 14:20:57 +10:00
Hamish Willee
1619b9c4e3 docs(docs): fix image rendering in zoom (#27558) 2026-06-04 14:06:06 +10:00
Hamish Willee
3b8019f37a fix(docs): Use vitepress plugin from NPM for dynamic nav bar (#27498)
* fix(docs): bypass VitePress router interception in DynamicNav links

VitePress installs a global click interceptor that catches same-origin
<a> clicks and routes them through Vue Router. Cross-version links
(e.g. /v1.17/en/ from /main/en/) share the origin but are separate
deployments, so Vue Router fails to resolve them and navigation is
silently swallowed. Fix by calling window.location.href directly with
@click.prevent on all nav links.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* refactor(docs): use VitePress internal nav components in DynamicNav

Replace the hand-rolled dropdown/link rendering with VitePress's own
VPNavBarMenuLink, VPNavBarMenuGroup, VPNavScreenMenuLink, and
VPNavScreenMenuGroup. This removes ~140 lines of custom CSS and all
manual click/flyout handling; VitePress styles and VPFlyout behaviour
are inherited for free.

The navigation bug (same-origin links swallowed by Vue Router) is also
fixed by this approach: VPLink classifies any https:// href as external
and renders a plain <a> tag, bypassing the router interceptor entirely.

Remote URL and localStorage key are now read from themeConfig
(dynamicNavUrl, dynamicNavCacheKey) so the component can be dropped
into any VitePress repo with just a config change.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* refactor(docs): derive DynamicNav cache key from URL by default

Use the remote URL as the localStorage key when dynamicNavCacheKey is
not set. This avoids the need to declare a key in config, keeps the
key unique per data source automatically, and means all deployed
versions of a site (same origin, different base paths) naturally share
one cache entry — which is the desired behaviour.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* chore(docs): remove redundant nav:[] from themeConfig

VitePress renders no menu items when nav is omitted, so the explicit
empty array adds no value now that all items come from DynamicNav.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* fix(docs): restore display:flex on DynamicNav bar wrapper

Removing the scoped styles during the VitePress-internal-components
refactor also removed the flex layout on the wrapper div, causing nav
items to stack vertically instead of in a row.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

* refactor(docs): replace local DynamicNav with vp-dynamic-nav npm package

Removes the in-tree DynamicNav.vue and wires up the published
vp-dynamic-nav package instead. navbar.json is imported in config.mjs
and passed as dynamicNavInitial so it remains the single source of
truth for both the initial render and the remote fetch target.

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>

---------

Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
2026-05-29 09:05:11 +10:00
Hamish Willee
0b479adb26 docs(docs): Dynamically fetched navbar (#27489) 2026-05-29 05:56:21 +10:00
Claudio Chies
7ee0c4061f feat(docs):Fix deep-link anchor offset and improve layout stability in Firefox (#27284) 2026-05-06 09:57:01 +10:00
Hamish Willee
cf51a72846 docs:hide non-functional search from home page (#26576) 2026-02-25 20:08:25 +13:00
Hamish Willee
e8fca6e991 uORB docs parser (#24977) 2026-02-05 17:58:45 +11:00
Matthias Grob
2bc04f91f8 docs: fix all end of file newlines
Note: Some files are autogenerated and I did not yet
go through each source of generation to fix it there.
Instead I adjusted the filter to only exclude those
such that we can fix things in steps.
2025-06-26 11:03:23 -07:00
Hamish Willee
873f704ae3 docs_deploy.yml - update to create backup and always be single release (#24781)
* docs_deploy.yml - update to create backup and always be single release

* Add build time variable to make it easier to confirm last successful deploy
2025-04-30 15:50:49 +10:00
Hamish Willee
88d623bedb Move PX4 Guide source into /docs (#24490)
* Add vitepress tree

* Update existing workflows so they dont trigger on changes in the docs path

* Add nojekyll, package.json, LICENCE etc

* Add crowdin docs upload/download scripts

* Add docs flaw checker workflows

* Used docs prefix for docs workflows

* Crowdin obvious fixes

* ci: docs move to self hosted runner

runs on a beefy server for faster builds

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci: don't run build action for docs or ci changes

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* ci: update runners

Signed-off-by: Ramon Roche <mrpollo@gmail.com>

* Add docs/en

* Add docs assets and scripts

* Fix up editlinks to point to PX4 sources

* Download just the translations that are supported

* Add translation sources for zh, uk, ko

* Update latest tranlsation and uorb graphs

* update vitepress to latest

---------

Signed-off-by: Ramon Roche <mrpollo@gmail.com>
Co-authored-by: Ramon Roche <mrpollo@gmail.com>
2025-03-13 16:08:27 +11:00