diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 383f22451..0b89b4026 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -87,6 +87,7 @@ plugins: # Redirect old links to new ones. - redirects: redirect_maps: + intro.md: index.md value-groups.md: value-groups/index.md @@ -121,6 +122,15 @@ markdown_extensions: kwds: case: lower + # :foo-bar: emoji syntax. + # + # See https://squidfunk.github.io/mkdocs-material/reference/icons-emojis/ + # to search through available emojis. + # The emojis are rendered into inline svgs at build time. + - pymdownx.emoji: + emoji_index: !!python/name:material.extensions.emoji.twemoji + emoji_generator: !!python/name:material.extensions.emoji.to_svg + # GitHub-style task lists. - pymdownx.tasklist: custom_checkbox: true # recommended @@ -141,7 +151,6 @@ nav: - get-started/another-handler.md - get-started/many-handlers.md - get-started/conclusion.md - - intro.md - Concepts: - Container: container.md - Lifecycle: lifecycle.md diff --git a/docs/src/index.md b/docs/src/index.md index 4d2ecc1ae..eca333518 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -6,14 +6,39 @@ Fx is **a dependency injection system for Go**. - **Eliminate globals** - Fx helps you remove global state from your application. - No more `init()` or global variables. - Use Fx-managed singletons. + --- + + By using Fx-managed singletons, + you can eliminate global state from your application. + With Fx, you don't have to rely on `init()` functions for setup, + instead relying on Fx to manage the lifecycle of your application. + +- **Reduce boilerplate** + + --- + + Fx reduces the amount of code copy-pasted across your services. + It lets you define shared application setup in a single place, + and then reuse it across all your services. + +- **Automatic plumbing** + + --- + + Fx automatically constructs your application's dependency graph. + A component added to the application can be used by any other component + without any additional configuration. + + [Learn more about the dependency container :material-arrow-right:](container.md) - **Code reuse** + --- + Fx lets teams within your organization build loosely-coupled - and well-integrated shareable components. + and well-integrated shareable components referred to as modules. + + [Learn more about modules :material-arrow-right:](modules.md) - **Battle-tested** @@ -21,4 +46,4 @@ Fx is **a dependency injection system for Go**. -[Get started](get-started/index.md){ .md-button .md-button--primary } +[Get started :material-arrow-right-bold:](get-started/index.md){ .md-button .md-button--primary } diff --git a/docs/src/intro.md b/docs/src/intro.md deleted file mode 100644 index ec7d47ca4..000000000 --- a/docs/src/intro.md +++ /dev/null @@ -1,12 +0,0 @@ -# Introduction - -Fx is a dependency injection system for Go. -With Fx you can: - -- reduce boilerplate in setting up your application -- eliminate global state in your application -- add new components and have them instantly accessible across the application -- build general purpose shareable modules that just work - -If this is your first time with Fx, -check out our [getting started tutorial](get-started/index.md).