-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
📚 Doc: Add detailed documentation for the templates guide #3113
Conversation
Warning Rate limit exceeded@ReneWerner87 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 38 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe documentation for template engines in the Fiber framework has been significantly enhanced. The section has been restructured to provide clearer guidance on integrating custom template engines, with detailed examples and new subsections covering supported engines, rendering templates, and advanced features. Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
- Add link to https://github.com/gofiber/template in Templates Guide - Fix typo: missing period in info block about ctx.Render()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
docs/guide/templates.md (1)
11-11
: Enhance introductory statement for clarity.Consider expanding this introduction to explicitly mention the types of templates (e.g., HTML, Pug) supported and typical use cases, which could help newcomers understand the context better.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- docs/guide/templates.md (4 hunks)
Additional context used
Markdownlint
docs/guide/templates.md
120-120: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
166-166: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
214-214: Expected: asterisk; Actual: dash
Unordered list style(MD004, ul-style)
Additional comments not posted (5)
docs/guide/templates.md (5)
13-29
: Well-structured introduction to Template Engines.This section clearly explains how to initialize a Fiber application with a custom template engine. The configuration options are well-detailed, enhancing the understanding of
ViewsLayout
andPassLocalsToViews
.
51-57
: Detailed explanation of theViews
interface.The methods
Load()
andRender()
are well-explained, providing clarity on their usage within the Fiber framework. This is crucial for developers implementing custom template engines.
67-91
: Clear example of rendering templates.The example provided is straightforward and demonstrates the practical use of the
ctx.Render()
function effectively. This aligns well with the PR's objective to enhance usability and clarity.
Line range hint
216-272
: Comprehensive full example section.This section effectively demonstrates the use of the Go Fiber template engine with detailed code snippets. It provides a practical, real-world example that will greatly aid users in understanding how to implement templates in their projects.
32-45
: Comprehensive list of supported engines.The links provided for each template engine are helpful. However, ensure all links are up-to-date and lead to the correct resources as external links can often become outdated.
Verification successful
All links are active and correct.
The verification script confirmed that all external links in the
docs/guide/templates.md
file are active and lead to the correct resources. No broken links were found.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify that all external links are active and correct. for url in $(grep -oP '(?<=\().*?(?=\))' docs/guide/templates.md | grep 'https'); do if ! curl -o /dev/null -sIf "$url"; then echo "Broken link: $url" fi doneLength of output: 1680
* Organize and reword templates guide * Add full example to templates guide * Add advanced templating section to template guide * Add template repo link and fix typo in Templates guide - Add link to https://github.com/gofiber/template in Templates Guide - Fix typo: missing period in info block about ctx.Render() * Update docs/guide/templates.md * Update docs/guide/templates.md --------- Co-authored-by: RW <rene@gofiber.io>
Description
This issue proposes to provide more snippets of ways to use templates in Go Fiber’s templates guide.
Fixes #3108
Changes introduced
Type of change
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/
directory for Fiber's documentation.