chore: upgrade @acid-info/docusaurus-remote-content and update README.md
This commit is contained in:
parent
f698a892c7
commit
81fca3e19e
44
README.md
44
README.md
|
@ -89,6 +89,50 @@ For additional customization options, please refer to the [Docusaurus Configurat
|
|||
To add a document, create a `.md` or `mdx` file within the `docs` directory. You can use [Frontmatter](https://docusaurus.io/docs/markdown-features#front-matter) to add metadata to your markdown file.
|
||||
|
||||
|
||||
This repository extends content of the [Logos Brand Guidelines](https://github.com/acid-info/guide.logos.co) by leveraging the [Docusaurus Remote Content plugin](https://github.com/acid-info/logos-docusaurus-plugins/tree/main/packages/docusaurus-remote-content). The plugin downloads the content from the remote repository into this repository. To retrieve the content, run the following command:
|
||||
|
||||
```bash
|
||||
yarn docusaurus remote-content download
|
||||
```
|
||||
|
||||
This command automatically downloads content from the remote repository, replacing the local content in the `docs` directory and static files located in the `static` directory. However, if you wish to retain specific local files, follow these steps:
|
||||
|
||||
1. Open `docusaurus.config.js` in your project.
|
||||
|
||||
2. Locate the configuration for the `@acid-info/docusaurus-remote-content` plugin.
|
||||
|
||||
3. Add the paths of the local files you want to keep to either the `keepLocal` or `keepStatic` properties.
|
||||
|
||||
- Paths in `keepLocal` should be relative to the `docs` directory at the root of this repository.
|
||||
- Paths in `keepStatic` should be relative to the `static` directory at the root of this repository.
|
||||
|
||||
Here are some examples using glob patterns:
|
||||
|
||||
- To keep a single file: `./visual-language/logo.mdx`
|
||||
- To keep an entire directory: `./visual-language/**/*`
|
||||
|
||||
If you want to exclude specific files or directories from being copied from the remote repository, use the `excludeRemote` property. For instance, to exclude the `./visual-language/lsd/` directory, modify the plugin configuration as follows:
|
||||
|
||||
```javascript
|
||||
plugins: [
|
||||
[
|
||||
'@acid-info/docusaurus-remote-content',
|
||||
/** @type {import('@acid-info/docusaurus-remote-content').PluginOptions} */
|
||||
({
|
||||
remote: {
|
||||
type: 'zip',
|
||||
url:
|
||||
'https://github.com/acid-info/guide.logos.co/archive/refs/heads/develop.zip',
|
||||
dir: 'guide.logos.co-develop',
|
||||
},
|
||||
outDir: 'docs',
|
||||
sourceDir: 'docs',
|
||||
excludeRemote: ['./visual-language/lsd/**/*']
|
||||
}),
|
||||
],
|
||||
],
|
||||
```
|
||||
|
||||
## Docusaurus Config
|
||||
|
||||
You can find instructions for adding additional documentation sections, implementing localization, and managing versioning on the [Docusaurus](https://docusaurus.io/docs) website.
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
require('dotenv').config()
|
||||
|
||||
const downloadRemoteContent =
|
||||
process.env.SKIP_DOWNLOAD !== '1' && process.env.NODE_ENV !== 'production'
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Waku',
|
||||
|
@ -56,13 +53,11 @@ const config = {
|
|||
'@docusaurus/plugin-ideal-image',
|
||||
{
|
||||
quality: 100,
|
||||
max: 1080,
|
||||
min: 400,
|
||||
steps: 2,
|
||||
sizes: [400],
|
||||
disableInDev: true,
|
||||
},
|
||||
],
|
||||
(downloadRemoteContent && [
|
||||
[
|
||||
'@acid-info/docusaurus-remote-content',
|
||||
/** @type {import('@acid-info/docusaurus-remote-content').PluginOptions} */
|
||||
({
|
||||
|
@ -77,7 +72,7 @@ const config = {
|
|||
keepLocal: ['./visual-language/logo.mdx'],
|
||||
keepStatic: ['waku/**/*'],
|
||||
}),
|
||||
]),
|
||||
],
|
||||
],
|
||||
|
||||
themes: [
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"typecheck": "tsc"
|
||||
},
|
||||
"dependencies": {
|
||||
"@acid-info/docusaurus-remote-content": "^1.0.0-alpha.124",
|
||||
"@acid-info/docusaurus-remote-content": "^1.0.0-alpha.128",
|
||||
"@acid-info/logos-docusaurus-brand-guidelines-theme": "^1.0.0-alpha.123",
|
||||
"@acid-info/logos-docusaurus-preset": "^1.0.0-alpha.121",
|
||||
"@docusaurus/plugin-ideal-image": "2.4.1",
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
satori "^0.10.1"
|
||||
sharp "^0.32.1"
|
||||
|
||||
"@acid-info/docusaurus-remote-content@^1.0.0-alpha.124":
|
||||
version "1.0.0-alpha.124"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/docusaurus-remote-content/-/docusaurus-remote-content-1.0.0-alpha.124.tgz#93e67cee5cf046a4a6c4ffbb5e38a67b28357c27"
|
||||
integrity sha512-WAjTpZwvPGVAgNKXAC/1mCYm0txBf9GLFewQsxoxx0vcFxBDAQUv2WJ1OpXej0jPvlaIVymSNo/6fIfGKTUN+g==
|
||||
"@acid-info/docusaurus-remote-content@^1.0.0-alpha.128":
|
||||
version "1.0.0-alpha.128"
|
||||
resolved "https://registry.yarnpkg.com/@acid-info/docusaurus-remote-content/-/docusaurus-remote-content-1.0.0-alpha.128.tgz#b54511ba00d44acc89640fc116ad53c497795c7c"
|
||||
integrity sha512-9JPu1jUyXj2n+TM6LxONoIUdNF8WGHNmFNxdMImAJVQIzaCfu1o+mtYhMG/Qt1wLrCM2ledAShJbSIwnOARCNw==
|
||||
dependencies:
|
||||
axios "^1.6.2"
|
||||
fast-glob "^3.3.2"
|
||||
|
|
Loading…
Reference in New Issue