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

New "how to contribute to docs" instructions #1917

Closed
22 of 24 tasks
RichieEscarez opened this issue Oct 22, 2019 · 6 comments · Fixed by #2387
Closed
22 of 24 tasks

New "how to contribute to docs" instructions #1917

RichieEscarez opened this issue Oct 22, 2019 · 6 comments · Fixed by #2387
Assignees
Labels
kind/infrastructure Docs infrastructure related kind/meta Documentation about the repo -- contributor roles, issue templates, etc.
Milestone

Comments

@RichieEscarez
Copy link
Contributor

RichieEscarez commented Oct 22, 2019

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

    ---
    title: “The file’s title (do not include another H1 title in the body).”
    linkTitle: “optional short title”
    weight: 10
    type: “docs”
    ---
    
    • ‘title’ and ‘type: “docs”’ are required.
    • ‘weight’ is also required and allows you to defined
      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
    • ‘linkTitle’ is optional and allows you to provide an
      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" #1925

  • Dynamic 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:

    • add the corresponding branchname by using the {{< branch >}} variable (shortcode)
    • add the corresponding version number by using the {{< 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 non docs 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

        <!-- This file is rendered in knative.dev using the "readfile" shortcode. 
        See the _index.md file in this directory. -->
        
      • 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:

@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 Apr 22, 2020
@RichieEscarez RichieEscarez removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2020
@evankanderson
Copy link
Member

/kind good-first-issue

@knative-prow-robot knative-prow-robot added the kind/good-first-issue Denotes an issue ready for a new contributor. label Apr 29, 2020
@RichieEscarez RichieEscarez reopened this Sep 29, 2020
@abrennan89 abrennan89 removed the kind/good-first-issue Denotes an issue ready for a new contributor. label Sep 30, 2020
@abrennan89 abrennan89 removed this from the Backlog milestone Sep 30, 2020
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen.Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 29, 2020
@RichieEscarez RichieEscarez removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 6, 2021
@abrennan89 abrennan89 added this to the Icebox milestone Jan 26, 2021
@github-actions
Copy link

This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen.Mark the issue as
fresh by adding the comment /remove-lifecycle stale.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 26, 2021
@RichieEscarez RichieEscarez removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 26, 2021
@RichieEscarez
Copy link
Contributor Author

Two items remain:

@abrennan89
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/infrastructure Docs infrastructure related kind/meta Documentation about the repo -- contributor roles, issue templates, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants