Skip to content

Commit

Permalink
Fix issues with docs website (#876)
Browse files Browse the repository at this point in the history
* Fix issues with docs website
Closes #732
Closes #797

These issues come from the fact that we have custom code for the sidebar
This custom code adds a logo (I moved that to the header) + algolia search (not very useful IMO, just search the github repo)

* Hide helper .mdx files
  • Loading branch information
julienduchesne authored Jun 7, 2023
1 parent 709b149 commit a474f0f
Show file tree
Hide file tree
Showing 20 changed files with 1,837 additions and 1,739 deletions.
6 changes: 0 additions & 6 deletions docs/algolia.json

This file was deleted.

5 changes: 4 additions & 1 deletion docs/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ route: /install

import { PlatformInstall, Tanka, Jb } from "../src/components/install"

# Installing Tanka
# Installation

Tanka is distributed as a single binary called `tk`. It already includes the Jsonnet compiler, but requires some tools to be available:

Expand All @@ -20,6 +20,9 @@ Tanka is distributed as a single binary called `tk`. It already includes the Jso
support](/helm)

<br />

## Tanka

<PlatformInstall elems={Tanka} def="macOS" />

## Jsonnet Bundler
Expand Down
5 changes: 0 additions & 5 deletions docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,5 @@ module.exports = {
precachePages: [`/`, `/install`, `/tutorial/overview`],
},
},

{
resolve: `gatsby-plugin-algolia-docsearch`,
options: require("./algolia.json"),
},
],
}
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"docz": "^2.4.0",
"gatsby": "^2.0.0",
"gatsby-image": "^3.11.0",
"gatsby-plugin-algolia-docsearch": "^1.0.5",
"gatsby-plugin-catch-links": "^2.1.21",
"gatsby-plugin-manifest": "^2.2.34",
"gatsby-plugin-offline": "^3.0.30",
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/home/snippet.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

```jsonnet
local k = import "k.libsonnet";
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/jb/arch.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

On ArchLinux, install using the [`jsonnet-bundler-bin`](https://aur.archlinux.org/packages/jsonnet-bundler-bin/) AUR package:

```
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/jb/binary.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

The `jb` binary is primarily distributed using [GitHub releases](https://github.com/jsonnet-bundler/jsonnet-bundler/releases).

#### Linux, macOS
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/jb/go.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

If you happen to have a local [Go](https://golang.org) toolchain available, you can build from source using `go install`:

```bash
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/jb/osx.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

On macOS, Jsonnet Bundler is best installed using [`brew`](https://brew.sh):

```bash
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/tk/arch.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

We maintain two AUR packages, one building [from
source](https://aur.archlinux.org/packages/tanka/) and another one using a
[pre-compiled binary](https://aur.archlinux.org/packages/tanka-bin/).
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/tk/binary.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

For all other operating systems, we provide pre-compiled binaries for Tanka at
[GitHub Releases](https://github.com/grafana/tanka/releases).

Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/tk/go.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

If you happen to have a local [Go](https://golang.org) toolchain, you can also build Tanka from source using `go install`:

```bash
Expand Down
4 changes: 4 additions & 0 deletions docs/src/components/install/tk/osx.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
hidden: true
---

On macOS, Tanka is best installed using [`brew`](https://brew.sh):

```bash
Expand Down
74 changes: 0 additions & 74 deletions docs/src/gatsby-theme-docz/base/Layout.js

This file was deleted.

68 changes: 0 additions & 68 deletions docs/src/gatsby-theme-docz/components/Header/index.js

This file was deleted.

38 changes: 21 additions & 17 deletions docs/src/gatsby-theme-docz/components/Logo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ import * as styles from "gatsby-theme-docz/src/components/Logo/styles"
/** @jsx jsx */
import { Flex, jsx } from "theme-ui"
import { Link, useConfig } from "docz"
import logo from '../../../../img/logo.svg'

export const Logo = () => {
const config = useConfig()
return (
<Flex alignItems="center" sx={styles.logo} data-testid="logo">
<Link
to="/"
sx={{
...styles.link,
display: "flex",
flexDirection: "column",
lineHeight: "1.2",
}}
>
<span>Grafana Tanka</span>
<span sx={{ fontSize: "0.7em" }}>{config.description}</span>
</Link>
</Flex>
)
const config = useConfig()
return (
<Flex alignItems="center" sx={styles.logo} data-testid="logo">
<Link
to="/"
sx={{
...styles.link,
display: "flex",
flexDirection: "column",
lineHeight: "1.2",
}}
>
<div sx={{ display: 'inline-block' }}>
<img src={logo} alt="That's my logo" sx={{ maxHeight: "1.2em", marginRight: '0.2em', display: 'inline-block', float: 'left' }} />
<span sx={{ display: 'inline-block' }}>Grafana Tanka</span>
<span sx={{ fontSize: "0.7em", display: 'block' }}>{config.description}</span>
</div>
</Link>
</Flex>
)
}
43 changes: 0 additions & 43 deletions docs/src/gatsby-theme-docz/components/Sidebar/algolia.js

This file was deleted.

Loading

0 comments on commit a474f0f

Please sign in to comment.