apache / celix-site

Website sources for the Apache Celix website
https://celix.apache.org/
Apache License 2.0
8 stars 10 forks source link

Update docs extraction script to handle preset titles #10

Closed rlenferink closed 4 years ago

rlenferink commented 4 years ago

This updates the docs extraction script to be able to handle preset properties (e.g. titles); meaning after a release this script can be called with the released version and documentation will be pre-processed automatically.

Tested using:

[root@centos8 test]# ./extract_celix_docs.sh 1.0.0
'source/./test/bla.md' -> 'target/1.0.0/celix/./test/bla.md'
'source/./bla2.md' -> 'target/1.0.0/celix/./bla2.md'
'source/./bla.md' -> 'target/1.0.0/celix/./bla.md'
[root@centos8 test]# cat source/bla2.md
# Title
Description
[root@centos8 test]# cat target/1.0.0/celix/bla2.md
---
title: bla2.md
type: celix-doc
version: 1.0.0
---

# Title
Description
[root@centos8 test]# cat source/test/bla.md
---
title: Bla die Bla / Test
---

# Title
Description
[root@centos8 test]# cat target/1.0.0/celix/test/bla.md
---
title: Bla die Bla / Test
type: celix-doc
version: 1.0.0
---

# Title
Description
[root@centos8 test]# cat source/bla.md
---
title: Bla die ba 2
type: celix-alternative-doc
---

# Title
Description
[root@centos8 test]# cat target/1.0.0/celix/bla.md
---
title: Bla die ba 2
type: celix-alternative-doc
version: 1.0.0
---

# Title
Description

Xref: https://github.com/apache/celix/pull/271

netlify[bot] commented 4 years ago

Deploy preview for celix-staging ready!

Built with commit 3891c3a3a9a841271ca4f42bffe059d05f5b58e6

https://deploy-preview-10--celix-staging.netlify.app