hexojs / hexojs/hexo-renderer-pug

`extends`ing templates in same directory doesn't replace blocks

Open
#6 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11
Forks
4
PR merge metrics
No merged PRs in 30d

Description

This file configuration was not replacing my blocks with content when extending templates:

```
theme/name/layout/page.pug extends layout with some block content
theme/name/layout/layout.pup
```
page.pug blocks don't appear in the output.

Workaround:
```
theme/name/layout/page.pug extends _partials/layout
theme/name/layout/_partials/layout.pug
```

Files in the same directory worked when using `pug-cli` to compile. Not sure why it didn't in the hexo-renderer.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing how hexo-renderer handles the page.pug and layout.pug paths with pug-cli, using the same-directory example and the _partials/layout workaround as reproductions. Trace template resolution and verify that blocks from page.pug appear in the rendered output while the workaround continues to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, pug
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.