mirror of
https://github.com/bitol-io/open-data-contract-standard.git
synced 2025-05-28 19:34:02 +00:00
Add in dynamic nav for examples
This commit is contained in:
2
.github/workflows/docs-site-deploy.yaml
vendored
2
.github/workflows/docs-site-deploy.yaml
vendored
@@ -27,7 +27,7 @@ jobs:
|
|||||||
path: .cache
|
path: .cache
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
mkdocs-material-
|
mkdocs-material-
|
||||||
- run: pip install mkdocs-material mkdocs-open-in-new-tab "mkdocs-material[imaging]" mike
|
- run: pip install mkdocs-material mkdocs-open-in-new-tab "mkdocs-material[imaging]" mkdocs-awesome-pages-plugin mike
|
||||||
- run: bash src/script/build_docs.sh
|
- run: bash src/script/build_docs.sh
|
||||||
- run: |
|
- run: |
|
||||||
latest_tag=$(git describe --tags --abbrev=0)
|
latest_tag=$(git describe --tags --abbrev=0)
|
||||||
|
|||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -3,3 +3,10 @@
|
|||||||
.idea
|
.idea
|
||||||
site
|
site
|
||||||
*.iml
|
*.iml
|
||||||
|
.cache
|
||||||
|
|
||||||
|
docs/changelog.md
|
||||||
|
docs/contributing.md
|
||||||
|
docs/home.md
|
||||||
|
docs/vendors.md
|
||||||
|
docs/examples/**/*.md
|
||||||
@@ -17,46 +17,46 @@ This folder contains mainly excerpts of data contracts to illustrate specific se
|
|||||||
|
|
||||||
## Full example
|
## Full example
|
||||||
|
|
||||||
- [Full example](all/full-example.odcs.yaml)
|
- [Full example](all/full-example.md)
|
||||||
- [Postgres AdventureWorks](all/postgresql-adventureworks-contract.odcs.yaml)
|
- [Postgres AdventureWorks](all/postgresql-adventureworks-contract.md)
|
||||||
|
|
||||||
## Fundamentals
|
## Fundamentals
|
||||||
|
|
||||||
- [Table and column](fundamentals/table-column-description.odcs.yaml)
|
- [Table and column](fundamentals/table-column-description.md)
|
||||||
|
|
||||||
## Dataset and schema
|
## Dataset and schema
|
||||||
|
|
||||||
- [All schema types](schema/all-schema-types.odcs.yaml)
|
- [All schema types](schema/all-schema-types.md)
|
||||||
- [Data types](data-types/all-data-types.odcs.yaml)
|
- [Data types](data-types/all-data-types.md)
|
||||||
- [Table with single column](schema/table-column.odcs.yaml)
|
- [Table with single column](schema/table-column.md)
|
||||||
- [Table with columns and partitioning](schema/table-columns-with-partition.odcs.yaml)
|
- [Table with columns and partitioning](schema/table-columns-with-partition.md)
|
||||||
|
|
||||||
## Data quality
|
## Data quality
|
||||||
|
|
||||||
- [Column accuracy](quality/column-accuracy.odcs.yaml)
|
- [Column accuracy](quality/column-accuracy.md)
|
||||||
- [Column completeness](quality/column-completeness.odcs.yaml)
|
- [Column completeness](quality/column-completeness.md)
|
||||||
- [Column custom](quality/column-custom.odcs.yaml)
|
- [Column custom](quality/column-custom.md)
|
||||||
- [Column validity](quality/column-validity.odcs.yaml)
|
- [Column validity](quality/column-validity.md)
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
|
||||||
- [Azure server](server/azure-server.odcs.yaml)
|
- [Azure server](server/azure-server.md)
|
||||||
- [Kafka server](server/kafka-server.odcs.yaml)
|
- [Kafka server](server/kafka-server.md)
|
||||||
|
|
||||||
## Pricing
|
## Pricing
|
||||||
This section covers pricing when you bill your customer for using this data product.
|
This section covers pricing when you bill your customer for using this data product.
|
||||||
|
|
||||||
## Stakeholders
|
## Stakeholders
|
||||||
|
|
||||||
- [Stakeholders example](stakeholders/basic-four-dpo.odcs.yaml)
|
- [Stakeholders example](stakeholders/basic-four-dpo.md)
|
||||||
|
|
||||||
## Roles
|
## Roles
|
||||||
|
|
||||||
- [Service and operational roles](roles/service-and-operational-roles.odcs.yaml)
|
- [Service and operational roles](roles/service-and-operational-roles.md)
|
||||||
|
|
||||||
## Service-level agreement
|
## Service-level agreement
|
||||||
|
|
||||||
- [Database SLA](sla/database-table-sla.odcs.yaml)
|
- [Database SLA](sla/database-table-sla.md)
|
||||||
|
|
||||||
## Other properties
|
## Other properties
|
||||||
Coming soon.
|
Coming soon.
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ plugins:
|
|||||||
- open-in-new-tab
|
- open-in-new-tab
|
||||||
- search
|
- search
|
||||||
- social
|
- social
|
||||||
|
- awesome-pages
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
@@ -34,7 +35,9 @@ theme:
|
|||||||
nav:
|
nav:
|
||||||
- Home: 'home.md'
|
- Home: 'home.md'
|
||||||
- Standard: 'README.md'
|
- Standard: 'README.md'
|
||||||
- Examples: 'examples/README.md'
|
- Examples:
|
||||||
|
- 'examples/README.md'
|
||||||
|
- '...'
|
||||||
- Changelog: 'changelog.md'
|
- Changelog: 'changelog.md'
|
||||||
- Contributing: 'contributing.md'
|
- Contributing: 'contributing.md'
|
||||||
- Vendors: 'vendors.md'
|
- Vendors: 'vendors.md'
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ echo "Creating markdown file for each example"
|
|||||||
for f in docs/examples/**/*.yaml; do
|
for f in docs/examples/**/*.yaml; do
|
||||||
yaml_content=$(cat "$f")
|
yaml_content=$(cat "$f")
|
||||||
markdown_file_path="${f//odcs.yaml/md}"
|
markdown_file_path="${f//odcs.yaml/md}"
|
||||||
header="${f//docs\/examples\//}"
|
file_name=$(basename "$f" .odcs.yaml)
|
||||||
|
header=$(echo "${file_name//\-/ }" | sed -e "s/\b\(.\)/\u\1/g")
|
||||||
echo "Creating file: $markdown_file_path"
|
echo "Creating file: $markdown_file_path"
|
||||||
content=$(cat <<-END
|
content=$(cat <<-END
|
||||||
# ${header}
|
# ${header}
|
||||||
@@ -21,7 +22,8 @@ ${yaml_content}
|
|||||||
END
|
END
|
||||||
)
|
)
|
||||||
echo "$content" > "$markdown_file_path"
|
echo "$content" > "$markdown_file_path"
|
||||||
escaped_header="${header//\//\\/}"
|
base_path="${f//docs\/examples\//}"
|
||||||
|
escaped_header="${base_path//\//\\/}"
|
||||||
replacement_link="${escaped_header//odcs.yaml/md}"
|
replacement_link="${escaped_header//odcs.yaml/md}"
|
||||||
sed -i -e "s/$escaped_header/$replacement_link/g" docs/examples/README.md
|
sed -i '' -e "s/$escaped_header/$replacement_link/g" docs/examples/README.md
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user