Skip to content
Open
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
270 changes: 270 additions & 0 deletions assets/en/platform/corda/5.1/glossaryitems.json

Large diffs are not rendered by default.

290 changes: 290 additions & 0 deletions assets/en/platform/corda/5.2/glossaryitems.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To find a specific customer, use the search bar. After typing three characters,
The search is case-sensitive.
{{< /note >}}

When you click on a customer name, you will be directed to the **Update Customer** screen where you can [view and update a customer profile]({{< relref "./how-to.m d#update-customer-profile" >}}).
When you click on a customer name, you will be directed to the **Update Customer** screen where you can [view and update a customer profile]({{< relref "./how-to.md#update-customer-profile" >}}).

You may also wish to [create a new customer]({{< relref "./how-to.md#create-a-customer-profile" >}}). Click on the **Create New** button in the top right corner to be directed to the **Create Customer** screen.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
date: '2021-07-2021'
date: '2021-07-21'
menu:
corda-enterprise-4-10:
parent: corda-enterprise-4-10-cordapps-states
Expand Down
3 changes: 3 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ googleTagManagerID = "G-NCYRYSGJ7C"
source = 'content/en'
target = 'content/en'
excludeFiles = ['interop-raw/**']
[[module.mounts]]
source = "assets"
target = "assets"

[frontmatter]
publishDate = [':git']
30 changes: 19 additions & 11 deletions layouts/partials/defs-field-desc-ref-docs.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
{{/* Called by field-desc-ref-docs to format any config field descriptions defined in a reusable definition */}}

{{ $def := .def }}
{{ $url := .url }}
{{ $json := getJSON $url }}
{{ $defmap := index $json "$defs"}}

{{ with resources.GetRemote $url }}
{{ $json := . | transform.Unmarshal }}
{{ $defmap := index $json "$defs" }}

{{ range $key, $value := $defmap }}
{{ if eq $key $def}}
{{ range $key2, $value2 := $value.anyOf }}
{{ if isset $value2 "minimum" }}
<br>Minimum value: {{ string ($value2.minimum) }}
{{ end }}
{{ if isset $value2 "maximum" }}
<br>Maximum value: {{ string ($value2.maximum) }}
{{ end }}
{{ if eq $key $def }}
{{ range $key2, $value2 := $value.anyOf }}
{{ if isset $value2 "minimum" }}
<br>Minimum value: {{ string ($value2.minimum) }}
{{ end }}
{{ if isset $value2 "maximum" }}
<br>Maximum value: {{ string ($value2.maximum) }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ else }}
<p>Error: Failed to fetch or parse remote JSON from {{ $url }}</p>
{{ end }}

179 changes: 104 additions & 75 deletions layouts/partials/referenced-field-desc-ref-docs.html
Original file line number Diff line number Diff line change
@@ -1,90 +1,119 @@
{{/* Called by field-desc-ref-docs or conditional-field-desc-ref-docs to format any config field descriptions defined in another file, referenced from the original file */}}
{{/*
Called by field-desc-ref-docs or conditional-field-desc-ref-docs
to format any config field descriptions defined in another file, referenced from the original file
*/}}

{{ $refurl := .url }}
{{ $refjson := getJSON $refurl }}
<ul>
{{ range $key, $value := $refjson.properties }}
{{ with $value }}

{{ with resources.GetRemote $refurl }}
{{ $refjson := . | transform.Unmarshal }}

<ul>
{{ range $key, $value := $refjson.properties }}
{{ with $value }}
<li>
<code>{{ $key }}</code> - {{ $value.description}}
{{ with $value.enum }}
This must be set to one of the following values:
<ul>
{{ range $enumval := $value.enum }}
<li>{{ $enumval }}</li>
{{ end }}
</ul>
{{ end }}
{{ if isset $value "minimum" }}
<br>Minimum value: {{ string ($value.minimum) }}.
{{ end }}
{{ if isset $value "maximum" }}
<br>Maximum value: {{ string ($value.maximum) }}.
{{ end }}
{{ if isset $value "default" }}
{{ with $value.default }}
<br>Default value: {{ string ($value.default) }}.
{{ end }}
<code>{{ $key }}</code> – {{ .description }}

{{ with .enum }}
This must be set to one of the following values:
<ul>
{{ range . }}
<li>{{ . }}</li>
{{ end }}
</ul>
{{ end }}

{{ if isset . "minimum" }}
<br>Minimum value: {{ string .minimum }}.
{{ end }}

