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

Docs overhaul #1396

Merged
merged 8 commits into from
Aug 18, 2020
Merged
Show file tree
Hide file tree
Changes from 7 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
1 change: 0 additions & 1 deletion www/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ chef_web_docs_submodule:
git submodule foreach git reset --hard
cp -R content/* chef-web-docs/_vendor/github.com/chef/chef-workstation/www/content
cp -R static/images/* chef-web-docs/_vendor/github.com/chef/chef-workstation/www/static/images
cp layouts/shortcodes/* chef-web-docs/_vendor/github.com/chef/chef-workstation/www/layouts/shortcodes/

reset_chef_web_docs:
git submodule foreach git reset --hard
Expand Down
19 changes: 9 additions & 10 deletions www/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,19 @@ provide additional important information

There are often cases where we want to maintain blocks of text that are identical
from one page to the next. In those cases, we add that text, formatted in Markdown,
to a shortcode file located in `chef-workstation/www/layouts/shortcodes`.

Each shortcode in the Chef Workstation documentation must be prefixed with `ws_`.
For example, `ws_shortcode_name.md`.
to a shortcode file located in the `chef-web-docs` repo in
`chef-web-docs/themes/docs-new/layouts/shortcodes`.

To add that shortcode to a page in `chef-workstation/www/content`, add the file name,
minus the .md suffix, wrapped in double curly braces and percent symbols to
the location in the Markdown page where you want that text included. For example,
if you want to add the text in `ws_shortcode_file_name.md` to a page, add
`{{% ws_shortcode_file_name %}}` to the text of that page and it will appear when
if you want to add the text in `shortcode_file_name.md` to a page, add
`{{% shortcode_file_name %}}` to the text of that page and it will appear when
Hugo rebuilds the documentation.

To update or add a new shortcode to the Workstation documentation, submit a PR to
`chef/chef-web-docs`. All shortcodes should be in `chef-web-docs/themes/docs-new/layouts/shortcodes`.

**Shortcodes in lists**

Hugo doesn't handle shortcodes that are indented in a list item properly. It interprets
Expand Down Expand Up @@ -326,6 +327,7 @@ aliases = ["/a_deleted_page/", "/another_deleted_page/"]
## Structure

### High Level

```
.
├── Makefile # contains helpers to quickly start up the development environment
Expand All @@ -334,18 +336,15 @@ aliases = ["/a_deleted_page/", "/another_deleted_page/"]
```

### Local Content

```
.
├── site
│   ├── content
│   │   ├── workstation # where to keep markdown file documentation
│   ├── layouts
| │   ├── shortcodes
| │   │   ├── ws_<shortcode_name>.md # how to name your workstation-specific shortcodes
| ├── static
| | ├── images
| | | ├── chef-workstation # where to keep any images you need to reference in your documentation
| | ├── css
```

**Data**
Expand Down
2 changes: 1 addition & 1 deletion www/chef-web-docs
Submodule chef-web-docs updated 1832 files
2 changes: 1 addition & 1 deletion www/content/workstation/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aliases = ["/about_workstation.html", "/about_chefdk.html", "/chef_dk.html", "/a

[\[edit on GitHub\]](https://github.com/chef/chef-workstation/blob/master/www/content/workstation/_index.md)

{{% ws_chef_workstation %}}
{{% chef_workstation %}}

Chef Workstation replaces ChefDK, combining all the existing features
with new features, such as ad-hoc task support and the new Chef
Expand Down
26 changes: 13 additions & 13 deletions www/content/workstation/chef_shell.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ aliases = ["/chef_shell.html", "/chef_shell/"]

[\[edit on GitHub\]](https://github.com/chef/chef-workstation/blob/master/www/content/workstation/ctl_chef_shell.md)

{{% ws_chef_shell_summary %}}
{{% chef_shell_summary %}}

The chef-shell executable is run as a command-line tool.

## Modes

{{% ws_chef_shell_modes %}}
{{% chef_shell_modes %}}

## Options

Expand Down Expand Up @@ -67,7 +67,7 @@ This command has the following options:

{{< warning >}}

{{% ws_node_ctl_attribute %}}
{{% node_ctl_attribute %}}

{{< /warning >}}

Expand Down Expand Up @@ -98,44 +98,44 @@ This command has the following options:

## Configure

{{% ws_chef_shell_config %}}
{{% chef_shell_config %}}

### chef-shell.rb

{{% ws_chef_shell_config_rb %}}
{{% chef_shell_config_rb %}}

### Run as a Chef Infra Client

{{% ws_chef_shell_run_as_chef_client %}}
{{% chef_shell_run_as_chef_client %}}

## Debugging Cookbooks

{{% ws_chef_shell_breakpoints %}}
{{% chef_shell_breakpoints %}}

### Step Through Run-list

{{% ws_chef_shell_step_through_run_list %}}
{{% chef_shell_step_through_run_list %}}

### Debug Existing Recipe

{{< readFile_shortcode file="ws_chef_shell_debug_existing_recipe.md" >}}
{{< readFile_shortcode file="chef_shell_debug_existing_recipe.md" >}}

### Advanced Debugging

{{< readFile_shortcode file="ws_chef_shell_advanced_debug.md" >}}
{{< readFile_shortcode file="chef_shell_advanced_debug.md" >}}

## Manipulating Chef Infra Server Data

{{% ws_chef_shell_manage %}}
{{% chef_shell_manage %}}

## Examples

The following examples show how to use chef-shell.

### "Hello World"

{{< readFile_shortcode file="ws_chef_shell_example_hello_world.md" >}}
{{< readFile_shortcode file="chef_shell_example_hello_world.md" >}}

### Get Specific Nodes

{{% ws_chef_shell_example_get_specific_nodes %}}
{{% chef_shell_example_get_specific_nodes %}}
2 changes: 1 addition & 1 deletion www/content/workstation/chefspec.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ aliases = ["/chefspec.html", "/chefspec/"]

[\[edit on GitHub\]](https://github.com/chef/chef-workstation/blob/master/www/content/workstation/chefspec.md)

{{% ws_chefspec_summary %}}
{{% chefspec_summary %}}

ChefSpec is a framework that tests resources and recipes as part of a
simulated Chef Infra Client run. ChefSpec tests execute very quickly.
Expand Down
2 changes: 1 addition & 1 deletion www/content/workstation/config_rb.md
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ Use the following setting to specify URLs that do not need a proxy:

## .d Directories

{{% ws_config_rb_client_dot_d_directories %}}
{{% config_rb_client_dot_d_directories %}}

## Optional Settings

Expand Down
16 changes: 8 additions & 8 deletions www/content/workstation/config_yml_kitchen.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data across any combination of platforms and test suites:
- Uses a comprehensive set of base images provided by
[Bento](https://github.com/chef/bento)

{{% ws_test_kitchen_yml %}}
{{% test_kitchen_yml %}}

{{< note >}}

Expand All @@ -38,7 +38,7 @@ about Test Kitchen.

## Syntax

{{% ws_test_kitchen_yml_syntax %}}
{{% test_kitchen_yml_syntax %}}

## Provisioner Settings

Expand Down Expand Up @@ -430,7 +430,7 @@ kitchen.yml file when the transport is WinRM:

### Work with Proxies

{{< readFile_shortcode file="ws_test_kitchen_yml_syntax_proxy.md" >}}
{{< readFile_shortcode file="test_kitchen_yml_syntax_proxy.md" >}}

## Chef Infra Client Settings

Expand Down Expand Up @@ -493,19 +493,19 @@ Specific `optional_settings: values` may be specified.

### Bento

{{% ws_bento %}}
{{% bento %}}

### Drivers

{{% ws_test_kitchen_drivers %}}
{{% test_kitchen_drivers %}}

### kitchen-vagrant

{{% ws_test_kitchen_driver_vagrant %}}
{{% test_kitchen_driver_vagrant %}}

{{% ws_test_kitchen_driver_vagrant_settings %}}
{{% test_kitchen_driver_vagrant_settings %}}

{{% ws_test_kitchen_driver_vagrant_config %}}
{{% test_kitchen_driver_vagrant_config %}}

## Examples

Expand Down
Loading