Skip to content

Commit

Permalink
Merge pull request #25 from databio/dev
Browse files Browse the repository at this point in the history
Release 0.3.0
  • Loading branch information
nsheff authored Nov 7, 2023
2 parents a573613 + bdbba33 commit cea5a7a
Show file tree
Hide file tree
Showing 25 changed files with 357 additions and 679 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.7", "3.10", "3.11"]
python-version: ["3.8", "3.11"]
os: [ubuntu-latest]

steps:
Expand Down
2 changes: 1 addition & 1 deletion demo_book/book_var1/book.jinja
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% for chapter in chapters %}{{ _md[chapter] }}
{% for chapter in chapters %}{{ _md[chapter].content }}
{% endfor %}
2 changes: 1 addition & 1 deletion demo_book/book_var2/book.jinja
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{% for chapter in _yaml["chapters"] %}{{ _md[chapter] }}
{% for chapter in _yaml["chapters"].content %}{{ _md[chapter].content }}
{% endfor %}
4 changes: 4 additions & 0 deletions demo_book/md/03-savings.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
metadata_variable: l0xn37lks8
---

# Chapter 3: Savings

This is chapter 3 on savings.
Expand Down
10 changes: 10 additions & 0 deletions demo_book/variable_variables/_markmeld.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
targets:
default:
jinja_template: book.jinja
output_file: "demo_output.txt"
command: cat > {output_file}
data:
md_globs:
- ../md/*.md
yaml_files:
chapters: chapters.yaml
7 changes: 7 additions & 0 deletions demo_book/variable_variables/book.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% for chapter in _yaml["chapters"].content %}{{ _md[chapter].content }}
{% endfor %}

{% for chapter in _yaml["chapters"].content %}
{{_md[chapter].path}}
{{_md[chapter].frontmatter.metadata_variable}}
{% endfor %}
3 changes: 3 additions & 0 deletions demo_book/variable_variables/chapters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- 01-intro
- 02-credit
- 03-savings
15 changes: 15 additions & 0 deletions demo_book/variable_variables/demo_output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Introduction

This is my introduction chapter

...
# Credit

This is chapter 2 on credit.

...
# Chapter 3: Savings

This is chapter 3 on savings.

...
Loading

0 comments on commit cea5a7a

Please sign in to comment.