Skip to content

Commit

Permalink
Docs: make installation section more prominent
Browse files Browse the repository at this point in the history
  • Loading branch information
fushar committed Nov 16, 2024
1 parent 3648502 commit 06c6a84
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 40 deletions.
42 changes: 2 additions & 40 deletions web/docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,47 +45,9 @@ This starter guide will just demonstrate the basic features of TCFrame. For more
:::
## Installation
## Installing TCFrame
Firstly, we must get TCFrame on our system. It consists of C++ header files and a few helper scripts.
Download the latest TCFrame [here](https://github.com/ia-toki/tcrame/releases/download/v1.6.0/tcframe_1.6.0.zip>). Extract the zip file somewhere on your system; for example, `~/tcframe`. We will call this directory "TCFrame home". Confirm that you extracted it correctly by verifying that the directory `include` exists directly inside TCFrame home.
Then, add the following lines to your `~/.bashrc`. This will set the environment variable `TCFRAME_HOME` to our TCFrame home directory, and make `tcframe` command available everywhere.
```sh
export TCFRAME_HOME=~/tcframe
alias tcframe=$TCFRAME_HOME/scripts/tcframe
```
Restart your terminal session. Now, if you run

```
tcframe
```

You should see the following output

```
usage: tcframe <command>
Available commands:
build Compile spec file into runner program
version Print tcframe version
```

You're good to go!

:::info[Note]

If your `TCFRAME_HOME` contains space, you can escape it as follows:

```sh
export TCFRAME_HOME=~/path\ with\ space/tcframe
alias tcframe='$TCFRAME_HOME/scripts/tcframe'
```

:::
See the [Installation documentation](./installation).
## Preparing package directory
Expand Down
49 changes: 49 additions & 0 deletions web/docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Installation

TCFrame is a **header-only** C++ library, with a few helper shell scripts. In other words, you only need to get TCFrame's source code.

## Getting the source code

The recommended way is to **clone** the GitHub repository: **https://github.com/ia-toki/tcframe**. This way, you can just do `git pull` to fetch the latest updates. Alternatively, you can also **download** the latest release: **https://github.com/ia-toki/tcframe/releases**.

Suppose that you cloned or downloaded TCFrame to `~/tcframe`. We will call this directory "TCFrame home". Confirm that this directory is correct by verifying that the `include` directory exists directly inside the TCFrame home.

## Configure your environment

Next, add the following lines to your `~/.bashrc`. This will set the environment variable `TCFRAME_HOME` to our TCFrame home directory, and make the `tcframe` command available everywhere.

```sh
export TCFRAME_HOME=~/tcframe
alias tcframe=$TCFRAME_HOME/scripts/tcframe
```

:::note

If your `TCFRAME_HOME` contains space, you can escape it as follows:

```sh
export TCFRAME_HOME=~/path\ with\ space/tcframe
alias tcframe='$TCFRAME_HOME/scripts/tcframe'
```

:::

## Verifying setup

Restart your terminal session. Now, if you run

```
tcframe
```

You should see the following output

```
usage: tcframe <command>
Available commands:
build Compile spec file into runner program
version Print tcframe version
```

You're good to go!
1 change: 1 addition & 0 deletions web/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
const sidebars = {
docsSidebar: [
'introduction',
'installation',
'getting-started',
{
type: 'category',
Expand Down
5 changes: 5 additions & 0 deletions web/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ function HomepageHeader() {
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className="button button--secondary button--lg"
to="/docs/installation">
Get TCFrame
</Link>
<Link
className="button button--secondary button--lg"
to="/docs">
Expand Down
1 change: 1 addition & 0 deletions web/src/pages/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}

0 comments on commit 06c6a84

Please sign in to comment.