Template: resolve relative includes against the including file directory
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by locating the template include resolver and its tests; the payload does not name their paths. Trace how the including template’s directory and the process working directory are used, then check the documented base-directory policy. Done means nested relative includes resolve consistently from another working directory, absolute paths remain unchanged, and recursive includes are still rejected.
Written by the indexing model from the issue text.
Description
Summary
File includes currently interpret a relative path against the process working directory rather than the directory of the template containing the include.
Proposed improvement
When rendering /views/pages/home.html, {% include "partials/nav.html" %} should resolve to /views/pages/partials/nav.html, or to /views/partials/nav.html according to the documented base-directory policy. Keep absolute paths unchanged and preserve include-depth enforcement.
Tests
Cover nested relative includes from different directories, invocation from an unrelated working directory, absolute paths, and recursive include rejection.
- Dominant language
- C
- Stars
- 16
- Forks
- 7
- Avg merge
- 4h 28m
- Merged PRs (30d)
- 191
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from c4punks/CWIST
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 57/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
Similar issues
-
要トリアージ 辞書
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
yksr-melt/Meltype#1625 · 1 reaction ·
Maintainers usually reply within 1 day
-
kind/bug priority/medium qa_automation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yugabyte/yugabyte-db#37324 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
tree-sitter/tree-sitter#6111 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
meshcore-dev/MeshCore#3781 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 80/100
ly05010419/MacNativeGames#1897 ·
Maintainers usually reply within 1 day