diff options
author | 2022-08-08 14:07:38 -0300 | |
---|---|---|
committer | 2022-08-08 12:07:38 -0500 | |
commit | 9894b3dcde876bdc81cd207e40cf7f9023d8fdfa (patch) | |
tree | c154014176f0bcb4a2b37aa6e92a37d673f43565 /packages/integrations/prefetch | |
parent | 2c71a992021633e9569e36e91550fdf34606d9e7 (diff) | |
download | astro-9894b3dcde876bdc81cd207e40cf7f9023d8fdfa.tar.gz astro-9894b3dcde876bdc81cd207e40cf7f9023d8fdfa.tar.zst astro-9894b3dcde876bdc81cd207e40cf7f9023d8fdfa.zip |
remove details tags from integration READMEs (#4198)
Diffstat (limited to 'packages/integrations/prefetch')
-rw-r--r-- | packages/integrations/prefetch/README.md | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/packages/integrations/prefetch/README.md b/packages/integrations/prefetch/README.md index d9225e038..4fc1f3536 100644 --- a/packages/integrations/prefetch/README.md +++ b/packages/integrations/prefetch/README.md @@ -16,27 +16,24 @@ To further improve the experience, especially on similar pages, stylesheets are ## Installation -<details> - <summary>Quick Install</summary> +### Quick Install The `astro add` command-line tool automates the installation for you. Run one of the following commands in a new terminal window. (If you aren't sure which package manager you're using, run the first command.) Then, follow the prompts, and type "y" in the terminal (meaning "yes") for each one. - ```sh - # Using NPM - npx astro add prefetch - # Using Yarn - yarn astro add prefetch - # Using PNPM - pnpx astro add prefetch - ``` +```sh +# Using NPM +npx astro add prefetch +# Using Yarn +yarn astro add prefetch +# Using PNPM +pnpx astro add prefetch +``` Then, restart the dev server by typing `CTRL-C` and then `npm run astro dev` in the terminal window that was running Astro. Because this command is new, it might not properly set things up. If that happens, [feel free to log an issue on our GitHub](https://github.com/withastro/astro/issues) and try the manual installation steps below. -</details> -<details> - <summary>Manual Install</summary> +### Manual Install First, install the `@astrojs/prefetch` package using your package manager. If you're using npm or aren't sure, run this in the terminal: ```sh @@ -56,7 +53,6 @@ export default { ``` Then, restart the dev server. -</details> ## Usage @@ -66,8 +62,7 @@ When you install the integration, the prefetch script is automatically added to The Astro Prefetch integration handles which links on the site are prefetched and it has its own options. Change these in the `astro.config.mjs` file which is where your project's integration settings live. -<details> - <summary><strong>config.selector</strong></summary> +### config.selector By default the prefetch script searches the page for any links that include a `rel="prefetch"` attribute, ex: `<a rel="prefetch" />` or `<a rel="nofollow prefetch" />`. This behavior can be changed in your `astro.config.*` file to use a custom query selector when finding prefetch links. @@ -82,10 +77,7 @@ export default { })], } ``` -</details> - -<details> - <summary><strong>config.throttle</strong></summary> +### config.throttle By default the prefetch script will only prefetch one link at a time. This behavior can be changed in your `astro.config.*` file to increase the limit for concurrent downloads. @@ -100,7 +92,6 @@ export default { })], } ``` -</details> ## Troubleshooting - If your installation doesn't seem to be working, make sure to restart the dev server. |