Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homogenises column naming for metrics #110

Merged
merged 6 commits into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A `Python` package for pedestrian-scale network-based urban analysis: network an
- Documentation for `v3.x`: see documented code per tagged release [v3](https://github.com/benchmark-urbanism/cityseer-api/tree/v3.7.2)
- Documentation for `v4+`: <https://cityseer.benchmarkurbanism.com/>

Demo Notebooks: <https://github.com/benchmark-urbanism/cityseer-examples>
Demo Notebooks: <https://benchmark-urbanism.github.io/cityseer-examples/>

Issues: <https://github.com/benchmark-urbanism/cityseer-api/issues>

Expand Down
26 changes: 19 additions & 7 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,17 @@ function admonitionRemarkPlugin() {
}
}

function replaceUnderscoresInIds() {
return (tree) => {
visit(tree, 'element', (node) => {
if (node.tagName && /^h[1-6]$/.test(node.tagName) && node.properties && node.properties.id) {
// Replace underscores with dashes in the id property
node.properties.id = node.properties.id.replace(/_/g, '-')
}
})
}
}

export default defineConfig({
root: '.',
srcDir: './src',
Expand Down Expand Up @@ -78,12 +89,7 @@ export default defineConfig({
],
rehypePlugins: [
rehypeSlug,
[
rehypeKatex,
{
output: 'htmlAndMathml',
},
],
replaceUnderscoresInIds,
[
rehypeAutolinkHeadings,
{
Expand All @@ -95,7 +101,7 @@ export default defineConfig({
'svg',
{
xmlns: 'http://www.w3.org/2000/svg',
viewbox: '0 0 20 20',
viewBox: '0 0 20 20',
ariaHidden: 'true',
width: '15px',
height: '15px',
Expand All @@ -114,6 +120,12 @@ export default defineConfig({
},
},
],
[
rehypeKatex,
{
output: 'htmlAndMathml',
},
],
[
rehypeCitation, // ESM, import manually else doesn't seem to work
{
Expand Down
Loading
Loading