{{ if isset . "maximum" }}
<br>Maximum value: {{ string .maximum }}.
{{ end }}

{{ if isset . "default" }}
{{ with .default }}
<br>Default value: {{ string . }}.
{{ end }}
{{ end }}
</li>
<ul>
{{/*Check if there is a value at a second level*/}}
{{ range $childk, $childv := $value.properties }}
{{ with $childv }}
<li>
<code>{{ $childk }}</code> - {{ $childv.description}}
{{ with $childv.enum }}

{{/* Second-level properties */}}
{{ with .properties }}
<ul>
{{ range $childk, $childv := . }}
{{ with $childv }}
<li>
<code>{{ $childk }}</code> – {{ .description }}

{{ with .enum }}
This must be set to one of the following values:
<ul>
{{ range $enumval := $childv.enum }}
<li>{{ $enumval }}</li>
{{ end }}
{{ range . }}
<li>{{ . }}</li>
{{ end }}
</ul>
{{ end }}
{{ if isset $childv "minimum" }}
<br>Minimum value: {{ string ($childv.minimum) }}.
{{ end }}
{{ if isset $childv "maximum" }}
<br>Maximum value: {{ string ($childv.maximum) }}.
{{ end }}
{{ if isset $childv "default" }}
{{ with $childv.default }}
<br>Default value: {{ string ($childv.default) }}.
{{ end }}

{{ if isset . "minimum" }}
<br>Minimum value: {{ string .minimum }}.
{{ end }}

{{ if isset . "maximum" }}
<br>Maximum value: {{ string .maximum }}.
{{ end }}

{{ if isset . "default" }}
{{ with .default }}
<br>Default value: {{ string . }}.
{{ end }}
{{ end }}
</li>
<ul>
{{/*Check if there is a value at a third level*/}}
{{ range $childk2, $childv2 := $childv.properties }}
{{ with $childv2 }}

<li>
<code>{{ $childk2 }}</code> - {{ $childv2.description}}
{{ with $childv2.enum }}
{{ end }}
</li>

{{/* Third-level properties */}}
{{ with .properties }}
<ul>
{{ range $childk2, $childv2 := . }}
{{ with $childv2 }}
<li>
<code>{{ $childk2 }}</code> – {{ .description }}

{{ with .enum }}
This must be set to one of the following values:
<ul>
{{ range $enumval := $childv2.enum }}
<li>{{ $enumval }}</li>
{{ end }}
{{ range . }}
<li>{{ . }}</li>
{{ end }}
</ul>
{{ end }}
{{ if isset $childv2 "minimum" }}
<br>Minimum value: {{ string ($childv2.minimum) }}.
{{ end }}
{{ if isset $childv2 "maximum" }}
<br>Maximum value: {{ string ($childv2.maximum) }}.
{{ end }}
{{ if isset $childv2 "default" }}
{{ with $childv2.default }}
<br>Default value: {{ string ($childv2.default) }}.
{{ end }}

{{ if isset . "minimum" }}
<br>Minimum value: {{ string .minimum }}.
{{ end }}

{{ if isset . "maximum" }}
<br>Maximum value: {{ string .maximum }}.
{{ end }}

{{ if isset . "default" }}
{{ with .default }}
<br>Default value: {{ string . }}.
{{ end }}
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}

{{ end }}
{{ end }}
</ul>
{{ end }}
</ul>

{{ end }}
{{ end }}
{{ end }}
</ul>
</ul>
{{ else }}
<p>Error: Failed to fetch or parse JSON from <code>{{ $refurl }}</code></p>
{{ end }}
76 changes: 45 additions & 31 deletions layouts/shortcodes/generate-ref-docs.html
Original file line number Diff line number Diff line change
@@ -1,36 +1,50 @@
{{/*Initial read of descriptions from Corda JSON config files. This shortcode is used to render the config field descriptions from the appropriate branch of the code repo */}}
{{/*Check that a URL to Corda config was passed to the shortcode */}}
{{/* Initial read of descriptions from Corda JSON config files using the new GetRemote + Unmarshal method */}}
{{ with $.Params.url }}
{{ $json := getJSON $.Params.url }}
<p>{{ $json.description }}</p>
{{ range $key, $value := $json.properties }}
{{/* Render the details of the value*/}}
{{ with $value }}
<ul>
{{ partial "field-desc-ref-docs" (dict "value" $value "key" $key "url" $.Params.url) }}
{{ $remote := resources.GetRemote . }}
{{ with $remote }}
{{ $json := . | transform.Unmarshal }}

