Skip to content

Commit

Permalink
Merge branch 'release/4.0.3' into v4
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Sep 6, 2024
2 parents cbd06a9 + 5a4f93f commit 2a20276
Show file tree
Hide file tree
Showing 4 changed files with 1,347 additions and 634 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template Comments Changelog

## 4.0.3 - UNRELEASED
## 4.0.3 - 2024.09.06
### Changed
* Template Comments now requires `craftcms/cms` `^4.12.0` going forward, because of the addition of breaking changes in the version of Twig that it requires

Expand Down
10 changes: 5 additions & 5 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ It also records performance data, so you know how much overhead each `{% block %

With more complicated "content builder" setups, this can help bring clarity to where the various HTML on your pages is coming from.

Check warning on line 35 in docs/docs/index.md

View workflow job for this annotation

GitHub Actions / build (20.x)

"various" is a weasel word

This can be especially handy when dealing with OPC (Other People's Code). It solves [this problem](https://craftcms.stackexchange.com/questions/27769/how-can-i-print-the-name-of-every-template-being-rendered-in-html-comments-when).
This can be especially handy when dealing with OPC (Other Peoples Code). It solves [this problem](https://craftcms.stackexchange.com/questions/27769/how-can-i-print-the-name-of-every-template-being-rendered-in-html-comments-when).

Check warning on line 37 in docs/docs/index.md

View workflow job for this annotation

GitHub Actions / build (20.x)

"especially" can weaken meaning

![Screenshot](./resources/screenshots/templatecomments-example.png)

## Configuring Template Comments

All configuration is done via the `config.php`. For it to work, you'll need to copy it to your `craft/config/` directory, and rename it `templatecomments.php`
All configuration is done via the `config.php`. For it to work, youll need to copy it to your `craft/config/` directory, and rename it `templatecomments.php`

Check warning on line 43 in docs/docs/index.md

View workflow job for this annotation

GitHub Actions / build (20.x)

"is done" may be passive voice

Here's what the default settings look like:
Heres what the default settings look like:

```php
return [
Expand Down Expand Up @@ -85,9 +85,9 @@ return [

## Using Template Comments

Nothing much to say here; install the plugin, and it "just works". If `devMode` is off, it doesn't even install itself, so there should be zero effect in production.
Nothing much to say here; install the plugin, and it "just works". If `devMode` is off, it doesnt even install itself, so there should be zero effect in production.

Check warning on line 88 in docs/docs/index.md

View workflow job for this annotation

GitHub Actions / build (20.x)

"just" can weaken meaning

The `<<< END <<<` comments all include performance data in milliseconds, e.g.:
The `<<< END <<<` comments all include performance data in milliseconds, for example:
```html
<!-- 22.34ms <<< TEMPLATE END <<< templatecomments/_layout.twig -->
```
Expand Down
Loading

0 comments on commit 2a20276

Please sign in to comment.