diff --git a/custom/instance/.gitkeep b/custom/instance/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/docs/development/build-config.md b/docs/development/build-config.md index a5f9a741b..0d7f44b99 100644 --- a/docs/development/build-config.md +++ b/docs/development/build-config.md @@ -38,6 +38,17 @@ For example: See `app/soapbox/utils/features.js` for the full list of features. +### Custom files (`custom/instance/*`) + +You can place arbitrary files of any type in the `custom/instance/` directory. +They will be available on your website at `https://example.com/instance/{filename}`. +Subdirectories are supported, too. + +Some use cases: + +- Logos, which can then be referenced from `soapbox.json` +- About pages, available at `/about` on your website. + ## Environment variables When compiling Soapbox FE, environment variables may be passed to change the build itself. diff --git a/webpack/shared.js b/webpack/shared.js index 648f07008..2daba677a 100644 --- a/webpack/shared.js +++ b/webpack/shared.js @@ -97,6 +97,13 @@ module.exports = { }, { from: join(__dirname, '../app/instance'), to: join(output.path, 'instance'), + }, { + from: join(__dirname, '../custom/instance'), + to: join(output.path, 'instance'), + noErrorOnMissing: true, + globOptions: { + ignore: ['**/.gitkeep'], + }, }], options: { concurrency: 100,