diff --git a/docs/astro.config.mjs b/docs/astro.config.mjs index 42b13d5..a5262b3 100644 --- a/docs/astro.config.mjs +++ b/docs/astro.config.mjs @@ -21,6 +21,8 @@ export default defineConfig({ { label: 'Installation', slug: '' }, { label: 'The Tale of the Three Mages', slug: 'the-tale-of-the-three-mages' }, { label: 'An actual explanation of what is going on here', slug: 'actual-explanation' }, + { label: 'Caveats', slug: 'caveats' }, + { label: 'El funny', slug: 'memes' }, ], plugins: [ catppuccin({ dark: 'mocha-teal', light: 'latte-teal' }), diff --git a/docs/src/assets/another-3-minutes-to-rollup.png b/docs/src/assets/another-3-minutes-to-rollup.png new file mode 100644 index 0000000..a85b025 Binary files /dev/null and b/docs/src/assets/another-3-minutes-to-rollup.png differ diff --git a/docs/src/assets/bernie.png b/docs/src/assets/bernie.png new file mode 100644 index 0000000..e3cec5d Binary files /dev/null and b/docs/src/assets/bernie.png differ diff --git a/docs/src/assets/bush.png b/docs/src/assets/bush.png new file mode 100644 index 0000000..07e71c1 Binary files /dev/null and b/docs/src/assets/bush.png differ diff --git a/docs/src/assets/car.png b/docs/src/assets/car.png new file mode 100644 index 0000000..107d9fb Binary files /dev/null and b/docs/src/assets/car.png differ diff --git a/docs/src/assets/communism.png b/docs/src/assets/communism.png new file mode 100644 index 0000000..dd82252 Binary files /dev/null and b/docs/src/assets/communism.png differ diff --git a/docs/src/assets/feelings-of-power.png b/docs/src/assets/feelings-of-power.png new file mode 100644 index 0000000..f67c7b8 Binary files /dev/null and b/docs/src/assets/feelings-of-power.png differ diff --git a/docs/src/assets/goosebumps.png b/docs/src/assets/goosebumps.png new file mode 100644 index 0000000..e319714 Binary files /dev/null and b/docs/src/assets/goosebumps.png differ diff --git a/docs/src/assets/grim-reaper.png b/docs/src/assets/grim-reaper.png new file mode 100644 index 0000000..02a3389 Binary files /dev/null and b/docs/src/assets/grim-reaper.png differ diff --git a/docs/src/assets/houston.webp b/docs/src/assets/houston.webp deleted file mode 100644 index 930c164..0000000 Binary files a/docs/src/assets/houston.webp and /dev/null differ diff --git a/docs/src/assets/new-woman.png b/docs/src/assets/new-woman.png new file mode 100644 index 0000000..f74620a Binary files /dev/null and b/docs/src/assets/new-woman.png differ diff --git a/docs/src/assets/no-builds.png b/docs/src/assets/no-builds.png new file mode 100644 index 0000000..dcba80d Binary files /dev/null and b/docs/src/assets/no-builds.png differ diff --git a/docs/src/assets/og.jpg b/docs/src/assets/og.jpg new file mode 100644 index 0000000..e8d8803 Binary files /dev/null and b/docs/src/assets/og.jpg differ diff --git a/docs/src/component/TestStyle.astro b/docs/src/component/TestStyle.astro deleted file mode 100644 index e411be2..0000000 --- a/docs/src/component/TestStyle.astro +++ /dev/null @@ -1,8 +0,0 @@ -
- COLOR THIS -
- diff --git a/docs/src/content/docs/actual-explanation.mdx b/docs/src/content/docs/actual-explanation.mdx index 1ecc2fa..c23f30e 100644 --- a/docs/src/content/docs/actual-explanation.mdx +++ b/docs/src/content/docs/actual-explanation.mdx @@ -64,7 +64,9 @@ The cache is saved in `node_modules/.domain-expansion`. ## What about assets? Astro has built-in image optimization. That built-in image optimization adds the resulting asset to your build -output based on calls to the `getImage` function. That function is also used in the `` and `` +output based on calls to the [`getImage` function](https://docs.astro.build/en/guides/images/#generating-images-with-getimage). +That function is also used in the [``](https://docs.astro.build/en/guides/images/#display-optimized-images-with-the-image--component) +and [``](https://docs.astro.build/en/reference/modules/astro-assets/#picture-) components. Domain Expansion detects when that function is called and also adds the parameters that the function was called with to the cache. Whenever we reconstruct a component from the cache, we "replay" all calls to `getImage` such that the image service is called just as if the component was rendered normally. diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 0ae2e27..f828c56 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -3,12 +3,21 @@ title: Domain Expansion description: And they said incremental builds in Astro weren't possible. --- -import { Tabs, TabItem } from '@astrojs/starlight/components'; -import TestStyle from '../../component/TestStyle.astro'; +import { Tabs, TabItem, Badge } from '@astrojs/starlight/components'; - +Domain Expansion is an Astro integration that adds support for incremental builds. Basically, +builds go weee now. -Domain Expansion is an Astro integration that adds support for incremental builds. +## Benchmarks + + + +1. Astro Docs, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) +2. Starlight docs, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) +3. astro.build, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) +4. Astrowind basic install, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) +5. Cloudflare docs, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) +6. StudioCMS/UI Docs, time to build (domain expansion vs domain expansion (no logging) vs default vs default (no logging)) ## Installation @@ -75,6 +84,11 @@ Once the integration has been included in your `astro.config.mjs`, the next time your build will be cached. From that point on, whenever you rebuild your site, only the files that have changed will be rebuilt. +### Even more optimization + +1. Set `logLevel` to `silent` in your `astro.config.mjs` to disable logging. See the [benchmarks](#benchmarks) for more information. +2. Pray that [Rolldown](https://rolldown.rs/) gets released soon. + ## Authors - [Luiz Ferraz](https://github.com/Fryuni) diff --git a/docs/src/content/docs/memes.mdx b/docs/src/content/docs/memes.mdx new file mode 100644 index 0000000..bbedf62 --- /dev/null +++ b/docs/src/content/docs/memes.mdx @@ -0,0 +1,15 @@ +--- +title: El funny +--- + +![Very Domain, Nice Expansion](../../assets/og.jpg) +![Another 3 Minutes to Rollup](../../assets/another-3-minutes-to-rollup.png) +![I am once again asking for faster build times](../../assets/bernie.png) +![They just reduced the Astro Docs build time below 4 minutes](../../assets/bush.png) +![The astro community drifting towards incremental builds](../../assets/car.png) +![Our incremental builds](../../assets/communism.png) +![What gives people feelings of power](../../assets/feelings-of-power.png) +![Astro incremental builds are now a thing](../../assets/goosebumps.png) +![Fryuni as the grim reaper](../../assets/grim-reaper.png) +![Astro community looking at incremental builds](../../assets/new-woman.png) +![Megamind "No incremental builds?"](../../assets/no-builds.png) \ No newline at end of file