Skip to content

Commit

Permalink
Merge pull request #161 from Dataport/feature/heading-IDs-in-docs
Browse files Browse the repository at this point in the history
markdown heading IDs
  • Loading branch information
ludoholic authored Aug 20, 2024
2 parents 7f713e4 + 63adf86 commit 722a499
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"@vitejs/plugin-vue2": "^2.2.0",
"@vue/vue2-jest": "^28.1.0",
"@vue/test-utils": "^1.2.2",
"@vue/vue2-jest": "^28.1.0",
"babel-core": "^7.0.0-bridge.0",
"cesium": "^1.62.0",
"copyfiles": "^2.4.1",
Expand All @@ -78,6 +78,7 @@
"lerna": "^6.4.0",
"lodash.merge": "^4.6.2",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^9.0.1",
"prettier": "^2.5.1",
"rimraf": "^5.0.9",
"sass": "^1.47.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ The `<...masterportalAPI.fields>` means that any masterportalAPI field may also

##### <plugin.fields>

Plugins in POLAR are modular components that extend the functionality of the map client. They can be added using the [addPlugins](#addPlugins) method and configured through the `mapConfiguration` object. Each plugin has its own set of fields and options that can be customized.
Plugins in POLAR are modular components that extend the functionality of the map client. They can be added using the [addPlugins](#addplugins) method and configured through the `mapConfiguration` object. Each plugin has its own set of fields and options that can be customized.

On how to configure a plugin, see the respective plugin. The configuration is given in the `mapConfiguration` object by the plugin's name as specified in its respective documentation.

Expand Down
7 changes: 6 additions & 1 deletion scripts/makeDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,16 @@
* docs and .md.)
*
* Call like `node ./scripts/makeDocs.js ./path/to/client`.
*
* Headings in markdowns will get a slugified ID by markdown-it-anchor to be linkable.
* It uses the default slugify function:
* (s) => encodeURIComponent(String(s).trim().toLowerCase().replace(/\s+/g, '-'))
*
*/

// IMPORTS
const fs = require('fs')
const markdownIt = require('markdown-it')()
const markdownIt = require('markdown-it')().use(require('markdown-it-anchor'))

// SETUP
const fsOptions = { encoding: 'utf8' }
Expand Down

0 comments on commit 722a499

Please sign in to comment.