<p>{{ $json.description }}</p>

{{ range $key, $value := $json.properties }}
{{ with $value }}
<ul>
{{/*Check if there is a value at a second level*/}}
{{ range $childk, $childv := $value.properties }}
{{ with $childv }}
{{ partial "field-desc-ref-docs" (dict "value" $childv "key" $childk "url" $.Params.url) }}
{{/*Check if there is a value at a third level*/}}
{{ range $childk2, $childv2 := $childv.properties }}
{{ with $childv2 }}
<ul>{{ partial "field-desc-ref-docs" (dict "value" $childv2 "key" $childk2 "url" $.Params.url) }}</ul>
{{ partial "field-desc-ref-docs" (dict "value" $value "key" $key "url" $.Params.url) }}
<ul>
{{/* Second-level properties */}}
{{ range $childk, $childv := $value.properties }}
{{ with $childv }}
{{ partial "field-desc-ref-docs" (dict "value" $childv "key" $childk "url" $.Params.url) }}

{{/* Third-level properties */}}
{{ range $childk2, $childv2 := $childv.properties }}
{{ with $childv2 }}
<ul>
{{ partial "field-desc-ref-docs" (dict "value" $childv2 "key" $childk2 "url" $.Params.url) }}
</ul>
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{/*Check if there is a conditional set of values at the top level of values*/}}
{{ with $value.allOf }}
{{ partial "conditional-field-desc-ref-docs" (dict "value" $value "url" $.Params.url) }}
{{ end }}
</ul>
</ul>
{{ end }}

{{/* Top-level conditional values inside each property */}}
{{ with $value.allOf }}
{{ partial "conditional-field-desc-ref-docs" (dict "value" $value "url" $.Params.url) }}
{{ end }}
</ul>
</ul>
{{ end }}
{{ end }}

{{/* Top-level conditional values */}}
{{ with $json.allOf }}
{{ partial "conditional-field-desc-ref-docs" (dict "value" $json "url" $.Params.url) }}
{{ end }}

{{ else }}
<p>Error: Could not load remote JSON from {{ $.Params.url }}</p>
{{ end }}
{{/*Check if there is a conditional set of values at the top level*/}}
{{ with $json.allOf }}
{{ partial "conditional-field-desc-ref-docs" (dict "value" $json "url" $.Params.url) }}
{{ end }}
{{ end }}
{{ else }}
<p>Error: No URL provided to the shortcode.</p>
{{ end }}

6 changes: 3 additions & 3 deletions themes/doks/layouts/partials/head/opengraph.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
{{ end -}}

{{ if .IsPage -}}
{{ range .Site.Authors -}}
{{ range .Site.Params.Author -}}
{{ with .Social.facebook -}}
<meta property="article:author" content="https://www.facebook.com/{{ . }}">
{{ end -}}
{{ with .Site.Social.facebook -}}
{{ with .Site.Params.Social.facebook -}}
<meta property="article:publisher" content="https://www.facebook.com/{{ . }}">
{{ end -}}
<meta property="article:section" content="{{ .Section }}">
Expand All @@ -74,6 +74,6 @@
{{ end -}}
{{ end -}}

{{ with .Site.Social.facebook_admin -}}
{{ with .Site.Params.Social.facebook_admin -}}
<meta property="fb:admins" content="{{ . }}">
{{ end -}}
4 changes: 2 additions & 2 deletions themes/doks/layouts/partials/head/twitter_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

<meta name="twitter:title" content="{{ with .Params.Version }}{{ if eq . $.Title}}{{ $.Title }}{{ else }}{{ $.Title }} - {{ . }}{{ end }}{{ else }}{{ with .Parent }}{{ with $.Parent.Params.version }}{{ if eq . $.Title}}{{ $.Title }}{{ else }}{{ $.Title }} - {{ . }}{{ end }}{{ end }}{{ else }}{{ $.Title }}{{ end }}{{end}}">
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}">
{{ with .Site.Social.twitter -}}
{{ with .Site.Params.Social.twitter -}}
<meta name="twitter:site" content="@{{ . }}">
{{ end -}}

{{ range .Site.Authors -}}
{{ range .Site.Params.Author -}}
{{ with .twitter -}}
<meta name="twitter:creator" content="@{{ . }}">
{{ end -}}
Expand Down
Loading