-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
New "how to contribute to docs" instructions #1917
Comments
Issues go stale after 90 days of inactivity. Send feedback to Knative Productivity Slack channel or file an issue in knative/test-infra. /lifecycle stale |
/kind good-first-issue |
This issue is stale because it has been open for 90 days with no |
This issue is stale because it has been open for 90 days with no |
Two items remain:
|
I think it's safe to close this now since we've moved to mkdocs. Anything left to be added should probably just be opened as a new task. I don't think prow auto-selects reviewers anymore anyway. |
Need to author the instructions about how to contribute to knative.dev, including all the missing Hugo/Docsy/site requirements. When and where to add:
General info about site:
- Hugo
- Docsy
- Markdown processor info
- Netlify
- knative/website repo
front matter
where that element shows relative to other content in the Nav tree (otherwise elements are
alphabetical). More info: https://gohugo.io/content-management/front-matter/#predefined
alternative (shorter) title for the Nav tree.
Redirect URLs for moved and renamed source files (add
aliases
to frontmatter): Ensure that all content affected by the nav changes gets a "redirect" #1925Dynamic variables. Use them to reduce release maintenance and ensure content accuracy. The following variable are dynamically populated based on the URL of the content in knative.dev:
{{< branch >}}
variable (shortcode){{< version >}}
variable (shortcode)See examples in the smoketest page
SEO (filename (no capital letters, no product names), titles (sentence case), cross links)
Document linking conventions - all ./ are required for "same directory" relative links
If there is more than a single .md file in a sub folder, then that folder must include and use an
_index.md
(to define that "section").(ie. need to mention that if you want to add that
second file to a folder, then you must also add (create) the required
"section definition" (using an
_index.md
file).Using shortcodes:
Optional: Add the following to the frontmatter of a file to show/hide an in-page TOC (uses the "landingtoc" partial)
By default, the in-page TOC shows in empty/blank _index.md section files to list all the sub-topics in that section.
- add
showlandingtoc: "true"
to add the in-page TOC- add
showlandingtoc: "false"
to prevent the in-page TOC from showing on a blank page or nondocs
type page (for example, a page in the /community section)Nested shortcodes are NOT supported - results in mixed content (.md + HTML) in the markdown that gets processed to HTML (so code (ie HTML or Markdown) is rendered (not just text))
{{% readfile file="FILENAME.md" %}}
shortcode:In the blank _index.md pages that can automatically generate and render an in-page nav tree. Make clear which files are "included" and rendered on the site using the
readfile
shortcode.ie. add a comment in the included file
Dynamically add code:
{{< readfile file="code-written-in.go" code="true" lang="go" >}}
See examples in the smoketest page
How to build knative.dev locally: Run
https://github.com/knative/website/blob/master/scripts/localbuild.sh
Other "docs contributor" related items:
Recent items:
Auto PR staging: https://app.netlify.com/sites/knative/deploys
How Prow chooses reviewers: https://github.com/kubernetes/test-infra/tree/master/prow/plugins/approve/approvers#blunderbuss-selection-mechanism
GitHub troubleshooting: Add troubleshooting information to contributor docs #2755
The text was updated successfully, but these errors were encountered: