examples/configuration/templates/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Configuration Examples</title>
<style>
body {
margin: 0;
margin-left: auto;
margin-right: auto;
font-family: Arial, Helvetica, sans-serif;
max-width: 800px;
}
</style>
</head>
<body>
<h1>Configuration Examples</h1>
<h2>snowman.yaml</h2>
<p>Here is a value/key pair from your <code>snowman.yaml</code>file.</p>
<code>a_config_key: {{ config.Metadata.a_config_key }}</code>
<h2>SPARQL</h2>
<p>If it suits your case you can define configuration using SPARQL's <code>BIND</code> and <code>VALUES</code> keywords! The following value and list comes from a query file.</p>
<code>
{{ index (index . 0).fancy_value }}
{{ range . }}
{{ .uri }} | {{ .name }}
{{ end }}
</code>
<h2>Environment variables</h2>
<p>You can also set configuration values using environment variables! In case you have <code>PATH</code> set it will render below.</p>
<code>{{ env "PATH" }}</code>
<h2>Current View Configuration</h2>
<p>You can also get configuration values related to the current view.</p>
<ul>
<li>Query file: <code>{{ current_view.QueryFile }}</code></li>
<li>Template file: <code>{{ current_view.TemplateFile }}</code></li>
<li>Output: <code>{{ current_view.Output }}</code></li>
<li>Unsafe: <code>{{ current_view.Unsafe }}</code></li>
</ul>
</body>
</html>