Skip to content

Conversation

@kevanstannard
Copy link
Contributor

@kevanstannard kevanstannard commented Jan 3, 2021

Suggestion for #162

The GithubSlugger seems to convert non alphanumeric characters to hyphens.

For example (.) => {} is converted to --.

Which results the URL /syntax-lookup#--

What do you think about introducing an id field into the items? This would need to be unique for each item, but would provide a convenient field for converting to a slug.

Which would then enable URLs such as /syntax-lookup#uncurried-function

@ryyppy ryyppy merged commit 90ee93f into rescript-lang:syntax-lookup-tool Jan 3, 2021
@ryyppy
Copy link
Member

ryyppy commented Jan 3, 2021

Yeah that's better.
Note we will most likely extract that meta data into the frontmatter of each doc file instead (just so you know)

@kevanstannard kevanstannard deleted the syntax-lookup-widget-slug branch January 3, 2021 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants