refactor: use .nav.yml to define page order instead of nav weights (#1000)

This commit is contained in:
Juro Oravec 2025-02-23 22:44:12 +01:00 committed by GitHub
parent f36581ed86
commit d5e45125dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
57 changed files with 95 additions and 231 deletions

View file

@ -0,0 +1,11 @@
# `.nav.yml` is provided by https://lukasgeiter.github.io/mkdocs-awesome-nav
nav:
- Rendering JS / CSS: rendering_js_css.md
- HTML fragments: html_fragments.md
- Prop drilling and provide / inject: provide_inject.md
- Lifecycle hooks: hooks.md
- Registering components: component_registry.md
- Typing and validation: typing_and_validation.md
- Custom template tags: template_tags.md
- Tag formatters: tag_formatter.md
- Authoring component libraries: authoring_component_libraries.md

View file

@ -1,8 +1,3 @@
---
title: Authoring component libraries
weight: 9
---
You can publish and share your components for others to use. Below you will find the steps to do so.
For live examples, see the [Community examples](../../overview/community.md#community-examples).

View file

@ -1,8 +1,3 @@
---
title: Registering components
weight: 5
---
In previous examples you could repeatedly see us using `@register()` to "register"
the components. In this section we dive deeper into what it actually means and how you can
manage (add or remove) components.

View file

@ -1,8 +1,3 @@
---
title: Lifecycle hooks
weight: 4
---
_New in version 0.96_
Component hooks are functions that allow you to intercept the rendering process at specific positions.

View file

@ -1,8 +1,3 @@
---
title: HTML fragments
weight: 2
---
Django-components provides a seamless integration with HTML fragments ([HTML over the wire](https://hotwired.dev/)),
whether you're using HTMX, AlpineJS, or vanilla JavaScript.

View file

@ -1,8 +1,3 @@
---
title: Prop drilling and provide / inject
weight: 3
---
_New in version 0.80_:
Django components supports the provide / inject or ContextProvider pattern with the combination of:

View file

@ -1,8 +1,3 @@
---
title: Rendering JS / CSS
weight: 1
---
### JS and CSS output locations
If:

View file

@ -1,8 +1,3 @@
---
title: Tag formatters
weight: 8
---
## Customizing component tags with TagFormatter
_New in version 0.89_

View file

@ -1,8 +1,3 @@
---
title: Custom template tags
weight: 7
---
Template tags introduced by django-components, such as `{% component %}` and `{% slot %}`,
offer additional features over the default Django template tags:

View file

@ -1,8 +1,3 @@
---
title: Typing and validation
weight: 6
---
## Adding type hints with Generics
_New in version 0.92_