Skip to content

Conversation

@crazy-max
Copy link
Member

While working on another PR I found out there are liquid warnings introduced by #15494 in the logs: https://github.com/docker/docker.github.io/runs/8288660605?check_suite_focus=true#step:4:491

#15 44.17     Liquid Warning: Liquid syntax error (line 59): Expected end_of_string but found id in "{{if eq .Name "compose"}}" in compose/install/uninstall.md
#15 44.17     Liquid Warning: Liquid syntax error (line 59): [:dot, "."] is not a valid expression in "{{.Path}}" in compose/install/uninstall.md

Looking at this page https://docs.docker.com/compose/install/uninstall/#inspect-the-location-of-the-compose-cli-plugin, format is indeed broken:

image

To avoid this kind of issues in the future, sets Liquid error mode to strict.

Also got the following issue while enabling new error mode for Liquid:

#16 17.79   Liquid Exception: Liquid syntax error (/src/_includes/cli.md line 136): Unexpected character \ in "{{'[],map[],false,0,0s,default,\'\',""' | split: ',' }}" in engine/reference/commandline/app.md
#16 17.79                     ------------------------------------------------
#16 17.79       Jekyll 4.2.2   Please append `--trace` to the `build` command
#16 17.79                      for any additional information or backtrace.
#16 17.79                     ------------------------------------------------

This is fixed with last commit by using capture instead of assign.

@netlify
Copy link

netlify bot commented Sep 11, 2022

Deploy Preview for docsdocker ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit aad35fe
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/6332ebeb05a2060008bfec47
😎 Deploy Preview https://deploy-preview-15622--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@crazy-max crazy-max added the area/ux Issue affects functionality of docs.docker.com label Sep 11, 2022

# https://jekyllrb.com/docs/configuration/liquid/
liquid:
error_mode: strict
Copy link
Member

Choose a reason for hiding this comment

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

The only concern I have is that these errors may happen in external sources (eg reference YAMLdocs or Markdown we pull in), and while these should be addressed, we may not be able to do that immediately 🤔

I'm surprised that the format string in compose didn't show up in the rendered output though; ISTR that liquid would just ignore the "invalid" liquid templates, and leave them as-is (so the warnings could be ignored if it wasn't really a liquid template)

Copy link
Member Author

Choose a reason for hiding this comment

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

The only concern I have is that these errors may happen in external sources (eg reference YAMLdocs or Markdown we pull in), and while these should be addressed, we may not be able to do that immediately 🤔

We have the same issue with htmlproofer I guess, not sure what we can do about it except if upstream run the same validation steps like we do in buildx repo: docker/buildx#1218

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@netlify
Copy link

netlify bot commented Oct 31, 2022

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit a9981de
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/635f77566d75320008df12e2
😎 Deploy Preview https://deploy-preview-15622--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@StefanScherer StefanScherer left a comment

Choose a reason for hiding this comment

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

SGTM

Copy link
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

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

👍

@crazy-max crazy-max merged commit 5fe17fc into docker:main Oct 31, 2022
@crazy-max crazy-max deleted the fix-liquid-warning branch October 31, 2022 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ux Issue affects functionality of docs.docker.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants