Skip to content

limit the tree command to 30 lines... #28

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

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,10 @@ For more examples, see the [hype repo](https://www.github.com/gopherguides/hype)

You can also use the `cmd` tag and the `exec` attribute to run arbitrary commands and include them in your documentation. Here is the command to run the `tree` command and include it in our documentation:

`<cmd exec="tree" src="."></cmd>
`
```html
<cmd exec="tree | head -n 30" src="."></cmd>

```

Here is the output:

Expand Down Expand Up @@ -1269,8 +1271,6 @@ It is recommend to use a GitHub [Personnal Acces Token](https://docs.github.com/

The current action is set to only generate the readme on a pull request and commit it back to that same pull request. You can modify this to your own needs.

It should be noted that we are ignoring the `docs` directory in our workflow because we purposefully have broken code examples. You should not do this. Your can simply run `go test ./...` and `staticcheck ./...` respectively in your actions.

```yml
name: Generate README with Hype
on: [pull_request]
Expand Down
6 changes: 3 additions & 3 deletions docs/quickstart/hype.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,13 @@ For more examples, see the [hype repo](https://www.github.com/gopherguides/hype)

You can also use the `cmd` tag and the `exec` attribute to run arbitrary commands and include them in your documentation. Here is the command to run the `tree` command and include it in our documentation:

```
<cmd exec="tree" src="."></cmd>
```html
<cmd exec="tree | head -n 30" src="."></cmd>
```

Here is the output:

<cmd exec="tree" src="."></cmd>
<cmd exec="tree | head -n 30" src="."></cmd>

# The Export Command

Expand Down