Skip to content

Conversation

@crazy-max
Copy link
Member

As discussed with @dockertopia and @jedevc, split bake and guides from #14905 as there is more work to do with guides.

Signed-off-by: CrazyMax crazy-max@users.noreply.github.com

@netlify
Copy link

netlify bot commented Jul 22, 2022

Deploy Preview for docsdocker ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit af0fad1
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/62e16ebd5b664600085cec10
😎 Deploy Preview https://deploy-preview-15194--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 force-pushed the build-bake-section branch from e6ce90f to 7085fc4 Compare July 22, 2022 22:31
@crazy-max crazy-max added the area/build Relates to Dockerfiles or docker build command label Jul 22, 2022
@crazy-max crazy-max marked this pull request as draft July 25, 2022 08:57
@crazy-max crazy-max force-pushed the build-bake-section branch from 7085fc4 to 029793a Compare July 25, 2022 09:51
@crazy-max crazy-max marked this pull request as ready for review July 25, 2022 09:51
@crazy-max
Copy link
Member Author

crazy-max commented Jul 25, 2022

#16 156.4 - ./_site/build/bake/compose-file/index.html
#16 156.4   *  linking to internal hash #hcl-definition that does not exist (line 196)
#16 156.4      <a href="file-definition.md#hcl-definition">HCL format</a>
#16 156.4   *  linking to internal hash #target that does not exist (line 114)
#16 156.4      <a href="file-definition.md#target">target</a>
#16 156.4 - ./_site/build/bake/file-definition/index.html
#16 156.4   *  internally linking to compose-file.md, which does not exist (line 412)
#16 156.4      <a href="compose-file.md">Building from Compose file</a>
#16 156.4   *  internally linking to configuring-build.md, which does not exist (line 219)
#16 156.4      <a href="configuring-build.md">Configuring builds</a>
#16 156.4   *  internally linking to hcl-funcs.md, which does not exist (line 259)
#16 156.4      <a href="hcl-funcs.md">User defined HCL functions</a>
#16 156.4   *  linking to internal hash #remote-definition that does not exist (line 266)
#16 156.4      <a href="file-definition.md#remote-definition">imported remotely</a>
#16 156.4 - ./_site/build/bake/hcl-funcs/index.html
#16 156.4   *  linking to internal hash #variable that does not exist (line 113)
#16 156.4      <a href="file-definition.md#variable">File definition</a>
#16 156.4 - ./_site/build/bake/index.html
#16 156.4   *  internally linking to build-contexts.md, which does not exist (line 145)
#16 156.4      <a href="build-contexts.md">Defining additional build contexts and linking targets</a>
#16 156.4   *  internally linking to compose-file.md, which does not exist (line 146)
#16 156.4      <a href="compose-file.md">Building from Compose file</a>
#16 156.4   *  internally linking to configuring-build.md, which does not exist (line 143)
#16 156.4      <a href="configuring-build.md">Configuring builds</a>
#16 156.4   *  internally linking to file-definition.md, which does not exist (line 142)
#16 156.4      <a href="file-definition.md">File definition</a>
#16 156.4   *  internally linking to hcl-funcs.md, which does not exist (line 144)
#16 156.4      <a href="hcl-funcs.md">User defined HCL functions</a>
#16 156.4 
#16 156.4 HTML-Proofer found 12 failures!

Looks like the include_remote plugin does not resolve markdown files for links 😞. I guess this is because the stub file is already rendered or maybe I missed some parts of the include implementation from Jekyll core. Will take a look.

@crazy-max
Copy link
Member Author

crazy-max commented Jul 25, 2022

Looks like the include_remote plugin does not resolve markdown files for links 😞. I guess this is because the stub file is already rendered or maybe I missed some parts of the include implementation from Jekyll core. Will take a look.

Worse than I thought.. include or include_remote does not render links to markdown files. Jekyll limitation 😣

Doing this:

---
title: "High-level build options with Bake"
keywords: build, buildx, bake, buildkit, hcl, json, compose
---

{% include_remote bake/index.md 2 -1 -%}

## Next steps

* [File definition](file-definition.md)
* [Configuring builds](configuring-build.md)
* [User defined HCL functions](hcl-funcs.md)
* [Defining additional build contexts and linking targets](build-contexts.md)
* [Building from Compose file](compose-file.md)

Last * [File definition](file-definition.md) link is properly rendered to http://localhost:4000/build/bake/file-definition/ but one from include in {% include_remote bake/index.md 2 -1 -%} renders to http://localhost:4000/build/bake/file-definition.md

Will find a way to solve this. (cc @thaJeztah)

@crazy-max crazy-max force-pushed the build-bake-section branch from 029793a to 9da3356 Compare July 25, 2022 12:54
@crazy-max
Copy link
Member Author

Ok found a better way to tackle this issue. I removed the include_remote plugin and now directly handles includes in our fetch_remote plugin. This way there is no post-processing with liquid tags and we don't need to fetch resources in _includes folder anymore. Everything is now managed through frontmatter vars. See first commit for more info. (cc @thaJeztah)

@crazy-max
Copy link
Member Author

Looks good, PTAL @jedevc @dockertopia

Copy link
Contributor

@dockertopia dockertopia left a comment

Choose a reason for hiding this comment

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

LGTM.
I'll merge this one once #15164 is good to go.

…te include

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the build-bake-section branch from 8b3ad76 to fbdef79 Compare July 27, 2022 16:50
@crazy-max crazy-max enabled auto-merge July 27, 2022 16:54
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the build-bake-section branch from fbdef79 to af0fad1 Compare July 27, 2022 16:58
@crazy-max crazy-max merged commit 8b1c893 into docker:master Jul 27, 2022
@crazy-max crazy-max deleted the build-bake-section branch July 27, 2022 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/build Relates to Dockerfiles or docker build command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants