diff --git a/packages/create-docusaurus/templates/shared/README.md b/packages/create-docusaurus/templates/shared/README.md index b28211a9bbd2..bce6eb2fc108 100644 --- a/packages/create-docusaurus/templates/shared/README.md +++ b/packages/create-docusaurus/templates/shared/README.md @@ -5,13 +5,15 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati ## Installation ```bash -yarn +npm install ``` +**Note**: feel free to use the package manager of your choice. + ## Local Development ```bash -yarn start +npm run start ``` This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. @@ -19,7 +21,7 @@ This command starts a local development server and opens up a browser window. Mo ## Build ```bash -yarn build +npm run build ``` This command generates static content into the `build` directory and can be served using any static contents hosting service. @@ -29,13 +31,13 @@ This command generates static content into the `build` directory and can be serv Using SSH: ```bash -USE_SSH=true yarn deploy +USE_SSH=true npm run deploy ``` Not using SSH: ```bash -GIT_USER= yarn deploy +GIT_USER= npm run deploy ``` -If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. +If you are using GitHub Pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. diff --git a/website/docs/api/plugins/plugin-ideal-image.mdx b/website/docs/api/plugins/plugin-ideal-image.mdx index aaaa9d026ccc..1ba4c41b18ad 100644 --- a/website/docs/api/plugins/plugin-ideal-image.mdx +++ b/website/docs/api/plugins/plugin-ideal-image.mdx @@ -36,6 +36,25 @@ import thumbnail from './path/to/img.png'; ``` +:::note + +When `plugin-ideal-image` is installed, importing a supported image file no longer returns a plain URL string. Instead, it returns an object with the shape: `{ preSrc: string, src: { src: string, width: number, height: number } }`. + +If you need to use the image in a standard `` tag, access it like this: + +```jsx +description +``` + +To avoid dealing with this object shape directly, it is recommended to use the `` component provided by this plugin instead. + +::: + :::warning This plugin registers a [Webpack loader](https://webpack.js.org/loaders/) that changes the type of imported/require images: diff --git a/website/docs/deployment.mdx b/website/docs/deployment.mdx index de114761a0f6..a7ddcdd97c0d 100644 --- a/website/docs/deployment.mdx +++ b/website/docs/deployment.mdx @@ -401,7 +401,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: npm - name: Install dependencies @@ -455,7 +455,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: npm - name: Install dependencies @@ -487,7 +487,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: yarn - name: Install dependencies @@ -541,7 +541,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: yarn - name: Install dependencies @@ -608,7 +608,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: yarn - name: Install dependencies run: yarn install --frozen-lockfile @@ -623,7 +623,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 cache: yarn - uses: webfactory/ssh-agent@v0.5.0 with: @@ -675,7 +675,7 @@ Continuous integration (CI) services are typically used to perform routine tasks ```yml title=".travis.yml" language: node_js node_js: - - 20 + - 24 branches: only: - main @@ -734,7 +734,7 @@ steps: - task: NodeTool@0 inputs: - versionSpec: '20' + versionSpec: '24' displayName: Install Node.js - script: |