From 35a91028a3c434487e9081928278d3886b6110d5 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 27 Aug 2024 05:36:46 -0700 Subject: [PATCH 1/3] docs: Merge intro into index The intro.md page and the index.md page were very similar in content. Merge the two together, further polish the content, and redirect the old intro.md page to index.md. --- docs/mkdocs.yml | 11 ++++++++++- docs/src/index.md | 35 ++++++++++++++++++++++++++++++----- docs/src/intro.md | 12 ------------ 3 files changed, 40 insertions(+), 18 deletions(-) delete mode 100644 docs/src/intro.md 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..cc6cbc359 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's 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 and 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). From 808fba7d988ccc7ae6e18a1687b0cc229a080778 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 27 Aug 2024 07:23:40 -0700 Subject: [PATCH 2/3] Update docs/src/index.md Co-authored-by: Jacob Oaks --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index cc6cbc359..13a6af6b5 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -11,7 +11,7 @@ Fx is **a dependency injection system for Go**. 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's to manage the lifecycle of your application. + instead relying on Fx to manage the lifecycle of your application. - **Reduce boilerplate** From 6b2a121a32a8bc6c9345172c29818c5e28711c28 Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Tue, 27 Aug 2024 07:23:50 -0700 Subject: [PATCH 3/3] Update docs/src/index.md Co-authored-by: Jacob Oaks --- docs/src/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/index.md b/docs/src/index.md index 13a6af6b5..eca333518 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -18,7 +18,7 @@ Fx is **a dependency injection system for Go**. --- Fx reduces the amount of code copy-pasted across your services. - It lets you define shared application setup and in a single place, + It lets you define shared application setup in a single place, and then reuse it across all your services. - **Automatic plumbing**