Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix building context stack for inner elements of sections #54

Conversation

roblillack
Copy link

This fixes #53. When building the context stack for elements inside sections now, we're not starting with the outermost context anymore, but the innermost.

Two tests are added which test for the correct behavior here, all other tests still pass.

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2021

Codecov Report

Merging #54 (4f2dfd2) into master (2ebfd28) will decrease coverage by 1.45%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #54      +/-   ##
==========================================
- Coverage   85.77%   84.31%   -1.46%     
==========================================
  Files           2        2              
  Lines         506      440      -66     
==========================================
- Hits          434      371      -63     
+ Misses         49       46       -3     
  Partials       23       23              
Impacted Files Coverage Δ
mustache.go 85.50% <100.00%> (-1.25%) ⬇️
partials.go 69.69% <0.00%> (-3.99%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2ebfd28...4f2dfd2. Read the comment docs.

@cbroglie cbroglie merged commit f01d98a into cbroglie:master Jun 9, 2021
@cbroglie
Copy link
Owner

cbroglie commented Jun 9, 2021

Thanks @roblillack!

roblillack added a commit to roblillack/tack that referenced this pull request Jun 10, 2021
This adds a bunch of fully integrated test sites.

While here, fix some bugs:
- Fix not being able to read `.md` or `.yaml` files instead of `.mkd` and `.yml`. #22
- Fix title casing. #3 
- Fix iterate `siblings` in correct order. #4
- Fix crash for non-existent asset directories. #5 
- Fix rendering section context. #8 (Needs cbroglie/mustache#54)
- Fix rendering non-false value sections. #23 (Needs cbroglie/mustache#55)

Also, add these features:
- Allow the root index page to be defined with metadata and markup directly in `content/`. #19
- Add support for empty pages (no metadata or markup defined) if they have non-empty children. #20
- Add support for `children` to iterate non-floating child pages. #16
- Add support for `posts` to iterate all child pages marked with a date. #18
- Add support for `menu` sections to iterate all `siblings` and the current page (only for non-floating pages). #17
- For each entry of page collections (`children`, `menu`, `navigation`, `posts`, `siblings`) add `first` and `last` boolean values that can be used to construct better separators. #21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Context stacks seem to be walked the wrong direction for bool sections
3 participants