Git Product home page Git Product logo

Comments (7)

sftim avatar sftim commented on May 24, 2024 1

We don't use code_sample for shell commands (it's for manifests).

However, you can copy just the FOO=Bar line into a text editor if you want. I get that people might like the computer to do more of the work, but I also think we should focus on our high priority issues ahead of any more work here.

from website.

k8s-ci-robot avatar k8s-ci-robot commented on May 24, 2024

This issue is currently awaiting triage.

SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted label.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

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.

from website.

niranjandarshann avatar niranjandarshann commented on May 24, 2024

/language en
/sig docs

from website.

sftim avatar sftim commented on May 24, 2024

Our (existing) policy is to use downloadable manifests based on code_sample - see https://kubernetes.io/docs/contribute/style/hugo-shortcodes/#source-code-files

We have more work to do to get there. And, we might want to widen the scope of what you can copy; see #45910

Do you have an example of a particular snippet that you think should be done a different way to help learners @MatthewFallon ?

I personally am wary of encouraging people to copy and paste snippets as-is; see #45910 (comment)

from website.

sftim avatar sftim commented on May 24, 2024

/priority backlog
(ie, nothing higher)

from website.

sftim avatar sftim commented on May 24, 2024

/kind feature

from website.

MatthewFallon avatar MatthewFallon commented on May 24, 2024

Do you have an example of a particular snippet that you think should be done a different way to help learners @MatthewFallon ?

Hey @sftim πŸ‘‹ yes looking at this section I see the following code snippet:

# Create a application.properties file
cat <<EOF >application.properties
FOO=Bar
EOF

cat <<EOF >./kustomization.yaml
configMapGenerator:
- name: example-configmap-1
  files:
  - application.properties
EOF

Which as commands holds no purpose other than:

  1. Create text file application.properties with contents
  2. Create yaml file kustomization.yaml with contents

There are multiple instances of this on that page, which really only serves the purpose of providing an easy copy paste as manually typing a heredoc command like such is kind of cumbersome to begin with haha.

I think a fair point on not wanting to encourage too much copy pasting using buttons as such πŸ‘ I had figured that was the original intent based on content. In this case I think you're right that these commands would better be shown as two individual code_sample statements instead. I think many of the code snippets on this page just need to be modified to fit that format.

Will leave this here as clarification of the suggestion, and will potentially look into contributing the change myself if I find the time. Thanks for adding context! πŸ‘ πŸ˜„

from website.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.