diff --git a/build/prod-webpack.config.js b/build/prod-webpack.config.js index 0511f6b3ee..6f6e7ae740 100644 --- a/build/prod-webpack.config.js +++ b/build/prod-webpack.config.js @@ -12,6 +12,8 @@ const paths = { code: path.join(__dirname, "..", "web", "client") }; +const favicon = path.join(__dirname, '..', 'web', 'client', 'product', 'assets', 'img', 'favicon.png'); + module.exports = require('./buildConfig')({ bundles: { "mapstore2": path.join(paths.code, "product", "app"), @@ -30,7 +32,8 @@ module.exports = require('./buildConfig')({ publicPath: 'dist/', chunks: ['mapstore2'], inject: "body", - hash: true + hash: true, + favicon }), new HtmlWebpackPlugin({ template: path.join(paths.framework, 'embeddedTemplate.html'), @@ -38,7 +41,8 @@ module.exports = require('./buildConfig')({ chunks: ['embedded'], inject: "body", hash: true, - filename: 'embedded.html' + filename: 'embedded.html', + favicon }), new HtmlWebpackPlugin({ template: path.join(paths.framework, 'apiTemplate.html'), @@ -46,7 +50,8 @@ module.exports = require('./buildConfig')({ chunks: ['ms2-api'], inject: 'body', hash: true, - filename: 'api.html' + filename: 'api.html', + favicon }), new HtmlWebpackPlugin({ template: path.join(paths.framework, 'geostory-embedded-template.html'), @@ -54,7 +59,8 @@ module.exports = require('./buildConfig')({ chunks: ['geostory-embedded'], inject: "body", hash: true, - filename: 'geostory-embedded.html' + filename: 'geostory-embedded.html', + favicon }), new HtmlWebpackPlugin({ template: path.join(paths.framework, 'dashboard-embedded-template.html'), @@ -62,7 +68,8 @@ module.exports = require('./buildConfig')({ chunks: ['dashboard-embedded'], inject: 'body', hash: true, - filename: 'dashboard-embedded.html' + filename: 'dashboard-embedded.html', + favicon }) ] }); diff --git a/docs/developer-guide/mapstore-migration-guide.md b/docs/developer-guide/mapstore-migration-guide.md index 34a21a3f34..c013eeb03d 100644 --- a/docs/developer-guide/mapstore-migration-guide.md +++ b/docs/developer-guide/mapstore-migration-guide.md @@ -22,6 +22,104 @@ This is a list of things to check if you want to update from a previous version ## Migration from 2024.02.00 to 2025.01.00 +### HomeDescription plugin configuration changes + +The HomeDescription plugin has been refactored and a property has been removed: + +- `cfg.name` removed in favor of the translation message `home.shortDescription` + +For downstream projects review the `.less` or `.css` files for possible conflicting style related to the `.ms-home-description` class selector + +### Update of CDN favicon + +The usage of default CDN favicon is deprecated so existing downstream project still using this setup should be updated as follow: + +1. Add a favicon image inside the `assets/img` folder: + + ```text + MapStoreProject/ + |-- ... + |-- assets/ + | |-- img/ + | |-- favicon.png (new) + |-- ... + |-- dashboard-embedded-template.html + |-- dashboard-embedded.html + |-- embedded.html + |-- embeddedTemplate.html + |-- geostory-embedded-template.html + |-- geostory-embedded.html + |-- index.html + |-- indexTemplate.html + |-- ... + |-- prod-webpack.config.js + |-- ... + ``` + +2. Remove the existing favicon link from all the html files (index.html, indexTemplate.html, embedded.html, embeddedTemplate.hml, ...): + + ```diff + - + ``` + +3. Include the new favicon inside the `prod-webpack.config.js` file: + + ```diff + + + const favicon = path.join(__dirname, "assets", "img", "favicon.png'); + + module.exports = require('./MapStore2/build/buildConfig')({ + ... + prodPlugins: [ + new HtmlWebpackPlugin({ + template: path.join(__dirname, 'indexTemplate.html'), + chunks: ['__PROJECTNAME__'], + publicPath: 'dist/', + inject: "body", + hash: true, + + favicon + }), + new HtmlWebpackPlugin({ + template: path.join(__dirname, 'embeddedTemplate.html'), + chunks: ['__PROJECTNAME__-embedded'], + publicPath: 'dist/', + inject: "body", + hash: true, + filename: 'embedded.html', + + favicon + }), + new HtmlWebpackPlugin({ + template: path.join(__dirname, 'apiTemplate.html'), + chunks: ['__PROJECTNAME__-api'], + publicPath: 'dist/', + inject: 'body', + hash: true, + filename: 'api.html', + + favicon + }), + new HtmlWebpackPlugin({ + template: path.join(__dirname, 'geostory-embedded-template.html'), + chunks: ['geostory-embedded'], + publicPath: 'dist/', + inject: "body", + hash: true, + filename: 'geostory-embedded.html', + + favicon + }), + new HtmlWebpackPlugin({ + template: path.join(__dirname, 'dashboard-embedded-template.html'), + chunks: ['dashboard-embedded'], + publicPath: 'dist/', + inject: 'body', + hash: true, + filename: 'dashboard-embedded.html', + + favicon + }) + ], + ... + }); + ``` + ### Add TagsManager and Favorite plugins to localConfig.json The new TagsManager and Favorite plugin should be added inside the plugins `maps` section of the `localConfig.json` to visualize a new menu item in the admin menu and to to visualize the button on the resource cards diff --git a/project/standard/static/assets/img/favicon.png b/project/standard/static/assets/img/favicon.png new file mode 100644 index 0000000000..679ee3c5b2 Binary files /dev/null and b/project/standard/static/assets/img/favicon.png differ diff --git a/project/standard/static/assets/placeholder b/project/standard/static/assets/placeholder deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/project/standard/templates/api.html b/project/standard/templates/api.html index c568fcd4f6..3778c0edcc 100644 --- a/project/standard/templates/api.html +++ b/project/standard/templates/api.html @@ -7,7 +7,6 @@ __PROJECTDESCRIPTION__ - - diff --git a/project/standard/templates/embeddedTemplate.html b/project/standard/templates/embeddedTemplate.html index 2e94c27992..a9bd9c02c5 100644 --- a/project/standard/templates/embeddedTemplate.html +++ b/project/standard/templates/embeddedTemplate.html @@ -84,7 +84,6 @@ - diff --git a/web/client/configs/localConfig.json b/web/client/configs/localConfig.json index 2d56a6b770..40af3fa1a6 100644 --- a/web/client/configs/localConfig.json +++ b/web/client/configs/localConfig.json @@ -708,24 +708,7 @@ "FeedbackMask" ], "common": [{ - "name": "BrandNavbar", - "cfg": { - "rightMenuItems": [{ - "type": "link", - "href": "https://docs.mapstore.geosolutionsgroup.com/", - "target": "blank", - "glyph": "book", - "labelId": "Documentation", - "variant": "default" - }, { - "type": "link", - "href": "https://github.com/geosolutions-it/MapStore2", - "target": "blank", - "label": "GitHub", - "glyph": "github", - "variant": "default" - }] - } + "name": "BrandNavbar" }, { "name": "ManagerMenu" }, "Login","Language", "ScrollTop", "Notifications"], diff --git a/web/client/embedded.html b/web/client/embedded.html index 5c067f7f85..18846a0de6 100644 --- a/web/client/embedded.html +++ b/web/client/embedded.html @@ -4,7 +4,7 @@ - MapStore HomePage + Map Embedded - diff --git a/web/client/embeddedTemplate.html b/web/client/embeddedTemplate.html index b674fb1627..da48ceb365 100644 --- a/web/client/embeddedTemplate.html +++ b/web/client/embeddedTemplate.html @@ -4,7 +4,7 @@ - MapStore HomePage + Map Embedded -