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
|
||||
restore-keys: |
|
||||
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: |
|
||||
latest_tag=$(git describe --tags --abbrev=0)
|
||||
|
||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -3,3 +3,10 @@
|
||||
.idea
|
||||
site
|
||||
*.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](all/full-example.odcs.yaml)
|
||||
- [Postgres AdventureWorks](all/postgresql-adventureworks-contract.odcs.yaml)
|
||||
- [Full example](all/full-example.md)
|
||||
- [Postgres AdventureWorks](all/postgresql-adventureworks-contract.md)
|
||||
|
||||
## Fundamentals
|
||||
|
||||
- [Table and column](fundamentals/table-column-description.odcs.yaml)
|
||||
- [Table and column](fundamentals/table-column-description.md)
|
||||
|
||||
## Dataset and schema
|
||||
|
||||
- [All schema types](schema/all-schema-types.odcs.yaml)
|
||||
- [Data types](data-types/all-data-types.odcs.yaml)
|
||||
- [Table with single column](schema/table-column.odcs.yaml)
|
||||
- [Table with columns and partitioning](schema/table-columns-with-partition.odcs.yaml)
|
||||
- [All schema types](schema/all-schema-types.md)
|
||||
- [Data types](data-types/all-data-types.md)
|
||||
- [Table with single column](schema/table-column.md)
|
||||
- [Table with columns and partitioning](schema/table-columns-with-partition.md)
|
||||
|
||||
## Data quality
|
||||
|
||||
- [Column accuracy](quality/column-accuracy.odcs.yaml)
|
||||
- [Column completeness](quality/column-completeness.odcs.yaml)
|
||||
- [Column custom](quality/column-custom.odcs.yaml)
|
||||
- [Column validity](quality/column-validity.odcs.yaml)
|
||||
- [Column accuracy](quality/column-accuracy.md)
|
||||
- [Column completeness](quality/column-completeness.md)
|
||||
- [Column custom](quality/column-custom.md)
|
||||
- [Column validity](quality/column-validity.md)
|
||||
|
||||
## Server
|
||||
|
||||
- [Azure server](server/azure-server.odcs.yaml)
|
||||
- [Kafka server](server/kafka-server.odcs.yaml)
|
||||
- [Azure server](server/azure-server.md)
|
||||
- [Kafka server](server/kafka-server.md)
|
||||
|
||||
## Pricing
|
||||
This section covers pricing when you bill your customer for using this data product.
|
||||
|
||||
## Stakeholders
|
||||
|
||||
- [Stakeholders example](stakeholders/basic-four-dpo.odcs.yaml)
|
||||
- [Stakeholders example](stakeholders/basic-four-dpo.md)
|
||||
|
||||
## 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
|
||||
|
||||
- [Database SLA](sla/database-table-sla.odcs.yaml)
|
||||
- [Database SLA](sla/database-table-sla.md)
|
||||
|
||||
## Other properties
|
||||
Coming soon.
|
||||
|
||||
@@ -7,6 +7,7 @@ plugins:
|
||||
- open-in-new-tab
|
||||
- search
|
||||
- social
|
||||
- awesome-pages
|
||||
|
||||
theme:
|
||||
name: material
|
||||
@@ -34,7 +35,9 @@ theme:
|
||||
nav:
|
||||
- Home: 'home.md'
|
||||
- Standard: 'README.md'
|
||||
- Examples: 'examples/README.md'
|
||||
- Examples:
|
||||
- 'examples/README.md'
|
||||
- '...'
|
||||
- Changelog: 'changelog.md'
|
||||
- Contributing: 'contributing.md'
|
||||
- Vendors: 'vendors.md'
|
||||
|
||||
@@ -10,7 +10,8 @@ echo "Creating markdown file for each example"
|
||||
for f in docs/examples/**/*.yaml; do
|
||||
yaml_content=$(cat "$f")
|
||||
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"
|
||||
content=$(cat <<-END
|
||||
# ${header}
|
||||
@@ -21,7 +22,8 @@ ${yaml_content}
|
||||
END
|
||||
)
|
||||
echo "$content" > "$markdown_file_path"
|
||||
escaped_header="${header//\//\\/}"
|
||||
base_path="${f//docs\/examples\//}"
|
||||
escaped_header="${base_path//\//\\/}"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user