-
Notifications
You must be signed in to change notification settings - Fork 10
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
Link the keywords to their respective pages #244
base: main
Are you sure you want to change the base?
Conversation
Looks great already @AgniveshChaubey ! One small thing: because in the future we might want to link to keywords from older dialects, etc:
|
@@ -41,9 +41,9 @@ related: | |||
keyword: unevaluatedProperties | |||
--- | |||
|
|||
The `additionalProperties` keyword is used to control the handling of properties whose names are not listed in the `properties` keyword or match any of the regular expressions in the `patternProperties` keyword. By default any additional properties are allowed. | |||
The {{<keyword-link name="additionalProperties" >}} keyword is used to control the handling of properties whose names are not listed in the {{<keyword-link name="properties" >}} keyword or match any of the regular expressions in the {{<keyword-link name="patternProperties" >}} keyword. By default any additional properties are allowed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we always require a vocabulary name when using the shortcode? As we might be linking to keywords in other vocabularies?
{{- end -}} | ||
{{- $url := index $keywordMap $keyword -}} | ||
{{- if $url -}} | ||
<a href="{{ $url }}">{{ $keyword }}</a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hugo has a ref
shortcode that ensures the destination is a valid page (thus protecting against broken links): https://gohugo.io/content-management/cross-references/. Can you make use of those here?
I am a bit busy these days, so I haven't had much time to work on this. Let the PR remain open; I'll finish it up whenever I get some free time. |
Yeah, no hurries! |
Addresses #188.
This is an initial PR. Here, I have added a shortcode to link the keywords to their corresponding pages. Please take a look and confirm whether I should proceed with this or not.