Skip to content

Commit

Permalink
Merge pull request #69 from openpreserve/fix/schema-publication
Browse files Browse the repository at this point in the history
FIX: Schema versioning and publication
  • Loading branch information
carlwilson committed May 10, 2023
2 parents 62cdec9 + dbd5eb3 commit 303844d
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 13 deletions.
1 change: 1 addition & 0 deletions docs/_data/par.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version: 1.2
17 changes: 5 additions & 12 deletions docs/_layouts/forward.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">

{% assign time = 0 %}
{% assign targetname = page.target %}
{% assign redirect_target = "/schema/" | append: site.data.par.version | append: page.target %}

{% if page.time %}
{% assign time = page.time %}
{% endif %}

{% if page.targetname %}
{% assign targetname = page.targetname %}
{% endif %}

{% capture title %}Redirecting to {{ targetname }}{% endcapture %}
{% if page.targettitle %}
{% assign title = page.targettitle %}
{% endif %}
<meta http-equiv="refresh" content="{{ time }};url={{ page.target }}"/>
<link rel="canonical" href="{{ page.target }}"/>
{% capture title %}Redirecting to {{ redirect_target }}{% endcapture %}
<meta http-equiv="refresh" content="{{ time }};url={{ redirect_target }}"/>
<link rel="canonical" href="{{ redirect_target }}"/>
<title>{{ title }}</title>
<style>
body {
Expand All @@ -38,7 +31,7 @@ <h1>{{ title }}</h1>
<p>This document has moved!</p>
{% endif %}

<p>Redirecting to <a href="{{ page.target }}">{{ targetname }}</a> in {{ time }} seconds.</p>
<p>Redirecting to <a href="{{ redirect_target }}">{{ redirect_target }}</a> in {{ time }} seconds.</p>

</body>
</html>
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/schema/business-rule.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /business-rule.json
---
4 changes: 4 additions & 0 deletions docs/schema/format.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /format.json
---
2 changes: 1 addition & 1 deletion docs/schema/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
layout: forward
target: ./1.2
target: /schema/{{ site.data.par.version }}/types.json
---
4 changes: 4 additions & 0 deletions docs/schema/par-property.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /par-property.json
---
4 changes: 4 additions & 0 deletions docs/schema/preservation-action-type.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /preservation-action-type.json
---
4 changes: 4 additions & 0 deletions docs/schema/preservation-action.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /preservation-action.json
---
4 changes: 4 additions & 0 deletions docs/schema/representation-format.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /representation-format.json
---
4 changes: 4 additions & 0 deletions docs/schema/tool.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /tools.json
---
4 changes: 4 additions & 0 deletions docs/schema/types.json/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
layout: forward
target: /types.json
---

0 comments on commit 303844d

Please sign in to comment.