Skip to content

Add a test for "index.md" frontmatter and fix the repo to match - #2377

Merged
knative-prow-robot merged 11 commits into
knative:masterfrom
evankanderson:detestable
May 15, 2020
Merged

Add a test for "index.md" frontmatter and fix the repo to match#2377
knative-prow-robot merged 11 commits into
knative:masterfrom
evankanderson:detestable

Conversation

@evankanderson

Copy link
Copy Markdown
Member

Hugo expects page bundles to have an _index.md or index.md file, but GitHub expects README.md. Until gohugoio/hugo#4691 is fixed (still in flight, negotiating with hugo owner), it seems simplest to simply create index.md files for these leaf bundles with appropriate frontmatter and a {{% readfile file="README.md" %}} shortcode.

Proposed Changes

  • Migrates frontmatter in about 50 directories into index.md files.
  • Adds the _index.html frontpage that is in the website, so that we can eventually stop copying the file during website build.
  • Adds a test to prevent backsliding

@googlebotgooglebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 9, 2020
@evankanderson

Copy link
Copy Markdown
MemberAuthor

Here is a script which does not work for some cases which I used to start the conversion (just for reference):

#!/bin/bashecho Working on $1
INDEX="${1%README.md}index.md"
awk '/^---/, /^$/'"$1">"$INDEX"echo'{{% readfile file="README.md" %}}'>>"$INDEX"
awk '/^---/, /^$/ {next}; {print}'"$1">"$1.tmp"&& mv "$1.tmp""$1"echo Wrote $INDEX and $1

@evankanderson

Copy link
Copy Markdown
MemberAuthor

Verified TestHugoBundles is run, will fix the markdown issue.

@evankanderson

Copy link
Copy Markdown
MemberAuthor

The test failure is fixed by knative/test-infra#1898

evankanderson pushed a commit to evankanderson/docs that referenced this pull request Apr 9, 2020
knative-prow-robot pushed a commit that referenced this pull request Apr 10, 2020
@evankanderson

Copy link
Copy Markdown
MemberAuthor

/retest pull-knative-docs-integration-tests

@evankanderson

Copy link
Copy Markdown
MemberAuthor

/hold

I just found some odd rendering that I need to investigate.

@knative-prow-robotknative-prow-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 10, 2020
@evankanderson

Copy link
Copy Markdown
MemberAuthor

@evankanderson

Copy link
Copy Markdown
MemberAuthor

/hold cancel

@knative-prow-robotknative-prow-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 15, 2020
@evankanderson

Copy link
Copy Markdown
MemberAuthor

/retest

@evankanderson

Copy link
Copy Markdown
MemberAuthor

The rendering works with knative/website#161 merged and applied on the website side.

I'll still need to update the other branches after this before we can drop the find -exec if ... ; then mv ..., but this gets us closer.

@knative-prow-robotknative-prow-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 29, 2020
@abrennan89
abrennan89 requested review from abrennan89 and removed request for samodellMay 15, 2020 15:27
@abrennan89

Copy link
Copy Markdown
Contributor

/lgtm

@knative-prow-robotknative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label May 15, 2020
@knative-prow-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abrennan89, evankanderson

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

The pull request process is described here

Details 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

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesIndicates the PR's author has signed the CLA.lgtmIndicates that a PR is ready to be merged.size/XXLDenotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@evankanderson@abrennan89@knative-prow-robot@mattmoor@googlebot