Skip to content

Commit

Permalink
feat: Write docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HazAT committed Oct 2, 2023
1 parent 9ee673a commit 44569ae
Show file tree
Hide file tree
Showing 9 changed files with 76 additions and 19 deletions.
17 changes: 12 additions & 5 deletions website/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ export default defineConfig({
{
label: "Start here",
items: [
// Each item here is one entry in the navigation menu.
{
label: "What is Spotlight?",
link: "/what-is-spotlight/",
},
{
label: "Architecture",
link: "/architecture/",
},
],
},

Expand All @@ -41,13 +44,18 @@ export default defineConfig({
{
label: "Guides",
items: [
// Each item here is one entry in the navigation menu.
{
label: "Write a plugin",
link: "/guides/plugin/",
label: "Write an integration",
link: "/guides/integration/",
},
],
},
{
label: "Integrations",
autogenerate: {
directory: "integrations",
},
},
{
label: "Reference",
autogenerate: {
Expand All @@ -58,7 +66,6 @@ export default defineConfig({
customCss: ["./src/tailwind.css"],
}),
tailwind({
// Disable the default base styles:
applyBaseStyles: false,
}),
],
Expand Down
7 changes: 7 additions & 0 deletions website/src/content/docs/architecture.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Architecture of Spotlight
---

## Frontend

## Sidecar
14 changes: 14 additions & 0 deletions website/src/content/docs/guides/integration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: Write your own Integration
description: A guide how to write a Spotlight Integration
---

An integration in Spotlight is rather powerful. It can completely change the behavior, add, remove functionality from Spotlight.

By default, Spotlight really only is a slim skeleton for configured integrations. The minimal configuration of an integration has to have is and name and a version.

## Integration Ordering

All integrations are run in the order that they are configured. For instance, for the array `[sentry(), astro()]` in the `init` call, `sentry()` will run before `astro()` and astro might overwrite things perviously configured.

Your integration should ideally run in any order. If this isn’t possible, we recommend documenting that your integration needs to come first or last in your user’s integrations configuration array.
7 changes: 0 additions & 7 deletions website/src/content/docs/guides/plugin.md

This file was deleted.

12 changes: 12 additions & 0 deletions website/src/content/docs/integrations/astro.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Astro
---

```js
...
integrations: [astro({configOptions})]
...
```

## `configOptions`

12 changes: 12 additions & 0 deletions website/src/content/docs/integrations/django.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Django
---

```js
...
integrations: [django({configOptions})]
...
```

## `configOptions`

12 changes: 12 additions & 0 deletions website/src/content/docs/integrations/sentry.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Sentry
---

```js
...
integrations: [sentry({configOptions})]
...
```

## `configOptions`

8 changes: 4 additions & 4 deletions website/src/content/docs/reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ description: All the configuration options for setting up Spotlight
import * as Spotlight from '@sentry/spotlight';

Spotlight.init({
plugins: ['sentry']
integrations: [sentry()]
});
```


### `plugins`
### `integrations`

*type:* `string[]`
*type:* `<SpotlightIntegration>[]`

Defines which plugins should be loaded for Spotlight.
Defines which integrations should be loaded for Spotlight.
6 changes: 3 additions & 3 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -904,9 +904,9 @@ astring@^1.8.0:
integrity sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==

astro@^3.0.6:
version "3.2.0"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.2.0.tgz#699fca50f3c424ed562bae660d78d0813821e528"
integrity sha512-sDQnSFV46ZzNkVU6co5f8wilZFmGiWsqnIVoMhd5/XPU76iZdA40WqFyBOhGaji7hGuqbcjN8MGobMg53lsoUg==
version "3.2.1"
resolved "https://registry.yarnpkg.com/astro/-/astro-3.2.1.tgz#c37ce0a96589919e06dd00728e7a8513076f636b"
integrity sha512-idPwpMSdFg8wuS9HVkefDcbRdKpCkQzZGeKw3XO6enLcCv6ZvACRdWgl9xhM/N3RO4AOzrnJPAk1cbYcP3FdNQ==
dependencies:
"@astrojs/compiler" "^2.1.0"
"@astrojs/internal-helpers" "0.2.0"
Expand Down

0 comments on commit 44569ae

Please sign in to comment.