Skip to content

Commit

Permalink
Minor corrections
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Maddaus <[email protected]>
  • Loading branch information
IanMadd committed Apr 5, 2024
1 parent 0544ca6 commit 8a7ba74
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 43 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ clean:

clean_all: clean clean_hugo_mod

serve: npm
serve: bundle
hugo server --buildDrafts --noHTTPCache --buildFuture

metrics: npm
metrics: bundle
hugo --gc --minify --enableGitInfo --templateMetrics --templateMetricsHints

nodrafts: npm
nodrafts: bundle
hugo server --noHTTPCache --buildFuture

production: bundle
Expand Down
41 changes: 2 additions & 39 deletions content/style/shortcodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,43 +304,6 @@ produces:
puts 'Hello, world!'
{{< / highlight >}}

You can also add line numbers and highlight specific lines.

This is the code for this example:

<!-- markdownlint-disable MD046 -->

{{</* highlight ruby "linenos=table,hl_lines=3 5-7,linenostart=10" */>}}
require 'chef/config'
require 'chef/log'
require 'chef/rest'

chef_server_url = 'https://chefserver.com'
client_name = 'client_name'
signing_key_filename = '/path/to/pem/for/client_name'

rest = Chef::REST.new(chef_server_url, client_name, signing_key_filename)
puts rest.get_rest('/clients')
{{</* / highlight */>}}

<!-- markdownlint-enable MD046 -->

produces this:

{{< highlight ruby "linenos=table,hl_lines=3 5-7,linenostart=10" >}}
require 'chef/config'
require 'chef/log'
require 'chef/rest'

chef_server_url = 'https://chefserver.com'
client_name = 'client_name'
signing_key_filename = '/path/to/pem/for/client_name'

rest = Chef::REST.new(chef_server_url, client_name, signing_key_filename)
puts rest.get_rest('/clients')
{{< / highlight >}}

See [Hugo's documentation](https://gohugo.io/content-management/syntax-highlighting/#highlight-shortcode) for more information.

Check failure on line 307 in content/style/shortcodes.md

View workflow job for this annotation

GitHub Actions / markdownlint

Multiple consecutive blank lines [Expected: 1; Actual: 2]

content/style/shortcodes.md:307 MD012/no-multiple-blanks Multiple consecutive blank lines [Expected: 1; Actual: 2]
## `readfile` shortcode

Expand Down Expand Up @@ -404,12 +367,12 @@ The svg shortcode takes one parameter, `file`, which is the file path to the SVG
For example:

```md
Click on the web asset icon ({{</* svg file="themes/docs-new/static/images/web-asset.svg" */>}}).
Click on the web asset icon ({{</* svg file="/static/images/web-asset.svg" */>}}).
```

produces:

Click on the web asset icon ({{< svg file="themes/docs-new/static/images/web-asset.svg" >}}).
Click on the web asset icon ({{< svg file="/static/images/web-asset.svg" >}}).

## Create a new shortcode

Expand Down
8 changes: 8 additions & 0 deletions content/style/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,14 @@ Add code using the readfile shortcode:
{{< readfile file="data/test/test.json" highlight="json" >}}
And code without syntax highlighting:
```

Check failure on line 500 in content/style/test.md

View workflow job for this annotation

GitHub Actions / markdownlint

Fenced code blocks should have a language specified [Context: "```"]

content/style/test.md:500 MD040/fenced-code-language Fenced code blocks should have a language specified [Context: "```"]
describe google_compute_networks(project: 'chef-gcp-inspec') do
its('network_names') { should include 'inspec-network' }
end
```
### Inline code
This is an `inline block of code`.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/chef/chef-web-docs

go 1.22.0
go 1.22

require (
github.com/chef/automate/components/docs-chef-io v0.0.0-20240306133449-4e982f867599 // indirect
Expand Down

0 comments on commit 8a7ba74

Please sign in to comment.