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

Add templating example with tera #267

Merged
merged 1 commit into from
Jun 6, 2019
Merged

Add templating example with tera #267

merged 1 commit into from
Jun 6, 2019

Conversation

milesgranger
Copy link
Contributor

@milesgranger milesgranger commented May 31, 2019

Presently, there are no examples demonstrating rendering HTML; this PR addresses that.

Description

Added an example using tera which renders some variables into a template.

Motivation and Context

Conveys a concise way to render a HTML response with Tide.

Relates to #207, and might even close it?

How Has This Been Tested?

Verified functionality locally, and passes tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks heaps for this PR -- commented on a few nits, but think this is a great direction!

@milesgranger
Copy link
Contributor Author

My pleasure! I've made the updates, per your request. Guess I've gotten into the habit of doing unwraps and expects for demo / examples, but I like your way of thinking; should set a good example. 🎩

Please let me know if there is anything else I should update.

Copy link
Member

@yoshuawuyts yoshuawuyts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@yoshuawuyts yoshuawuyts merged commit 4486ba0 into http-rs:master Jun 6, 2019
@milesgranger milesgranger deleted the tera-example branch June 7, 2019 18:19
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.

2 participants