Skip to content

Commit

Permalink
#8491 linter for markdown files (#8731)
Browse files Browse the repository at this point in the history
* #8491 linter for markdown files

* fix code style

* Update package.json

Co-authored-by: Matteo V <[email protected]>
  • Loading branch information
belom88 and MV88 authored Oct 26, 2022
1 parent 88c7ad8 commit 6992603
Show file tree
Hide file tree
Showing 63 changed files with 450 additions and 348 deletions.
9 changes: 9 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"default": true,
"code-block-style": false,
"line-length": false,
"no-inline-html": false,
"no-duplicate-heading": {
"siblings_only": true
}
}
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github
node_modules
product
2 changes: 1 addition & 1 deletion docma-template/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Docma Default Template
# Docma Default Template

> © 2017, Onur Yıldırım (@onury). MIT License.
Expand Down
1 change: 1 addition & 0 deletions docs/developer-guide/API-usage.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# MapStore API usage

You can include MapStore in your application and interact with it via its [JavaScript API](https://mapstore.geosolutionsgroup.com/mapstore/docs/api/jsapi)

## How to use
Expand Down
5 changes: 2 additions & 3 deletions docs/developer-guide/code-conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ When a selector retrieves data from more than one state slices, you should place

If you don't work on a core functionality, where the state is shared between many components, defining the selector directly in the plug-in is not denied.

## Prefer plugin configuration over `initialState`

In order to create self contained plugins that can be reused you should prefer to configure the plugins using `cfg`. Using `initialState` should be considered deprecated. When the configuration is needed at an higher level (e.g. application state, for epics or to share this information), you should properly initialize the state of the plugin on your own triggering an action on mount/unmont. (`cfg` are passed to the plugin as react props).
## Prefer plugin configuration over `initialState`

In order to create self contained plugins that can be reused you should prefer to configure the plugins using `cfg`. Using `initialState` should be considered deprecated. When the configuration is needed at an higher level (e.g. application state, for epics or to share this information), you should properly initialize the state of the plugin on your own triggering an action on mount/unmont. (`cfg` are passed to the plugin as react props).

## Use custom axios version for async requests

Expand Down
9 changes: 5 additions & 4 deletions docs/developer-guide/configuration-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ They are located in `java/web/src/main/resources` and they will be copied in `M
Except for `mapstore.properties` and `ldap.properties`, all these files are simply overrides of original configuration files coming from the included sub-applications part of the back-end. In `WEB-INF/classes` you will find also some other useful files coming from the original application:

### Back-end security configuration files
Back-end security can be configured to use different authentication strategies. Maven profiles can be used to switch between these different strategies.

Depending on the chosen profile a different file will be copied from the `product/config` folder to override `WEB-INF/classes/geostore-spring-security.xml` in the final package. In particular:
Back-end security can be configured to use different authentication strategies. Maven profiles can be used to switch between these different strategies.

- **default**: `db\geostore-spring-security-db.xml` (geostore database)
- **ldap**: `ldap\geostore-spring-security-ldap.xml` (LDAP source)
Depending on the chosen profile a different file will be copied from the `product/config` folder to override `WEB-INF/classes/geostore-spring-security.xml` in the final package. In particular:

* **default**: `db\geostore-spring-security-db.xml` (geostore database)
* **ldap**: `ldap\geostore-spring-security-ldap.xml` (LDAP source)

Specific configuration files are available to configure connection details for the chosen profile.

Expand Down
12 changes: 6 additions & 6 deletions docs/developer-guide/custom-dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Here is a list of customizations:

| library | version | issue | reason | github |
|---|---|---|---|---|
| wkt-parser | 1.2.1 | #2175 | Fixes axis order recognition. For this reason we customized it with "@geosolutions@wkt-parser 1.2.2" | https://github.com/geosolutions-it/wkt-parser/tree/release |
| proj4 | 2.4.5-alpha | #2175 | Fixes axis order recognition. For this reason we customized it with "@geosolutions@proj4 2.4.6" and its wkt-parser dependency with "@geosolutions@wkt-parser 1.2.2". Note that shpjs will use this customized version of proj4 and wkt-parser | https://github.com/geosolutions-it/proj4js/tree/release_2.4.6 |
| react-joyride | 1.10.1 | | is a re-publish on npm of a fix made [here](https://github.com/ddeath/react-joyride/tree/fixed-positioning-and-overlay) , we therefore are using "@geosolutions@react-joyride 1.10.2" | https://github.com/geosolutions-it/react-joyride/tree/release |
| mocha | 6.2.0-uncaught | #3693 | Customized in order to make some test run. More in detail, we removed uncaught exceptions handler because it was making some test failing (waiting for a better solution). Published "@geosolutions/mocha 6.2.1-3". mocha is being moved from node_modules/@geosolutions/mocha to node_modules/mocha in order to make the test be runnable | https://github.com/geosolutions-it/mocha/tree/release_v6.2.1 |
| jsdoc | 3.4.3 | #1978 | ES6 syntax not parsed by Docma, so we published "@geosolutions/jsdoc 3.4.4" with other related dependencies also on our npm, like acorn-jsx, espree and tv4 | https://github.com/geosolutions-it/jsdoc/tree/release |
| acorn-jsx | 4.0.1 | #1978 | Added support for instance properties (e.g. state), we published "@geosolutions/acorn-jsx 4.0.2" | https://github.com/geosolutions-it/acorn-jsx/tree/release |
| wkt-parser | 1.2.1 | #2175 | Fixes axis order recognition. For this reason we customized it with "@geosolutions@wkt-parser 1.2.2" | [https://github.com/geosolutions-it/wkt-parser/tree/release](https://github.com/geosolutions-it/wkt-parser/tree/release) |
| proj4 | 2.4.5-alpha | #2175 | Fixes axis order recognition. For this reason we customized it with "@geosolutions@proj4 2.4.6" and its wkt-parser dependency with "@geosolutions@wkt-parser 1.2.2". Note that shpjs will use this customized version of proj4 and wkt-parser | [https://github.com/geosolutions-it/proj4js/tree/release_2.4.6](https://github.com/geosolutions-it/proj4js/tree/release_2.4.6) |
| react-joyride | 1.10.1 | | is a re-publish on npm of a fix made [here](https://github.com/ddeath/react-joyride/tree/fixed-positioning-and-overlay) , we therefore are using "@geosolutions@react-joyride 1.10.2" | [https://github.com/geosolutions-it/react-joyride/tree/release](https://github.com/geosolutions-it/react-joyride/tree/release) |
| mocha | 6.2.0-uncaught | #3693 | Customized in order to make some test run. More in detail, we removed uncaught exceptions handler because it was making some test failing (waiting for a better solution). Published "@geosolutions/mocha 6.2.1-3". mocha is being moved from node_modules/@geosolutions/mocha to node_modules/mocha in order to make the test be runnable | [https://github.com/geosolutions-it/mocha/tree/release_v6.2.1](https://github.com/geosolutions-it/mocha/tree/release_v6.2.1) |
| jsdoc | 3.4.3 | #1978 | ES6 syntax not parsed by Docma, so we published "@geosolutions/jsdoc 3.4.4" with other related dependencies also on our npm, like acorn-jsx, espree and tv4 | [https://github.com/geosolutions-it/jsdoc/tree/release](https://github.com/geosolutions-it/jsdoc/tree/release) |
| acorn-jsx | 4.0.1 | #1978 | Added support for instance properties (e.g. state), we published "@geosolutions/acorn-jsx 4.0.2" | [https://github.com/geosolutions-it/acorn-jsx/tree/release](https://github.com/geosolutions-it/acorn-jsx/tree/release) |

## Aliases

Expand Down
37 changes: 21 additions & 16 deletions docs/developer-guide/customize-theme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Styling and Theming

The look and feel is completely customizable either using one of the included themes, or building your own. Themes are built using [less](http://lesscss.org/).
You can find the default theme here: https://github.com/geosolutions-it/MapStore2/tree/master/web/client/themes/default
You can find the default theme here: [https://github.com/geosolutions-it/MapStore2/tree/master/web/client/themes/default](https://github.com/geosolutions-it/MapStore2/tree/master/web/client/themes/default)

## Theme Structure

```
```text
.
+-- themes/
| +-- theme-name/
Expand Down Expand Up @@ -48,6 +48,7 @@ You can find the default theme here: https://github.com/geosolutions-it/MapStore
|variable.less|contains the import of mapstore variables and the override of bootstrap variables|

below an example of entry configuration:

```js
entry: {
...other entries,
Expand All @@ -57,7 +58,7 @@ entry: {

MapStore uses a `themeEntries` function to automatically create the entries for default themes that can be found under the `web/client/themes` directory

```js
```js
const themeEntries = require('./themes.js').themeEntries;

entry: {
Expand Down Expand Up @@ -111,6 +112,7 @@ Example:
```

### ms-variables.less

MapStore uses basic less variables to change theme colors, buttons sizes and fonts.
It possible also to override bootstrap less variable for advanced customization.
Basic variables can be found in the ms-variable.less file
Expand All @@ -124,18 +126,18 @@ local: `@ms-name-of-plugin--rule-value`
- `@ms` suffix for MapStore variable
- `name-of-plugin` for local variable it's important to write the name of plugin in kebab-case
- `rule-value` value to use in compiled CSS, some examples:
- `color` generic color variable
- `text-color` color for text
- `background-color` color for background
- `border-color` color for border
- `color` generic color variable
- `text-color` color for text
- `background-color` color for background
- `border-color` color for border

### less/ directory

The `less/` directory contains all the modules needed to create the final CSS of MapStore.

Each file in this directory is related to a specific plugin or component and the files are named based on the plugin's name are referring to.

`common.less` file can be used for generic styles.
`common.less` file can be used for generic styles.

### inline styles

Expand All @@ -155,7 +157,7 @@ If you are not using themeEntries a new entry needs to be added in the `buildCon

You can then switch your application to use the theme adding a new section in the `appConfig.js` file:

```
```json
initialState: {
defaultState: {
...
Expand All @@ -179,7 +181,7 @@ Below steps to configure a custom theme and override styles:

- add the following files to the themes folder of the project:

```
```text
.
+-- themes/
| +-- default/
Expand Down Expand Up @@ -229,7 +231,6 @@ module.exports = require('./MapStore2/buildConfig')(
}
```


## Custom Theme for contexts

You can configure a list of themes to be used inside a context.
Expand All @@ -240,6 +241,7 @@ In order to do that you have to:
- edit **ContextCreator** plugin in the `localConfig.json`

example

```json
{
"name": "ContextCreator",
Expand Down Expand Up @@ -284,8 +286,9 @@ example
```

for each theme you can define:

- **id** id of the theme equal to its name
- **type** values can be
- **type** values can be
- **link** will require a href property
- **href** path to find the css once built
- **defaultVariables** variables of the theme used to initialize the pickers (optional)
Expand All @@ -300,7 +303,7 @@ This example will create a complete css file and is not recommended if you want

Add the following files to the themes folder of the project

```
```text
+-- themes/
| +-- theme-name/
| +-- theme.less
Expand Down Expand Up @@ -331,6 +334,7 @@ in `theme.less` put
```

in `variables.less` you can put the mapstore variables customizations

```less
/*
* A variable that will override the default css one
Expand All @@ -342,14 +346,15 @@ in `variables.less` you can put the mapstore variables customizations

This example is perfect if you just want to customize a few colors of the theme

```
```text
+-- themes/
| +-- theme-name/
| +-- theme.less
| +-- variables.less
```

in `theme.less` put

```less
/*
* This example is the lightest version of all three examples
Expand Down Expand Up @@ -386,7 +391,8 @@ in `theme.less` put
In the `variables.less` you can do put your variable customizations

### partial theme override
```

```text
+-- themes/
| +-- theme-name/
| +-- less/
Expand All @@ -411,7 +417,6 @@ In the `variables.less` you can do put your variable customizations

Note: These three styles are an example on how is possible to approach on the mapstore customizations. You could extend/combine them together to create a more complex theme.


## Tips

- When you develop locally
Expand Down
5 changes: 3 additions & 2 deletions docs/developer-guide/dev-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

## Troubleshooting

### Autowatch doesn't work on Linux.
### Autowatch doesn't work on Linux

You should need to increase `max_user_watches` variable for inotify.

```bash
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
```

# Other References
## Other References

* [How to use a CDN](how-to-use-a-cdn.md#how-to-use-a-cdn)
2 changes: 1 addition & 1 deletion docs/developer-guide/dev-how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Still to do:
* Writing components
* Using JS API

Work in progress:
Work in progress:

* [Extensions](extensions.md#working-with-extensions)
2 changes: 1 addition & 1 deletion docs/developer-guide/documentation-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The Developer and User guide documentation are built on the [Read the Docs](http

### Internal links

When creating internal links between pages (`.md` files), make sure to use **full link** to the paragraph instead of using only the relative path to the file.
When creating internal links between pages (`.md` files), make sure to use **full link** to the paragraph instead of using only the relative path to the file.
As using relative path will not work in exported PDF document.

!!! Example
Expand Down
Loading

0 comments on commit 6992603

Please sign in to comment.