Skip to content

Commit

Permalink
refactor(config): Move some common settings to volto-eea-website-them…
Browse files Browse the repository at this point in the history
…e - refs #160747
  • Loading branch information
avoinea committed Feb 3, 2023
1 parent a0a0df8 commit e7b8508
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,9 @@
import { runtimeConfig } from '@plone/volto/runtime_config';
import installCallout from '@plone/volto-slate/editor/plugins/Callout';
import installContextNavigationBlock from '@eeacms/volto-eea-website-policy/components/Blocks/ContextNavigation';
import installLayoutSettingsBlock from '@eeacms/volto-eea-website-policy/components/Blocks/LayoutSettings';
import { addStylingFieldsetSchemaEnhancer } from '@eeacms/volto-eea-website-policy/components/Blocks/schema';

const applyConfig = (config) => {
// if (process.env.NODE_ENV === 'production') {
// // Restrict block-style to Layout only
// config.settings.layoutOnlyBlockStyles = true;
// // Restrict slate metadata mentions to Layout only
// config.settings.layoutOnlySlateMetadataMentions = true;
// }
// Callout slate button
config = installCallout(config);

// Insert scripts on Error pages
if (config.settings?.serverConfig?.extractScripts) {
config.settings.serverConfig.extractScripts.errorPages = true;
}

// Remove blockquote slate button
config.settings.slate.toolbarButtons = config.settings.slate.toolbarButtons.filter(
(item) => item !== 'blockquote',
);

// Disable tags on View
config.settings.showTags = false;

// Enable Title block
config.blocks.blocksConfig.title.restricted = false;

// Enable description block (also for cypress)
config.blocks.blocksConfig.description.restricted = false;
config.blocks.requiredBlocks = [];

// Date format for EU
config.settings.dateLocale = 'en-gb';

// #137187 Keycloak integration
if (runtimeConfig['RAZZLE_KEYCLOAK'] === 'Yes') {
config.settings.externalRoutes = [
Expand Down

0 comments on commit e7b8508

Please sign in to comment.