forked from plone/volto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 5697-slate-img-paste-fix
* main: (42 commits) Release 18.0.0-alpha.35 Release @plone/types 1.0.0-alpha.16 (fix): export getFieldURL from Url.js in helpers (plone#6100) Improve container detection, `config.settings.containerBlockTypes` is no longer needed (plone#6099) Support nested directories in public folder add-on sync folders both … (plone#6098) Release 18.0.0-alpha.34 Add generated new declarations for a34, just in case (plone#6097) Release @plone/slate 18.0.0-alpha.13 Release @plone/registry 1.6.0 Release @plone/types 1.0.0-alpha.15 Add support for reading the add-ons `tsconfig.json` paths (plone#6096) Fixes plone#6046 pass proper defaults to align and size fields of Image block (plone#6093) bug fix. relations control panel. Restrict eglible relation targets a… (plone#6092) Fix Uncaught RangeError: date value is not finite in DateTimeFormat.format (plone#6088) Add optional `token` parameter to ploneClient initialization (plone#6077) Blocks Layout Navigator (plone#5642) Fix internalUrl Widget to Reflect Prop Changes via onChangeBlock (plone#6036) [types] Improve styleClassNameExtenders types, Icon component JSDoc t… (plone#6095) Fix link in pop-up RelationsMatrix.jsx (plone#6085) Fix deselecting lists. (plone#6080) ...
- Loading branch information
Showing
144 changed files
with
3,729 additions
and
945 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
myst: | ||
html_meta: | ||
"description": "How to add static served files from your add-on to your build" | ||
"property=og:description": "How to add static served files to the build from an add-on" | ||
"property=og:title": "Add static files from your add-on to your build" | ||
"keywords": "Volto, Plone, Semantic UI, CSS, Volto theme, add-on, static, assets, files, build" | ||
--- | ||
|
||
# Add static files from your add-on to your build | ||
|
||
In the Volto build process, you can add static files to your build, then serve them along with the compiled files. | ||
Static files are not transformed or compiled by the build process. | ||
They are served as is from the root of the Volto site. | ||
It is useful to define static files such as the following: | ||
|
||
- {file}`robots.txt` | ||
- favicon files | ||
- manifest files | ||
- any other static files | ||
|
||
|
||
## Procedure to include static files | ||
|
||
Create a folder named `public` at the root of your add-on, and add the static files to it. | ||
The build process will copy the files, taking into account all add-ons' defined order. | ||
The build process copies first the static files defined by Volto, then the static files from add-ons as defined by their configuration order. | ||
The last defined file overwrites any previously defined files. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add documentation about optional `token` parameter for `ploneClient` initialization. @MAX-786 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { setup, teardown } from '../../resetFixture'; | ||
import { beforeEach } from 'vitest'; | ||
import { expect, test } from 'vitest'; | ||
import PloneClient from '../../client'; | ||
import { login, loginMutation } from './post'; | ||
|
||
const cli = PloneClient.initialize({ | ||
apiPath: 'http://localhost:55001/plone', | ||
}); | ||
|
||
beforeEach(async () => { | ||
await setup(); | ||
}); | ||
|
||
afterEach(async () => { | ||
await teardown(); | ||
}); | ||
|
||
describe('Login', () => { | ||
test('login request function', async () => { | ||
const options = loginMutation({ config: cli.config }); | ||
expect(options.mutationKey).toEqual(['login']); | ||
expect(options.mutationFn).toBeTypeOf('function'); | ||
|
||
const result = await login({ | ||
username: 'admin', | ||
password: 'secret', | ||
config: cli.config, | ||
}); | ||
expect(result).toBeTypeOf('object'); | ||
expect(result.token).toBeTypeOf('string'); | ||
}); | ||
|
||
test('loginMutation options factories', async () => { | ||
const options = loginMutation({ config: cli.config }); | ||
expect(options.mutationKey).toEqual(['login']); | ||
expect(options.mutationFn).toBeTypeOf('function'); | ||
|
||
const login = await options.mutationFn({ | ||
username: 'admin', | ||
password: 'secret', | ||
}); | ||
expect(login).toBeTypeOf('object'); | ||
expect(login.token).toBeTypeOf('string'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.