Skip to content

Refactor Nunjucks to be used as the Express rendering engine#159

Open
danlivings-dxw wants to merge 1 commit intomainfrom
feature/nunjucks-as-express-rendering-engine
Open

Refactor Nunjucks to be used as the Express rendering engine#159
danlivings-dxw wants to merge 1 commit intomainfrom
feature/nunjucks-as-express-rendering-engine

Conversation

@danlivings-dxw
Copy link
Copy Markdown
Contributor

Express introduces the concepts of views and rendering, which simplifies the process of producing an HTML response. It's straightforward to use Nunjucks as the rendering engine as the nunjucks.render method has the same signature as the callback passed to Express.engine.

The views/ folder is now the location in which Nunjucks templates should be stored, and it currently contains:

  • _macros.njk: basic repeatable utilities
  • index.njk: the repository dashboard

@danlivings-dxw danlivings-dxw force-pushed the feature/nunjucks-as-express-rendering-engine branch 2 times, most recently from acdc04a to 3f782d4 Compare April 4, 2025 10:49
Express introduces the concepts of views and rendering, which simplifies
the process of producing an HTML response. It's straightforward to use
Nunjucks as the rendering engine as the `nunjucks.render` method has the
same signature as the `callback` passed to `Express.engine`.

The `views/` folder is now the location in which Nunjucks templates
should be stored, and it currently contains:

- `_macros.njk`: basic repeatable utilities
- `index.njk`: the repository dashboard
@danlivings-dxw danlivings-dxw force-pushed the feature/nunjucks-as-express-rendering-engine branch from 3f782d4 to 9e1085b Compare April 4, 2025 10:59
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.

1 participant