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

Switch from literal includes to {{readFile}} invocations. #1409

Closed

Conversation

evankanderson
Copy link
Member

Proposed Changes

  • Use `{{readFile "local-filename"}} instead of repeating text content.

I need instructions on how to test if this worked correctly -- any tips or a writeup I can use?

Note that filenames and pubspec.yaml had actually drifted slightly from the content in GitHub, which is why it would be nice to do includes like this.

I also have a question out to @jonasfj about the Dockerfile contents, which don't seem to COPY or build the dart application.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label May 31, 2019
@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 31, 2019
@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: evankanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@RichieEscarez
Copy link
Contributor

Sorry, i need to block some time to complete the docs maintainer info but a really short version of the local testing instructions are here: #1239 (comment)

@RichieEscarez
Copy link
Contributor

RichieEscarez commented May 31, 2019

I think the "out of the box" version of that Hugo command requires file paths relative to the site root. But, i created an override version to use relative files (readfile.md) - that way content will work as it gets "versioned" (moved into an archive folder not at root).

For example (_index.md):

{{% readfile file="README.md" relative="true" markdown="true" %}}

Maybe we can modify it to include a code="true" for "including" non-html/markdown content?

@RichieEscarez RichieEscarez added kind/enhancement kind/infrastructure Docs infrastructure related priority/high size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 31, 2019
@RichieEscarez
Copy link
Contributor

A few things need to get merged (and then tested) but the support for including code is here: knative/website#63

@rgregg
Copy link
Contributor

rgregg commented Jul 24, 2019

I'm generally not a fan of this. While it makes our website stay up to day, it makes the markdown not readable without manually parsing these tags. I know it's a pain to keep the content up to date in two places, but I think that pain is worth the ability to read these markdown files.

@evankanderson
Copy link
Member Author

The markdown seems fairly straightforward, and helps to ensure that the file contents actually align:

https://github.com/knative/docs/blob/cb26c02fed762540c9e4a28aa87e71434c03b603/community/samples/serving/helloworld-dart/README.md

I still need to merge and figure out how to validate the hugo/netlify templates, but I've been buried under other Google work.

@knative-housekeeping-robot

Issues go stale after 90 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle stale.
Stale issues rot after an additional 30 days of inactivity and eventually close.
If this issue is safe to close now please do so by adding the comment /close.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/lifecycle stale

@knative-prow-robot knative-prow-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 13, 2020
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 27, 2020
@knative-prow-robot
Copy link
Contributor

@evankanderson: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@knative-housekeeping-robot

Stale issues rot after 30 days of inactivity.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.
Rotten issues close after an additional 30 days of inactivity.
If this issue is safe to close now please do so by adding the comment /close.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/lifecycle rotten

@knative-prow-robot knative-prow-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 28, 2020
@knative-housekeeping-robot

Rotten issues close after 30 days of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/close

@knative-prow-robot
Copy link
Contributor

@knative-housekeeping-robot: Closed this PR.

In response to this:

Rotten issues close after 30 days of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh by adding the comment /remove-lifecycle rotten.

Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. kind/infrastructure Docs infrastructure related lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. priority/high size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants