<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Documentation – Contributing</title><link>/about/contributing/</link><description>Recent content in Contributing on Documentation</description><generator>Hugo -- gohugo.io</generator><atom:link href="/about/contributing/index.xml" rel="self" type="application/rss+xml"/><item><title>About: Git and GitHub</title><link>/about/contributing/git/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/about/contributing/git/</guid><description>
&lt;p>For collaboration purposes, it is best if you create a GitHub account and fork
the repository to your own account. Once you do this, you will be able to push
your changes to your GitHub repository for others to see and use, and you will
be able to create pull requests (PRs) in the official EGI documentation
repository based on branches in your fork.&lt;/p>
&lt;p>If you are new to &lt;code>git&lt;/code> and &lt;strong>GitHub&lt;/strong> you are advised to start by the two
following articles providing simple tutorials:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://opensource.com/article/18/1/step-step-guide-git">Step by step guide to git&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://opensource.com/article/19/7/create-pull-request-github">Creating pull request with GitHub&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>GitHub official documentation is available at
&lt;a href="https://docs.github.com/en/">docs.github.com&lt;/a>.&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
The
&lt;a href="https://github.com/firstcontributions/first-contributions">first-contributions&lt;/a>
is a repository allowing anyone to freely learn and test creating a real Pull
Request to an existing GitHub repository.
&lt;/div>
&lt;p>Additional documentation about the main steps for working with GitHub is also
available in this section.&lt;/p>
&lt;h2 id="the-github-contribution-flow">The GitHub contribution flow&lt;/h2>
&lt;p>In order to be able to send code update to the repository you need to:&lt;/p>
&lt;ul>
&lt;li>fork the repository to your GitHub account&lt;/li>
&lt;li>clone the repository on your local computer&lt;/li>
&lt;li>create a &lt;em>feature branch&lt;/em> where you will commit your changes&lt;/li>
&lt;li>push the &lt;em>feature branch&lt;/em> to the repository fork in your GitHub account&lt;/li>
&lt;li>open a Pull Request against the upstream repository&lt;/li>
&lt;/ul>
&lt;p>In this process three git repositories are used:&lt;/p>
&lt;ul>
&lt;li>The &lt;em>upstream&lt;/em> repository: EGI-Federation/documentation&lt;/li>
&lt;li>Your fork, also named &lt;em>origin&lt;/em>: &amp;lt;your_username&amp;gt;/documentation&lt;/li>
&lt;li>A local clone of your fork, containing references to your fork, its &lt;em>origin&lt;/em>
and to the &lt;em>upstream&lt;/em> repository&lt;/li>
&lt;/ul>
&lt;h2 id="add-an-ssh-key-to-your-github-account">Add an SSH key to your GitHub account&lt;/h2>
&lt;p>The most convenient way to authenticate with GitHub is to use SSH keys over the
SSH protocol.&lt;/p>
&lt;p>You can add an SSH &lt;em>public&lt;/em> key to your GitHub account in the &lt;code>Settings&lt;/code> on
GitHub, at &lt;a href="https://github.com/settings/keys">https://github.com/settings/keys&lt;/a>.&lt;/p>
&lt;p>Refer to
&lt;a href="https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh">Connecting to GitHub with SSH&lt;/a>
for an extensive documentation on using SSH keys with GitHub.&lt;/p>
&lt;p>It&amp;rsquo;s worth to mention that your ssh &lt;em>public&lt;/em> keys can easily be retrieved using
a URL like &lt;code>https://github.com/&amp;lt;your_username&amp;gt;.keys&lt;/code>.&lt;/p>
&lt;p>In order to manage repositories over ssh, you will have to clone them via SSH,
not HTTPS.&lt;/p>
&lt;p>If you already have a local clone of a repository created via HTTPS, you can
switch it to SSH by following
&lt;a href="https://docs.github.com/en/free-pro-team@latest/github/using-git/changing-a-remotes-url#switching-remote-urls-from-https-to-ssh">Switching remote URLs from HTTPS to SSH&lt;/a>.&lt;/p>
&lt;h2 id="starting-with-the-github-cli">Starting with the GitHub CLI&lt;/h2>
&lt;p>The GitHub command-line interface greatly helps with working with GitHub
repositories from a terminal.&lt;/p>
&lt;p>It can be installed using the packages available on
&lt;a href="https://cli.github.com/">their homepage&lt;/a>. There is also a
&lt;a href="https://cli.github.com/manual/">manual&lt;/a>.&lt;/p>
&lt;p>Once installed you will have to start by setting up authentication.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Authenticate with GitHub, favour SSH protocol&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ gh auth login
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ gh config &lt;span style="color:#204a87">set&lt;/span> git_protocol ssh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="working-with-repositories">Working with repositories&lt;/h2>
&lt;p>The easiest way is to do it via the GitHub CLI that will also clone it locally.
But it can also be done via the web interface, using the &lt;em>fork&lt;/em> button and then
cloning it locally manually.&lt;/p>
&lt;h3 id="fork-and-clone">Fork and clone&lt;/h3>
&lt;p>This command will fork the repository to your GitHub account and clone a local
copy for you to work with.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ gh repo fork EGI-Federation/documentation
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="clone-existing-fork">Clone existing fork&lt;/h3>
&lt;p>If you want to clone an existing fork you should use:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ gh repo clone &amp;lt;your_username&amp;gt;/documentation
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="validate-the-local-clone">Validate the local clone&lt;/h3>
&lt;p>If your local clone of you fork is correctly setup you should see references to
the origin and upstream repositories.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ git remote -v
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>origin git@github.com:&amp;lt;your_username&amp;gt;/documentation &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>fetch&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>origin git@github.com:&amp;lt;your_username&amp;gt;/documentation &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>push&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>upstream git@github.com:EGI-Federation/documentation.git &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>fetch&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>upstream git@github.com:EGI-Federation/documentation.git &lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span>push&lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="run-the-site-locally">Run the site locally&lt;/h2>
&lt;p>The documentation site is built from the source files using
&lt;a href="https://gohugo.io/">Hugo&lt;/a>. The repository
&lt;a href="https://github.com/EGI-Federation/documentation/blob/main/README.md">README&lt;/a>
can be used as a reference for building instructions.&lt;/p>
&lt;h3 id="requirements">Requirements&lt;/h3>
&lt;ul>
&lt;li>&lt;a href="https://gohugo.io">Hugo&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://nodejs.org/">Node.js&lt;/a> and other &lt;a href="https://www.docsy.dev">docsy&lt;/a> theme
dependencies:
&lt;ul>
&lt;li>&lt;a href="https://www.npmjs.com/package/postcss-cli">&lt;code>postcss-cli&lt;/code>&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.npmjs.com/package/autoprefixer">&lt;code>autoprefixer&lt;/code>&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>These dependencies can be either installed manually or
reusing a flox environment. Please see the steps below.&lt;/p>
&lt;h4 id="installing-dependencies-manually">Installing dependencies manually&lt;/h4>
&lt;p>To install npm+Node.js please check the
&lt;a href="https://www.npmjs.com/get-npm">official instructions&lt;/a>.&lt;/p>
&lt;p>Everything has been tested with Node.js 12.&lt;/p>
&lt;p>The dependencies of the docsy theme can be installed as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># From the root of the repository clone&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ npm ci
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Hugo can be installed following
&lt;a href="https://gohugo.io/getting-started/installing">the official documentation&lt;/a>.&lt;/p>
&lt;p>Hugo (extended) releases can be downloaded at
&lt;a href="https://github.com/gohugoio/hugo/releases">the Hugo releases page&lt;/a>.
The recommended version for Hugo is specified under the GitHub Action in
&lt;a href="https://github.com/EGI-Federation/documentation/blob/main/.github/workflows/hugo_version.txt">.github/workflows/hugo_version.txt&lt;/a>.&lt;/p>
&lt;h4 id="reuse-the-flox-environment">Reuse the Flox environment&lt;/h4>
&lt;p>&lt;a href="https://flox.dev/">Flox&lt;/a> is a virtual environment and package manager
all in one. We provide a flox environment in our GitHub repository
in a way that it is easier for everybody to work with the same
software dependencies and contribute to this repository.&lt;/p>
&lt;p>After &lt;a href="https://flox.dev/docs/install-flox/">installing flox&lt;/a>
you can reuse the provided environment with:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># From the root of the repository clone&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ flox activate
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Then install docsy dependencies with&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ npm ci
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="installing-pre-commit-hooks">Installing pre-commit hooks&lt;/h3>
&lt;p>&lt;a href="https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks">&lt;em>Git hooks&lt;/em>&lt;/a> are
small bits of code which run during parts of the
&lt;a href="#branches-and-commits">git commit&lt;/a> process. In particular the &lt;code>pre-commit&lt;/code> hook
runs before committing your changes, in order to enforce contribution
guidelines, code quality and style conventions, &lt;em>etc&lt;/em>.&lt;/p>
&lt;p>The &lt;a href="https://pre-commit.com">pre-commit framework&lt;/a> is used to manage the
pre-commit hooks in this repository, and should be installed before making your
contribution:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ pip install pre-commit
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ pre-commit install
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>pre-commit installed at .git/hooks/pre-commit
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>See &lt;code>.pre-commit-config.yaml&lt;/code> in the repository for more details of which hooks
are enabled.&lt;/p>
&lt;h3 id="building-the-site">Building the site&lt;/h3>
&lt;p>To build and run the site, from the repository root:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ git submodule update --init --recursive --depth &lt;span style="color:#0000cf;font-weight:bold">1&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ hugo --minify
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="testing-the-site-locally">Testing the site locally&lt;/h3>
&lt;p>To launch the site locally, from the repository root:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ hugo serve -D
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The site is available locally at:
&lt;a href="http://localhost:1313/">http://localhost:1313/&lt;/a>.&lt;/p>
&lt;h2 id="branches-and-commits">Branches and commits&lt;/h2>
&lt;p>You should submit your patch as a git branch ideally named with a meaningful
name related to the changes you want to propose. This is called a &lt;em>feature
branch&lt;/em> (sometimes also named &lt;em>topic branch&lt;/em>). You will commit your
modifications to this &lt;em>feature branch&lt;/em> and submit a Pull Request (PR) based on
the differences between the upstream main branch and your &lt;em>feature branch&lt;/em>.&lt;/p>
&lt;h3 id="create-a-feature-branch">Create a feature branch&lt;/h3>
&lt;p>Try to avoid committing changes to the &lt;em>main&lt;/em> branch of your clone to simplify
management, creating a dedicated &lt;em>feature branch&lt;/em> helps a lot. Try to pick a
meaningful name for the branch (my_nice_update in the example).&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># This should be done from the up-to-date main branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Read furthermore to see documentation on updating a local clone&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git checkout -b my_nice_update
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="write-changes">Write changes&lt;/h2>
&lt;p>The documentation being made of plain text files you are free to use whatever
text editor or Integrated Development Environment (IDE) suits you, from
&lt;a href="https://neovim.io/">neovim&lt;/a> to
&lt;a href="https://code.visualstudio.com/">Visual Studio Code&lt;/a>.&lt;/p>
&lt;p>Some environments may provide you plugins helping with syntax or offering a
preview, they are worth checking.&lt;/p>
&lt;p>Be sure to commit files with having been formatted using
&lt;a href="https://prettier.io/">Prettier&lt;/a> as documented in our &lt;a href="../style/">style guide&lt;/a>.&lt;/p>
&lt;h2 id="commit-changes">Commit changes&lt;/h2>
&lt;p>It is the best practice to have your commit message have a &lt;em>summary line&lt;/em> that
includes the issue number, followed by an empty line and then a brief
description of the commit. This also helps other contributors understand the
purpose of changes to the code.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-text" data-lang="text">&lt;span style="display:flex;">&lt;span> #3 - platform_family and style
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> * use platform_family for platform checking
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> * update notifies syntax to &amp;#34;resource_type[resource_name]&amp;#34; instead of
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> resources() lookup
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> * GH-692 - delete config files dropped off by packages in conf.d
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> * dropped debian 4 support because all other platforms have the same
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> values, and it is older than &amp;#34;old stable&amp;#34; debian release
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Select the modified files to be committed&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git add files1 path2/
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Commit the changes&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit -m &amp;lt;commit_message&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="push-feature-branch-to-the-fork-in-preparation-of-a-pr">Push feature branch to the fork in preparation of a PR&lt;/h2>
&lt;p>From inside a feature branch you can push it to your remote fork.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Ask git to keep trace of the link between local and remote branches&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push --set-upstream
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Once done, the output will show a URL that you can click to generate a Pull
Request (PR). Accessing GitHub upstream of forked repositories may also propose
you to submit a PR.&lt;/p>
&lt;p>If needed GitHub CLI can also be used to prepare the PR:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ gh pr create &amp;lt;your_username&amp;gt;:&amp;lt;feature_branch&amp;gt; --web
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="previewing-a-pull-request">Previewing a pull request&lt;/h3>
&lt;p>If a repository maintainer adds the label &lt;code>safe for preview&lt;/code> to a pull request
it will be possible to preview it using a pull request-specific URL:
&lt;code>https://docs.egi.eu/documentation/[PR_NUMBER]&lt;/code>&lt;/p>
&lt;p>The preview can be used as an alternative to testing a pull request locally, and
the preview can easily be shared with other contributors.&lt;/p>
&lt;p>Only collaborators having write permission to the repository are able to mark a
pull request as safe for review.&lt;/p>
&lt;blockquote>
&lt;p>This should be carefully considered, especially for external and first time
contributors.&lt;/p>
&lt;/blockquote>
&lt;h3 id="update-local-feature-branch-with-changes-made-on-the-pr">Update local feature branch with changes made on the PR&lt;/h3>
&lt;p>Once you PR have been opened it will be reviewed, and reviewers can propose and
commit changes to your PR. If you need to make further changes be sure to update
the local clone with the remote changes.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Retrieve changes made on your PR in the upstream repository&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git pull
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then you can commit new changes and push them to your remote fork.&lt;/p>
&lt;h2 id="update-repository-clone-with-the-upstream-changes">Update repository clone with the upstream changes&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># If you are still in a branch created for a previous PR, move to main&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git checkout main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Get the latest data from the upstream repository&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git fetch upstream
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Update your local copy with this data&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git rebase upstream/main main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Update your remote GitHub fork with those changes&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="update-local-feature-branch-with-changes-made-on-the-main-branch">Update local feature branch with changes made on the main branch&lt;/h2>
&lt;p>In case the &lt;em>main&lt;/em> branch evolved since the feature branch was created, it may
be required to merge the new changes in the feature branch.&lt;/p>
&lt;p>It can easily be done via the PR page on the GitHub web interface, but it can
also be done in your repository clone using &lt;code>git rebase&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Retrieve changes made in the upstream repository&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git fetch upstream
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Check out the feature branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git checkout feature_branch
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Apply the new changes on main to your feature branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git rebase upstream/main
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>In case some files have been changed on both sides you will have to merge the
conflicts manually.&lt;/p>
&lt;h2 id="running-checks-from-github-actions-locally">Running checks from GitHub actions locally&lt;/h2>
&lt;p>The repository leverages &lt;a href="https://github.com/features/actions">GitHub Actions&lt;/a>
to do automatic checks.
These are encoded in the pre-commit hooks described above.
In order to run these checks locally on the full repository, run&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>pre-commit run --all
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Checks are declared in the Megalinter configuration file.&lt;/p>
&lt;p>It&amp;rsquo;s possible to run those linters locally, it can be useful to test and debug
why they are reporting errors, and test without waiting on the automatic checks.&lt;/p>
&lt;blockquote>
&lt;p>To save time, we recommend running the specific you are interested in, but as
documented later for Check-Spelling, you can use &lt;code>act&lt;/code> to run the real GitHub
actions workflows.&lt;/p>
&lt;/blockquote>
&lt;h3 id="running-markdownlint-locally">Running markdownlint locally&lt;/h3>
&lt;p>&lt;a href="https://github.com/igorshubovych/markdownlint-cli#readme">markdownlint-cli&lt;/a> can
be installed locally on some platforms, in that case it can be used like this:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ markdownlint -c .github/linters/.markdownlint.json &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> content/en/about/_index.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you cannot or don&amp;rsquo;t want to install it locally, you can rely on using
&lt;a href="https://www.docker.com/">Docker&lt;/a> and
&lt;a href="https://github.com/features/packages">GitHub Packages&lt;/a>:&lt;/p>
&lt;!-- cspell:disable -->
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -v &lt;span style="color:#000">$PWD&lt;/span>:/workdir:ro --rm -i ghcr.io/igorshubovych/markdownlint-cli:latest &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --config .github/linters/.markdownlint.json &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> content/en/about/_index.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;!-- cspell:enable -->
&lt;h3 id="running-markdown-link-check-locally">Running markdown-link-check locally&lt;/h3>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Deprecated&lt;/h4>
This is deprecated in favour of Lychee
&lt;/div>
&lt;p>You can use &lt;a href="https://www.docker.com/">Docker&lt;/a> and
&lt;a href="https://github.com/features/packages">GitHub Packages&lt;/a>:&lt;/p>
&lt;!-- cspell:disable -->
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ docker run -v &lt;span style="color:#000">$PWD&lt;/span>:/tmp:ro --rm -i ghcr.io/tcort/markdown-link-check:stable &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> --config /tmp/.github/linters/mlc_config.json &lt;span style="color:#4e9a06">\
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span> /tmp/content/en/about/_index.md
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;!-- cspell:enable -->
&lt;h3 id="running-check-spelling-locally">Running Check-Spelling locally&lt;/h3>
&lt;p>For spelling, it may be easier to rely on a spell checker integrated in your
content editor.&lt;/p>
&lt;p>Nevertheless, if you are adventurous, you can use
&lt;a href="https://github.com/nektos/act">act&lt;/a>, that will use docker to run the checks
locally.&lt;/p>
&lt;blockquote>
&lt;p>While the spell check should work, other part of the job interacting with
GitHub will likely fail, like when errors are identified, so be sure to
properly scan through the command output.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing available jobs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ act -l
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Running the spelling job&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ act -j spelling
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="running-super-linter-locally">Running Super-Linter locally&lt;/h3>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Deprecated&lt;/h4>
This is deprecated in favour of Megalinter
&lt;/div>
&lt;p>Should you want to do this, Super-Linter can be run locally.&lt;/p>
&lt;p>You can try using &lt;a href="https://github.com/nektos/act">act&lt;/a>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Listing available jobs&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ act -l
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Running the lint job&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ act -j super-lint
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If it doesn&amp;rsquo;t work as expected, or if you prefer another solution, you should
look at the
&lt;a href="https://github.com/github/super-linter/blob/main/docs/run-linter-locally.md">Super-Linter documentation for running locally&lt;/a>.&lt;/p>
&lt;h2 id="clone-pr-to-edittestreview-locally">Clone PR to edit/test/review locally&lt;/h2>
&lt;p>It&amp;rsquo;s possible to clone a Pull Request to a local branch to test it locally. It&amp;rsquo;s
done using the PR number.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># List available PR and their identifiers.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ gh pr list
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Clone specific PR, updating submodules&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ gh pr checkout XX --recurse-submodules
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Once done it&amp;rsquo;s possible to build and run the site locally:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># From the root of the repository clone&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Here on MacOS X, adapt depending on your platform&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ hugo serve -D
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The documentation will then be accessible on
&lt;a href="http://localhost:1313">http://localhost:1313&lt;/a>.&lt;/p>
&lt;blockquote>
&lt;p>People having write access to the repository hosting the branch related to the
PR (ie. usually the PR author) will be able to add and edit files.&lt;/p>
&lt;/blockquote>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># From the local clone of the repository&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ gh pr checkout XXX --recurse-submodules
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ vim yyy.zz
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git add yyy.zz
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git commit yyy.zz -m &amp;lt;commit_message&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git push
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="update-a-local-clone-of-a-pr">Update a local clone of a PR&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># It will ask you to merge changes&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git pull
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Then you can refer to the &lt;code>README.md&lt;/code> to see how to test it locally.&lt;/p>
&lt;p>In case the PR got commits that were forced pushed you may have troubles, in
that case it may be easier to
&lt;a href="#clean-a-local-clone-of-a-pr">delete the local branch&lt;/a> and do another
&lt;a href="#clone-pr-to-edittestreview-locally">checkout of the PR&lt;/a>.&lt;/p>
&lt;h3 id="clean-a-local-clone-of-a-pr">Clean a local clone of a PR&lt;/h3>
&lt;p>In case you have troubles updating the local clone, as it can happens if changes
were forced pushed to it, it maybe easier to delete the local copy of the PR and
recreate it.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Switch to main branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git checkout main
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Check local branches&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git branch -vv
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Delete a specific branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git branch -d &amp;lt;branch_name&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># If you need to force the deletion use -D&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git branch -D &amp;lt;branch_name&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="using-stashes">Using stashes&lt;/h2>
&lt;p>Sometimes we realise just before committing a change that we are not in the
correct branch (ie. that we forgot to create a dedicated feature branch), when
this happens &lt;code>git stash&lt;/code> can be helpful.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Saving a change&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git stash save &amp;lt;optional message&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Creating the forgotten branch&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git checkout -b &amp;lt;my_feature_branch&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Reviewing the saved changes, use TAB completion&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git stash show &amp;lt;TAB&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Applying the saved changes, use TAB completion&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git stash pop &amp;lt;TAB&amp;gt;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Review the changes to be committed&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git diff
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If you already committed your change(s) you may have to look at &lt;code>git reset&lt;/code>.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Viewing the diff of the two last commits&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git log -n &lt;span style="color:#0000cf;font-weight:bold">2&lt;/span> -p
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic"># Reverting the last change, keeping the change in the local directory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ git reset HEAD^
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>About: Style Guide</title><link>/about/contributing/style/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/about/contributing/style/</guid><description>
&lt;h2 id="general-recommendations">General recommendations&lt;/h2>
&lt;ul>
&lt;li>All files and folders should be lower case&lt;/li>
&lt;li>EGI Services should be named exactly as in the
&lt;a href="https://www.egi.eu/services/">EGI Services Portfolio&lt;/a>&lt;/li>
&lt;li>Acronyms should be used only when it makes sense&lt;/li>
&lt;li>Service names should never be replaced by acronyms&lt;/li>
&lt;li>When introducing services, link to the public page of the service, if any:&lt;/li>
&lt;/ul>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#204a87;font-weight:bold">EGI Cloud Compute&lt;/span>](&lt;span style="color:#c4a000">https://www.egi.eu/service/cloud-compute/&lt;/span>)
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="markdown-writing-guidelines">Markdown writing guidelines&lt;/h2>
&lt;p>Documentation pages have to be written in Markdown, compliant with
&lt;a href="https://spec.commonmark.org/0.29/">CommonMark&lt;/a> and
&lt;a href="https://github.github.com/gfm/">GitHub Flavored Markdown&lt;/a>.&lt;/p>
&lt;h3 id="basic-rules">Basic rules&lt;/h3>
&lt;ul>
&lt;li>Headings must start at level 2 (&lt;code>##&lt;/code>), as level 1 (&lt;code>#&lt;/code>) is the title of the
page&lt;/li>
&lt;li>Lines should be wrapped at 80 characters&lt;/li>
&lt;li>Sentences must be separated by one space only&lt;/li>
&lt;li>Indent is made with spaces, not with tabs&lt;/li>
&lt;li>Bullet lists should be using &lt;code>-&lt;/code> not &lt;code>*&lt;/code>&lt;/li>
&lt;li>Numbered lists should be using &lt;code>1.&lt;/code> for each line (automatic numbering)&lt;/li>
&lt;li>Indent secondary (and following) level lists with 2 spaces&lt;/li>
&lt;li>Lines must end with a Line Feed character (&lt;code>\n&lt;/code>)&lt;/li>
&lt;li>Files must end with an empty line&lt;/li>
&lt;li>Shell examples should include a prompt (&lt;code>$&lt;/code> or &lt;code>&amp;gt;&lt;/code>) in front of commands, to
make it easy to understand which is the command and which is the output&lt;/li>
&lt;li>Commands in shell examples should be broken into multiple lines of 80
characters or less, using a trailing backslash character (&lt;code>\&lt;/code>) on each line
that continues on the next&lt;/li>
&lt;li>Never break command output in shell examples to multiple lines, instead use
&lt;a href="#adding-exceptions-for-style-violations">style exceptions&lt;/a> when necessary&lt;/li>
&lt;/ul>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
Syntax examples that can be used in the
files are documented in the &lt;a href="../shortcodes">shortcodes&lt;/a> section.
&lt;/div>
&lt;h3 id="automating-formatting-and-checking">Automating formatting and checking&lt;/h3>
&lt;p>Style should be enforced via the usage of &lt;a href="https://prettier.io/">Prettier&lt;/a>.
Prettier can be integrated with
&lt;a href="https://prettier.io/docs/en/editors.html">various editors&lt;/a>.&lt;/p>
&lt;ul>
&lt;li>With VIM/neovim it can be used via a plugin like
&lt;a href="https://github.com/dense-analysis/ale">ALE&lt;/a> as described in the
&lt;a href="https://prettier.io/docs/en/vim.html">official documentation&lt;/a>.&lt;/li>
&lt;li>With &lt;a href="https://code.visualstudio.com">VisualStudio Code&lt;/a> please see the
&lt;a href="https://prettier.io/docs/en/editors.html#visual-studio-code">official documentation&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>Configuration is provided in &lt;code>.prettierrc&lt;/code>, options can be set as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>--print-width &lt;span style="color:#0000cf;font-weight:bold">80&lt;/span> --tab-width &lt;span style="color:#0000cf;font-weight:bold">2&lt;/span> --prose-wrap always
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>When a contribution is received (via a pull request), the proposed changes are
checked using
&lt;a href="https://github.com/EGI-Federation/documentation/tree/main/.github/workflows">various linters&lt;/a>.&lt;/p>
&lt;h2 id="general-writing-guidelines">General writing guidelines&lt;/h2>
&lt;p>Follow the guidelines below to ensure readability and consistency of the EGI
documentation. These are based on the
&lt;a href="https://docs.openstack.org/doc-contrib-guide/writing-style.html">OpenStack documentation writing style&lt;/a>
guidelines, released under a
&lt;a href="https://creativecommons.org/licenses/by/3.0/">Creative Commons license&lt;/a>.&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
Short and simple sentences are easier to
read and understand.
&lt;/div>
&lt;h3 id="use-standard-english">Use standard English&lt;/h3>
&lt;p>Use standard British English (UK) throughout all technical publications. When in
doubt about the spelling of a word, consult the Merriam-Webster’s Collegiate
Dictionary and the
&lt;a href="https://www.ibm.com/developerworks/library/styleguidelines/">IBM developerWorks editorial style guide&lt;/a>.&lt;/p>
&lt;h3 id="be-clear-and-concise">Be clear and concise&lt;/h3>
&lt;p>Follow the principles of minimalism. If you can describe an idea in one word, do
not use two words. Eliminate all redundant modifiers, such as adjectives and
adverbs.&lt;/p>
&lt;h3 id="write-objectively">Write objectively&lt;/h3>
&lt;p>Do not use humor, jargon, exclamation marks, idioms, metaphors, and other
colloquialisms.&lt;/p>
&lt;h3 id="describe-the-most-common-use-case-first">Describe the most common use case first&lt;/h3>
&lt;p>Put the most common case in the main clause and at the beginning of a paragraph
or section. You can introduce additional use cases by starting a sentence with
“however” or “if”.&lt;/p>
&lt;h3 id="write-in-active-voice">Write in active voice&lt;/h3>
&lt;p>In general, write in active voice rather than passive voice. Active voice
identifies the agent of action as the subject of the verb, usually the user.
Passive voice identifies the recipient (not the source) of the action as the
subject of the verb.&lt;/p>
&lt;p>Active-voice sentences clarify the performer of an action and are easier to
understand than passive-voice sentences. Passive voice is usually less engaging
and more complicated than active voice. When you use passive voice, the actions
and responses of the software can be difficult to distinguish from those of the
user. In addition, passive voice usually requires more words than active voice.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-2" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-2-0-tab" data-toggle="tab" href="#tabs-2-0" role="tab"
aria-controls="tabs-2-0" aria-selected="true">
Examples
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-2-content">
&lt;div class="tab-pane show active"
id="tabs-2-0" role="tabpanel" aria-labelled-by="tabs-2-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>After the software has been installed, the computer can be started.&lt;/td>
&lt;td>After you install the software, start the computer.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>The Configuration is saved when you click OK.&lt;/td>
&lt;td>Click OK to save the configuration.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>A server is created by you.&lt;/td>
&lt;td>Create a server.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>However, passive voice is acceptable in the following situations:&lt;/p>
&lt;ul>
&lt;li>Using active voice sounds like you are blaming the user. For example, you can
use passive voice in an error message or troubleshooting content when the
active subject is the user.&lt;/li>
&lt;/ul>
&lt;ul class="nav nav-tabs" id="tabs-3" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-3-0-tab" data-toggle="tab" href="#tabs-3-0" role="tab"
aria-controls="tabs-3-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-3-content">
&lt;div class="tab-pane show active"
id="tabs-3-0" role="tabpanel" aria-labelled-by="tabs-3-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>If the build fails, you probably omitted the flavor.&lt;/td>
&lt;td>If the build fails, the flavor might have been omitted.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;ul>
&lt;li>The agent of action is unknown, or you want to de-emphasize the agent of
action and emphasize the object on which the action is performed.&lt;/li>
&lt;/ul>
&lt;ul class="nav nav-tabs" id="tabs-4" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-4-0-tab" data-toggle="tab" href="#tabs-4-0" role="tab"
aria-controls="tabs-4-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-4-content">
&lt;div class="tab-pane show active"
id="tabs-4-0" role="tabpanel" aria-labelled-by="tabs-4-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>The product, OS, or database returns the messages.&lt;/td>
&lt;td>The messages are returned [by the database].&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;ul>
&lt;li>Recasting the sentence in active voice is wordy or awkward.&lt;/li>
&lt;/ul>
&lt;ul class="nav nav-tabs" id="tabs-5" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-5-0-tab" data-toggle="tab" href="#tabs-5-0" role="tab"
aria-controls="tabs-5-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-5-content">
&lt;div class="tab-pane show active"
id="tabs-5-0" role="tabpanel" aria-labelled-by="tabs-5-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>In 2009, engineers developed a software that simplifies the installation.&lt;/td>
&lt;td>A software that simplifies the installation was developed in 2009.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="write-in-second-person">Write in second person&lt;/h3>
&lt;p>Users are more engaged with documentation when you use second person (that is,
you address the user as “you”).&lt;/p>
&lt;p>Writing in second person has the following advantages:&lt;/p>
&lt;ul>
&lt;li>Second person promotes a friendly tone by addressing users directly.&lt;/li>
&lt;li>Using second person with the imperative mood (in which the subject you is
understood) and active voice helps to eliminate wordiness and confusion about
who or what initiates an action, especially in procedural steps.&lt;/li>
&lt;li>Using second person also avoids the use of gender-specific, third-person
pronouns such as he, she, his, and hers. If you must use third person, use the
pronouns they and their, but ensure that the pronoun matches the referenced
noun in number.&lt;/li>
&lt;li>Use first person plural pronouns (we, our) judiciously. These pronouns
emphasize the writer or EGI rather than the user, so before you use them,
consider whether second person or imperative mood is more “user-friendly.”
However, use “we recommend” rather than “it is recommended” or “EGI
recommends”.&lt;/li>
&lt;/ul>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
You can use “we” in the place of EGI if
necessary.
&lt;/div>
&lt;p>Do not use first person to avoid naming the product or to avoid using passive
voice. If the product is performing the action, use third person (the product as
an actor). If you want to de-emphasize the agent of action and emphasize the
object on which the action is performed, use passive voice.&lt;/p>
&lt;p>The first-person singular pronoun “I” is acceptable in the question part of FAQs
and when authors of blogs or signed articles are describing their own actions or
opinions.&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
Do not switch person (point of
view) in the same guide or on the same page.
&lt;/div>
&lt;ul class="nav nav-tabs" id="tabs-8" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-8-0-tab" data-toggle="tab" href="#tabs-8-0" role="tab"
aria-controls="tabs-8-0" aria-selected="true">
Examples
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-8-content">
&lt;div class="tab-pane show active"
id="tabs-8-0" role="tabpanel" aria-labelled-by="tabs-8-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Creating a server involves specifying a name, flavor, and image.&lt;/td>
&lt;td>To create a server, specify a name, a flavor, and image.&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>To create a server, the user specifies a name, flavor, and image.&lt;/td>
&lt;td>To create a server, you specify a name, flavor, and image.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="use-the-present-simple-tense">Use the present simple tense&lt;/h3>
&lt;p>Users read documentation to perform tasks or gather information. For users,
these activities take place in their present, so the present tense is
appropriate in most cases. Additionally, the present tense is easier to read
than the past or future tense.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-9" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-9-0-tab" data-toggle="tab" href="#tabs-9-0" role="tab"
aria-controls="tabs-9-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-9-content">
&lt;div class="tab-pane show active"
id="tabs-9-0" role="tabpanel" aria-labelled-by="tabs-9-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>The product will prompt you to verify the deletion. After you log in, your account will then begin the verification process.&lt;/td>
&lt;td>The product prompts you to verify the deletion. After you log in, your account begins the verification process.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
Use the future tense only when you need
to emphasize that something will occur later (from the users’ perspective).
&lt;/div>
&lt;h3 id="do-not-humanize-inanimate-objects">Do not humanize inanimate objects&lt;/h3>
&lt;p>Do not give human characteristics to non-human subjects or objects.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-11" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-11-0-tab" data-toggle="tab" href="#tabs-11-0" role="tab"
aria-controls="tabs-11-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-11-content">
&lt;div class="tab-pane show active"
id="tabs-11-0" role="tabpanel" aria-labelled-by="tabs-11-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>This guide assumes&amp;hellip;&lt;/td>
&lt;td>This guide describes&amp;hellip;&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="avoid-personification">Avoid personification&lt;/h3>
&lt;p>Do not express your fears or feelings in technical writing. Avoid the adverbs
such as “probably”, “hopefully”, “basically”, and so on.&lt;/p>
&lt;h3 id="avoid-ambiguous-titles">Avoid ambiguous titles&lt;/h3>
&lt;p>Each title should include a clear description of the page’s or chapter&amp;rsquo;s
subject.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-12" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-12-0-tab" data-toggle="tab" href="#tabs-12-0" role="tab"
aria-controls="tabs-12-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-12-content">
&lt;div class="tab-pane show active"
id="tabs-12-0" role="tabpanel" aria-labelled-by="tabs-12-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Update metadata&lt;/td>
&lt;td>Update object metadata&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="eliminate-needless-politeness">Eliminate needless politeness&lt;/h3>
&lt;p>Do not use “please” and “thank you” in technical documentation.&lt;/p>
&lt;h3 id="write-positively">Write positively&lt;/h3>
&lt;p>Write in a positive tone. Positive sentences improve readability. Try to avoid
the following words as much as possible:&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-13" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-13-0-tab" data-toggle="tab" href="#tabs-13-0" role="tab"
aria-controls="tabs-13-0" aria-selected="true">
Examples
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-13-content">
&lt;div class="tab-pane show active"
id="tabs-13-0" role="tabpanel" aria-labelled-by="tabs-13-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>damage&lt;/td>
&lt;td>affect&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>catastrophic&lt;/td>
&lt;td>serious&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>bad&lt;/td>
&lt;td>serious (or add explanation)&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>fail&lt;/td>
&lt;td>unable to&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>kill&lt;/td>
&lt;td>cancel or stop&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>fatal&lt;/td>
&lt;td>serious&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>destroy&lt;/td>
&lt;td>remove or delete&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>wrong&lt;/td>
&lt;td>incorrect or inconsistent&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="do-not-use-contractions">Do not use contractions&lt;/h3>
&lt;p>Generally, do not contract the words.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-14" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-14-0-tab" data-toggle="tab" href="#tabs-14-0" role="tab"
aria-controls="tabs-14-0" aria-selected="true">
Examples
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-14-content">
&lt;div class="tab-pane show active"
id="tabs-14-0" role="tabpanel" aria-labelled-by="tabs-14-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>can&amp;rsquo;t&lt;/td>
&lt;td>cannot&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>don&amp;rsquo;t&lt;/td>
&lt;td>do not&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="do-not-overuse-this-that-these-and-it">Do not overuse this, that, these, and it&lt;/h3>
&lt;p>Use these pronouns sparingly. Overuse contributes to readers’ confusion. To fix
the ambiguity, rephrase the sentence.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-15" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-15-0-tab" data-toggle="tab" href="#tabs-15-0" role="tab"
aria-controls="tabs-15-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-15-content">
&lt;div class="tab-pane show active"
id="tabs-15-0" role="tabpanel" aria-labelled-by="tabs-15-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>The monitoring system should perform regular checks to verify that the Ceph cluster is healthy. This can be achieved using the Ceph health command.&lt;/td>
&lt;td>The monitoring system performs regular checks to ensure the Ceph cluster is functioning correctly. Use the Ceph health command to run a health check.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
You can also fix the ambiguity by placing
a noun modifier immediately after the pronoun.
&lt;/div>
&lt;h3 id="do-not-split-infinitives">Do not split infinitives&lt;/h3>
&lt;p>Do not place modifiers between “to” and the verb. Typically, placing an adverb
or an adjective between “to” and a verb adds ambiguity to a sentence.&lt;/p>
&lt;h3 id="avoid-prepositions-at-the-end-of-sentences">Avoid prepositions at the end of sentences&lt;/h3>
&lt;p>As much as possible, avoid trailing prepositions in sentences by avoiding
phrasal verbs.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-17" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-17-0-tab" data-toggle="tab" href="#tabs-17-0" role="tab"
aria-controls="tabs-17-0" aria-selected="true">
Example
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-17-content">
&lt;div class="tab-pane show active"
id="tabs-17-0" role="tabpanel" aria-labelled-by="tabs-17-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>The image registration window will open up.&lt;/td>
&lt;td>The image registration window opens.&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;p>To fix the verb-preposition constructions, replace them with active verbs.&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-18" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-18-0-tab" data-toggle="tab" href="#tabs-18-0" role="tab"
aria-controls="tabs-18-0" aria-selected="true">
Examples
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-18-content">
&lt;div class="tab-pane show active"
id="tabs-18-0" role="tabpanel" aria-labelled-by="tabs-18-0-tab">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Do not use&lt;/th>
&lt;th>Use&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>written up&lt;/td>
&lt;td>composed&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>pop up&lt;/td>
&lt;td>appear&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/div>
&lt;h3 id="use-consistent-terminology">Use consistent terminology&lt;/h3>
&lt;p>Use consistent terms across all content. Avoid multiple variations or spellings
to refer to the same service, function, UI element, and so on.&lt;/p>
&lt;h3 id="use-spelling-and-grammar-checking-tools">Use spelling and grammar checking tools&lt;/h3>
&lt;p>Run text through spelling and grammar checking tools, if available. Correcting
mistakes, especially to larger sections of new content, helps eliminate rework
later.&lt;/p>
&lt;h3 id="lists">Lists&lt;/h3>
&lt;p>When reading a document for the first time, users scan through pages stopping
only on the content that stands out, such as titles, lists, links, diagrams, and
so on. Lists help to organize options, as well as help readers to find
information easily.&lt;/p>
&lt;p>When listing items, follow these guidelines:&lt;/p>
&lt;ul>
&lt;li>Use a &lt;strong>bulleted list&lt;/strong> for options. Create a bulleted list when you need to
describe more than three options.&lt;/li>
&lt;li>Use a &lt;strong>numbered list&lt;/strong> for steps.&lt;/li>
&lt;li>Use a &lt;strong>definition list&lt;/strong> to explain terms or describe command-line
parameters, options, or arguments.&lt;/li>
&lt;li>Use a colon at the end of the sentence that introduces a list.&lt;/li>
&lt;li>Use the same grammatical structure (aka parallel structure) for all items in a
list.&lt;/li>
&lt;li>Start each option with a capital letter.&lt;/li>
&lt;/ul>
&lt;p>When listing options in a paragraph, add &lt;em>and&lt;/em> or &lt;em>or&lt;/em> before the last item in a
list. Use a serial (Oxford) comma before these conjunctions if they connect
three or more items.&lt;/p>
&lt;h3 id="punctuation-in-lists">Punctuation in lists&lt;/h3>
&lt;p>In bulleted lists:&lt;/p>
&lt;ul>
&lt;li>If you list individual words or phrases, do not add a period at the end of
each list item.&lt;/li>
&lt;li>If you use full sentences, add a period at the end of each sentence.&lt;/li>
&lt;li>If your list includes both individual words or phrases and full sentences, be
consistent and either add or do not add periods to all items.&lt;/li>
&lt;/ul>
&lt;p>In numbered lists:&lt;/p>
&lt;ul>
&lt;li>Add periods at the end of steps.&lt;/li>
&lt;li>If an item of a numbered list is followed by a code block that illustrates how
to perform the step, use a colon at the end.&lt;/li>
&lt;/ul>
&lt;h2 id="adding-exceptions-for-style-violations">Adding exceptions for style violations&lt;/h2>
&lt;p>Successfully passing the checks is a firm requirement, but for the following
cases it is possible to
&lt;a href="https://github.com/DavidAnson/markdownlint#configuration">add exceptions&lt;/a> and
bypass &lt;strong>some checks&lt;/strong> in Markdown files:&lt;/p>
&lt;ul>
&lt;li>When in-line HTML must be used (e.g. in tables, or when no other proper
solution is available)&lt;/li>
&lt;li>When the same procedure needs to be described for multiple platforms, and the
automatic checker flags it as duplicate content&lt;/li>
&lt;/ul>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
Exceptions should only be used
when there are no other choices, and should be confined to the smallest possible
block of Markdown code.
&lt;/div>
&lt;h3 id="dealing-with-in-line-html-tags">Dealing with in-line HTML tags&lt;/h3>
&lt;p>In some specific cases it is impossible to use anything but in-line HTML tags:&lt;/p>
&lt;ul>
&lt;li>Presentation page leveraging bootstrap CSS classes or other advanced features&lt;/li>
&lt;li>Using special formatting for the information presented (e.g. a list in a table
cell)&lt;/li>
&lt;/ul>
&lt;p>Blocks with in-line HTML tags should be preceded by a HTML comment starting with
&lt;a href="https://github.com/DavidAnson/markdownlint#configuration">markdownlint-disable&lt;/a>
to disable the &lt;code>no-inline-html&lt;/code> check, as in the following example:&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
When having a table is not absolutely
necessary, use a different construct to present the information.
&lt;/div>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">&amp;lt;!-- markdownlint-disable no-inline-html --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| Action | OCCI | OpenStack | This is a very long column with important data |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| ----------- | ------------------------ | ---------------------- | ---------------------------------------------- |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>| List images | &lt;span style="color:#4e9a06">`occi -a list -r os_tpl`&lt;/span> | &lt;span style="color:#4e9a06">`openstack image list`&lt;/span> | &lt;span style="color:#000;font-weight:bold">&amp;lt;&lt;/span>&lt;span style="color:#204a87;font-weight:bold">ul&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&amp;lt;&lt;/span>&lt;span style="color:#204a87;font-weight:bold">li&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span>Lorem&lt;span style="color:#000;font-weight:bold">&amp;lt;/&lt;/span>&lt;span style="color:#204a87;font-weight:bold">li&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&amp;lt;&lt;/span>&lt;span style="color:#204a87;font-weight:bold">li&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span>ipsum&lt;span style="color:#000;font-weight:bold">&amp;lt;/&lt;/span>&lt;span style="color:#204a87;font-weight:bold">li&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&amp;lt;/&lt;/span>&lt;span style="color:#204a87;font-weight:bold">ul&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span> |
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">&amp;lt;!-- markdownlint-enable no-inline-html --&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
Do not forget to follow up with a HTML
comment starting with
&lt;a href="https://github.com/DavidAnson/markdownlint#configuration">markdownlint-enable&lt;/a>
to re-enable the &lt;code>no-inline-html&lt;/code> check.
&lt;/div>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
Always use the tag that is
providing the proper semantic: e.g. for a list use &lt;code>&amp;lt;ul&amp;gt;&lt;/code> and &lt;code>&amp;lt;li&amp;gt;&lt;/code>, not
&lt;code>&amp;lt;br /&amp;gt;&lt;/code>.
&lt;/div>
&lt;h3 id="dealing-with-duplicate-content">Dealing with duplicate content&lt;/h3>
&lt;p>When the same procedure needs to be described for multiple platforms, or when
the same code has to be exemplified for multiple languages, it is possible that
the automatic checkers will flag these as duplicates.&lt;/p>
&lt;p>For example, describing the following procedure will result in duplicates being
reported:&lt;/p>
&lt;!--
// jscpd:ignore-start
-->
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-html-template" data-lang="go-html-template">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabpanex&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Linux&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> To run the FedCloud client in a container, make sure
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [Docker is installed](https://docs.docker.com/engine/install/#server),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> then run the following commands:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> $ docker pull tdviet/fedcloudclient
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> $ docker run -it tdviet/fedcloudclient bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Mac&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> To run the FedCloud client in a container, make sure
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [Docker is installed](https://docs.docker.com/desktop/mac/install/),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> then run the following commands:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> $ docker pull tdviet/fedcloudclient
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> $ docker run -it tdviet/fedcloudclient bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Windows&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> To run the FedCloud client in a container, make sure
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> [Docker is installed](https://docs.docker.com/desktop/windows/install/),
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> then run the following commands:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;gt; docker pull tdviet/fedcloudclient
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &amp;gt; docker run -it tdviet/fedcloudclient bash
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> ```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabpanex&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;!--
// jscpd:ignore-end
-->
&lt;p>This type of content should be preceded by a HTML comment that disables the
check for duplicates, and followed by another HTML comment that enables it
again.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">&amp;lt;!--
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">// jscpd:ignore-start
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">--&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>...content with duplicates here...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">&amp;lt;!--
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">// jscpd:ignore-end
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">--&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>About: Shortcodes</title><link>/about/contributing/shortcodes/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/about/contributing/shortcodes/</guid><description>
&lt;p>In addition to the formatting support provided by
&lt;a href="https://spec.commonmark.org/0.29/">Markdown&lt;/a>, Hugo adds support for
&lt;em>shortcodes&lt;/em>, which are Go templates for easily including or displaying content
(images, notes, tips, advanced display blocks, etc.).&lt;/p>
&lt;p>For reference, the following shortcodes are available:&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://gohugo.io/content-management/shortcodes/">Hugo&amp;rsquo;s shortcodes&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.docsy.dev/docs/adding-content/shortcodes/">Docsy theme shortcodes&lt;/a>&lt;/li>
&lt;/ul>
&lt;h2 id="highlighted-paragraphs">Highlighted paragraphs&lt;/h2>
&lt;p>This is achieved using
&lt;a href="https://www.docsy.dev/docs/adding-content/shortcodes/#shortcode-helpers">Docsy shortcodes&lt;/a>.&lt;/p>
&lt;h3 id="placeholders">Placeholders&lt;/h3>
&lt;p>The following code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>{{% pageinfo %}} This is a placeholder. {{% /pageinfo %}}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;div class="pageinfo pageinfo-primary">
This is a placeholder.
&lt;/div>
&lt;h3 id="information-messages">Information messages&lt;/h3>
&lt;p>The following code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>{{% alert title=&amp;#34;Note&amp;#34; color=&amp;#34;info&amp;#34; %}} This is a Note. {{% /alert %}}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>
This is a Note.
&lt;/div>
&lt;h3 id="warning-messages">Warning messages&lt;/h3>
&lt;p>The following code:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>{{% alert title=&amp;#34;Important&amp;#34; color=&amp;#34;warning&amp;#34; %}} This is a warning.
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{{% /alert %}}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">Important&lt;/h4>
This is a warning.
&lt;/div>
&lt;h2 id="code-or-shell-snippets">Code or shell snippets&lt;/h2>
&lt;p>The code or instructions should be surrounded with three backticks, followed by
an optional highlighting type parameter.&lt;/p>
&lt;p>The supported languages are dependent on the syntax highlighter, which depends
itself on the Markdown parser.&lt;/p>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>
&lt;a href="https://gohugo.io/">Hugo&lt;/a> uses the
&lt;a href="https://github.com/yuin/goldmark">goldmark parser&lt;/a>, which relies on
&lt;a href="https://prismjs.com/download.html#themes=prism">Prism syntax highlighting&lt;/a>.
&lt;/div>
&lt;p>The following Markdown creates a shell excerpt:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-markdown" data-lang="markdown">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">```shell
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">&lt;/span>$ ssh-keygen -f fedcloud
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">echo&lt;/span> &lt;span style="color:#000">$HOME&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#4e9a06">```&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ ssh-keygen -f fedcloud
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ &lt;span style="color:#204a87">echo&lt;/span> &lt;span style="color:#000">$HOME&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
If you click the &lt;em>Copy&lt;/em> button in the
top-right corner of a shell example, all commands in that block are copied to
the clipboard. The prompt in front of each command, and any command output is
not copied.
&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>
In case the command(s) in your shell
example cause the introduction of a horizontal scroll bar,
&lt;a href="../style/#basic-rules">consider breaking the command(s) into multiple lines&lt;/a>
with trailing backslashes (\). However, you should never break command output
to multiple lines, as that makes understanding the output, and recognizing it in
real life, very difficult.
&lt;/div>
&lt;h3 id="code-in-multiple-languages">Code in multiple languages&lt;/h3>
&lt;p>This is also achieved using
&lt;a href="https://www.docsy.dev/docs/adding-content/shortcodes/#tabbed-panes">Docsy shortcodes&lt;/a>.&lt;/p>
&lt;p>When you need to include code snippets, and you want to provide the same code in
multiple programming languages, you can use a tabbed pane for code snippets:&lt;/p>
&lt;!-- markdownlint-disable no-inline-html no-missing-space-atx -->
&lt;!-- markdownlint-disable blanks-around-fences no-space-in-code -->
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-html-template" data-lang="go-html-template">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabpane&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;C++&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lang&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;C++&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>#include &lt;span style="color:#000;font-weight:bold">&amp;lt;&lt;/span>&lt;span style="color:#204a87;font-weight:bold">iostream&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>int main()
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> std::cout &lt;span style="color:#a40000">&amp;lt;&amp;lt;&lt;/span> &amp;#34;Hello World!&amp;#34; &lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;lt;&lt;/span> &lt;span style="color:#204a87;font-weight:bold">std::endl&lt;/span>&lt;span style="color:#a40000">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a40000">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Java&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lang&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Java&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c4a000">class&lt;/span> &lt;span style="color:#c4a000">HelloWorld&lt;/span> &lt;span style="color:#a40000">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#c4a000">static&lt;/span> &lt;span style="color:#c4a000">public&lt;/span> &lt;span style="color:#c4a000">void&lt;/span> &lt;span style="color:#c4a000">main&lt;/span>&lt;span style="color:#a40000">(&lt;/span> &lt;span style="color:#c4a000">String&lt;/span> &lt;span style="color:#c4a000">args&lt;/span>&lt;span style="color:#a40000">[]&lt;/span> &lt;span style="color:#a40000">)&lt;/span> &lt;span style="color:#a40000">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#c4a000">System&lt;/span>&lt;span style="color:#a40000">.&lt;/span>&lt;span style="color:#c4a000">out&lt;/span>&lt;span style="color:#a40000">.&lt;/span>&lt;span style="color:#c4a000">println&lt;/span>&lt;span style="color:#a40000">(&lt;/span> &lt;span style="color:#a40000">&amp;#34;&lt;/span>&lt;span style="color:#c4a000">Hello&lt;/span> &lt;span style="color:#c4a000">World&lt;/span>&lt;span style="color:#a40000">!&amp;#34;&lt;/span> &lt;span style="color:#a40000">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#a40000">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a40000">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Kotlin&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lang&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Kotlin&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#c4a000">fun&lt;/span> &lt;span style="color:#c4a000">main&lt;/span>&lt;span style="color:#a40000">(&lt;/span>&lt;span style="color:#c4a000">args&lt;/span> &lt;span style="color:#c4a000">:&lt;/span> &lt;span style="color:#c4a000">Array&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#c4a000">String&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span>) {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> println(&amp;#34;Hello, world!&amp;#34;)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Go&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">lang&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Go&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>import &amp;#34;fmt&amp;#34;
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>func main() {
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> fmt.Printf(&amp;#34;Hello World!\n&amp;#34;)
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tab&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabpane&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;!-- prettier-ignore -->
&lt;ul class="nav nav-tabs" id="tabs-6" role="tablist">&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-6-0-tab" data-toggle="tab" href="#tabs-6-0" role="tab"
aria-controls="tabs-6-0" aria-selected="true">
C&amp;#43;&amp;#43;
&lt;/a>
&lt;/li>&lt;li class="nav-item">
&lt;a class="nav-link"
id="tabs-6-1-tab" data-toggle="tab" href="#tabs-6-1" role="tab"
aria-controls="tabs-6-1" aria-selected="false">
Java
&lt;/a>
&lt;/li>&lt;li class="nav-item">
&lt;a class="nav-link"
id="tabs-6-2-tab" data-toggle="tab" href="#tabs-6-2" role="tab"
aria-controls="tabs-6-2" aria-selected="false">
Kotlin
&lt;/a>
&lt;/li>&lt;li class="nav-item">
&lt;a class="nav-link"
id="tabs-6-3-tab" data-toggle="tab" href="#tabs-6-3" role="tab"
aria-controls="tabs-6-3" aria-selected="false">
Go
&lt;/a>
&lt;/li>&lt;/ul>
&lt;div class="tab-content" id="tabs-6-content">&lt;div class="tab-pane fade show active"
id="tabs-6-0" role="tabpanel" aria-labelled-by="tabs-6-0-tab">&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-C++" data-lang="C++">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">#include&lt;/span> &lt;span style="color:#8f5902;font-style:italic">&amp;lt;iostream&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">
&lt;/span>&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">&lt;/span>&lt;span style="color:#204a87;font-weight:bold">int&lt;/span> &lt;span style="color:#000">main&lt;/span>&lt;span style="color:#000;font-weight:bold">()&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">std&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">::&lt;/span>&lt;span style="color:#000">cout&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Hello World!&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">&amp;lt;&amp;lt;&lt;/span> &lt;span style="color:#000">std&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">::&lt;/span>&lt;span style="color:#000">endl&lt;/span>&lt;span style="color:#000;font-weight:bold">;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/div>
&lt;div class="tab-pane fade"
id="tabs-6-1" role="tabpanel" aria-labelled-by="tabs-6-1-tab">&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-Java" data-lang="Java">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">class&lt;/span> &lt;span style="color:#000">HelloWorld&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">static&lt;/span> &lt;span style="color:#204a87;font-weight:bold">public&lt;/span> &lt;span style="color:#204a87;font-weight:bold">void&lt;/span> &lt;span style="color:#000">main&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span> &lt;span style="color:#000">String&lt;/span> &lt;span style="color:#000">args&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">[]&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">)&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">System&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#c4a000">out&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">.&lt;/span>&lt;span style="color:#c4a000">println&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">(&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;Hello World!&amp;#34;&lt;/span> &lt;span style="color:#ce5c00;font-weight:bold">);&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#ce5c00;font-weight:bold">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/div>
&lt;div class="tab-pane fade"
id="tabs-6-2" role="tabpanel" aria-labelled-by="tabs-6-2-tab">&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-Kotlin" data-lang="Kotlin">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">fun&lt;/span> &lt;span style="color:#000">main&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#000">args&lt;/span> &lt;span style="color:#000;font-weight:bold">:&lt;/span> &lt;span style="color:#000">Array&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;lt;&lt;/span>&lt;span style="color:#000">String&lt;/span>&lt;span style="color:#000;font-weight:bold">&amp;gt;)&lt;/span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">println&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Hello, world!&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/div>
&lt;div class="tab-pane fade"
id="tabs-6-3" role="tabpanel" aria-labelled-by="tabs-6-3-tab">&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-Go" data-lang="Go">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">import&lt;/span> &lt;span style="color:#4e9a06">&amp;#34;fmt&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87;font-weight:bold">func&lt;/span> &lt;span style="color:#000">main&lt;/span>&lt;span style="color:#000;font-weight:bold">()&lt;/span> &lt;span style="color:#000;font-weight:bold">{&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#000">fmt&lt;/span>&lt;span style="color:#000;font-weight:bold">.&lt;/span>&lt;span style="color:#000">Printf&lt;/span>&lt;span style="color:#000;font-weight:bold">(&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Hello World!\n&amp;#34;&lt;/span>&lt;span style="color:#000;font-weight:bold">)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">}&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/div>
&lt;/div>
&lt;h2 id="content-with-multiple-variants">Content with multiple variants&lt;/h2>
&lt;p>When you need to include multiple variants of the same content, other than code
snippets in multiple programming languages, you can use the following shortcode:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-go-html-template" data-lang="go-html-template">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabpanex&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Linux&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>You can list all files in a folder using the command:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ ls -a -l
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Mac&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>To get a list of all files in a folder, press **Cmd** + **Space** to open
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>a spotlight search, type terminal, then press Enter. In the terminal window
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>then run the command:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>$ ls -a -l
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#000">header&lt;/span>&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>&lt;span style="color:#4e9a06">&amp;#34;Windows&amp;#34;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>You can list all files in the current folder using the command:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```shell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;gt; dir
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>or you can use PowerShell:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```powershell
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&amp;gt; Get-ChildItem -Path .\
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>```
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabx&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#8f5902;font-style:italic">{{&lt;/span>&lt;span style="color:#a40000">&amp;lt;&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">/&lt;/span>&lt;span style="color:#000">tabpanex&lt;/span>&lt;span style="color:#f8f8f8;text-decoration:underline"> &lt;/span>&lt;span style="color:#a40000">&amp;gt;&lt;/span>&lt;span style="color:#8f5902;font-style:italic">}}&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Will render as:&lt;/p>
&lt;ul class="nav nav-tabs" id="tabs-7" role="tablist">
&lt;li class="nav-item">
&lt;a class="nav-link active"
id="tabs-7-0-tab" data-toggle="tab" href="#tabs-7-0" role="tab"
aria-controls="tabs-7-0" aria-selected="true">
Linux
&lt;/a>
&lt;/li>
&lt;li class="nav-item">
&lt;a class="nav-link"
id="tabs-7-1-tab" data-toggle="tab" href="#tabs-7-1" role="tab"
aria-controls="tabs-7-1" aria-selected="false">
Mac
&lt;/a>
&lt;/li>
&lt;li class="nav-item">
&lt;a class="nav-link"
id="tabs-7-2-tab" data-toggle="tab" href="#tabs-7-2" role="tab"
aria-controls="tabs-7-2" aria-selected="false">
Windows
&lt;/a>
&lt;/li>
&lt;/ul>
&lt;div class="tabx-content" id="tabs-7-content">
&lt;div class="tab-pane show active"
id="tabs-7-0" role="tabpanel" aria-labelled-by="tabs-7-0-tab">
&lt;p>You can list all files in a folder using the command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ ls -a -l
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/div>
&lt;div class="tab-pane "
id="tabs-7-1" role="tabpanel" aria-labelled-by="tabs-7-1-tab">
&lt;p>To get a list of all files in a folder, press &lt;strong>Cmd&lt;/strong> + &lt;strong>Space&lt;/strong> to open a
spotlight search, type terminal, then press Enter. In the terminal window then
run the command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>$ ls -a -l
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/div>
&lt;div class="tab-pane "
id="tabs-7-2" role="tabpanel" aria-labelled-by="tabs-7-2-tab">
&lt;p>You can list all files in the current folder using the command:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&amp;gt; dir
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>or you can use PowerShell:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#000;font-weight:bold">&amp;gt;&lt;/span> &lt;span style="color:#204a87">Get-ChildItem&lt;/span> &lt;span style="color:#000">-Path&lt;/span> &lt;span style="color:#000;font-weight:bold">.\&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>
&lt;/div>
&lt;/div>
&lt;div class="alert alert-info" role="alert">
&lt;h4 class="alert-heading">Tip&lt;/h4>
You can include any valid markdown
content in each tab, including code or shell snippets.
&lt;/div>
&lt;!-- markdownlint-enable blanks-around-fences no-space-in-code -->
&lt;!-- markdownlint-enable no-inline-html no-missing-space-atx --></description></item></channel></rss>