Skip to content

Commit

Permalink
Merge pull request #184 from bluecadet/feat/2.0-docs
Browse files Browse the repository at this point in the history
more docs
  • Loading branch information
claytercek authored Nov 26, 2024
2 parents 6d7089f + bf4f347 commit de1c3cc
Show file tree
Hide file tree
Showing 18 changed files with 404 additions and 225 deletions.
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"files": {
"ignoreUnknown": false,
"ignore": [],
"include": ["**/src/**/*.ts", "docs/**/*.ts", "docs/**/*.mts"]
"include": ["**/src/**/*.ts", "docs/**/*.ts", "docs/**/*.mts", "docs/**/*.vue"]
},
"formatter": {
"enabled": true,
Expand Down
48 changes: 47 additions & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,48 @@ export default defineConfig({
base: "/launchpad/",
srcDir: "src",

head: [
[
"link",
{
rel: "icon",
href: "data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🚀</text></svg>",
},
],
["meta", { name: "author", content: "Bluecadet" }],
["meta", { name: "og:title", content: "🚀 Launchpad" }],
[
"meta",
{
name: "og:description",
content:
"A comprehensive toolkit for managing interactive media installations. Includes content management, process monitoring, and automated deployment tools.",
},
],
["meta", { name: "og:type", content: "website" }],
["meta", { name: "og:url", content: "https://bluecadet.github.io/launchpad/" }],
[
"meta",
{
name: "keywords",
content:
"media installations, content management, process monitoring, deployment tools, interactive media, digital experiences, launchpad, pm2, cms integration",
},
],
["meta", { name: "robots", content: "index, follow" }],
["meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }],
],

// add canonical link to head
transformPageData(pageData, ctx) {
const canonicalUrl = `https://bluecadet.github.io/launchpad/${pageData.relativePath}`
.replace(/index\.md$/, "")
.replace(/\.md$/, ".html");

pageData.frontmatter.head ??= [];
pageData.frontmatter.head.push(["link", { rel: "canonical", href: canonicalUrl }]);
},

themeConfig: {
siteTitle: "🚀 Launchpad",
search: {
Expand All @@ -20,7 +62,7 @@ export default defineConfig({
},
nav: [
{
text: pkg.version,
text: `v${pkg.version}`,
items: [
{
text: "Changelog",
Expand All @@ -32,6 +74,10 @@ export default defineConfig({
},
],
},
{
text: "Bluecadet",
link: "https://bluecadet.com",
},
],

sidebar: [
Expand Down
4 changes: 1 addition & 3 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,5 @@ export default {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
});
},
enhanceApp({ app, router, siteData }) {
// ...
},
enhanceApp({ app, router, siteData }) {},
} satisfies Theme;
41 changes: 2 additions & 39 deletions docs/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -86,38 +86,6 @@
--vp-button-brand-active-bg: var(--vp-c-brand-1);
}

/**
* Component: Home
* -------------------------------------------------------------------------- */

:root {
--vp-home-hero-name-color: transparent;
--vp-home-hero-name-background: -webkit-linear-gradient(
120deg,
#bd34fe 30%,
#41d1ff
);

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#bd34fe 50%,
#47caff 50%
);
--vp-home-hero-image-filter: blur(44px);
}

@media (min-width: 640px) {
:root {
--vp-home-hero-image-filter: blur(56px);
}
}

@media (min-width: 960px) {
:root {
--vp-home-hero-image-filter: blur(68px);
}
}

/**
* Component: Custom Block
* -------------------------------------------------------------------------- */
Expand All @@ -129,11 +97,6 @@
--vp-custom-block-tip-code-bg: var(--vp-c-brand-soft);
}

/**
* Component: Algolia
* -------------------------------------------------------------------------- */

.DocSearch {
--docsearch-primary-color: var(--vp-c-brand-1) !important;
header p.tagline {
font-weight: bold;
}

12 changes: 11 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
"name": "@bluecadet/launchpad-docs",
"version": "0.1.0",
"private": true,
"type": "module",
"devDependencies": {
"vitepress": "^1.4.2",
"@bluecadet/launchpad": "2.0.0-next.2",
"@bluecadet/launchpad-cli": "2.0.0-next.2",
"@bluecadet/launchpad-content": "2.0.0-next.4",
"@bluecadet/launchpad-dashboard": "2.0.0-next.1",
"@bluecadet/launchpad-monitor": "2.0.0-next.3",
"@bluecadet/launchpad-scaffold": "2.0.0-next.1"
},
"dependencies": {
"lucide-vue-next": "^0.461.0",
"vitepress": "^1.5.0",
"vue": "^3.5.12"
},
"scripts": {
Expand Down
61 changes: 61 additions & 0 deletions docs/src/components/PackageCard.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<script setup lang="ts">
import { data as packageVersions } from "./package-versions.data.js";
const props = defineProps<{
package: "string";
href: "string";
description: "string";
}>();
</script>

<template>
<li>
<a :href="href" class="card">
<h3>@bluecadet/launchpad-{{ package }}</h3>
<p>{{ description }}</p>
<Badge type="tip" :text="'v' + packageVersions[package]" />
</a>
</li>
</template>

<style scoped>
li {
margin: 0 !important;
}
.card {
display: flex;
border: 1px solid var(--vp-c-bg-soft);
height: 100%;
background-color: var(--vp-c-bg-soft);
transition: border-color .25s,background-color .25s;
flex-direction: column;
padding: 24px;
border-radius: 12px;
color: inherit;
text-decoration: none;
align-items: start;
}
.card:hover {
border-color: var(--vp-c-brand-1);
color: inherit;
}
.card h3 {
margin: 0;
font-size: 1rem;
font-weight: 600;
}
.card p {
margin: 0;
font-size: 1rem;
font-weight: 400;
color: var(--vp-c-text-2);
line-height: 1.4;
margin-top: 0.5em;
margin-bottom: 1em;
}
</style>
76 changes: 76 additions & 0 deletions docs/src/components/PackageHeader.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<script setup lang="ts">
import { GitCommitVertical, Github, Hexagon, Logs } from "lucide-vue-next";
import { data as packageVersions } from "./package-versions.data.js";
const props = defineProps<{
package: "string";
}>();
</script>

<template>
<h1 v-if="package === 'launchpad'"><span class="package-base">@bluecadet/</span>launchpad</h1>
<h1 v-else><span class="package-base">@bluecadet/</span>launchpad-{{ package }}</h1>

<ul>
<li class="version"><GitCommitVertical size="18"/> v{{ packageVersions[package] }}</li>
<li class="link">
<a :href="`https://github.com/bluecadet/launchpad/tree/develop/packages/${package}`" target="_blank" rel="noopener noreferrer">
<Github size="18"/> github
</a>
</li>
<li class="link">
<a :href="`https://www.npmjs.com/package/@bluecadet/${package === 'launchpad' ? '' : 'launchpad-'}${package}`" target="_blank" rel="noopener noreferrer">
<Hexagon size="18"/> npm
</a>
</li>
<li class="link">
<a :href="`https://github.com/bluecadet/launchpad/tree/develop/packages/${package}/CHANGELOG.md`" target="_blank" rel="noopener noreferrer">
<Logs size="18"/> changelog
</a>
</li>
</ul>
</template>

<style scoped>
h1 {
font-size: 2.5rem;
}
h1 .package-base {
font-weight: normal;
color: var(--vp-c-text-2);
}
ul {
display: flex;
flex-wrap: wrap;
gap: 0.5rem 1rem;
list-style-type: none;
align-items: baseline;
padding: 0;
margin-bottom: 1.2rem;
}
li {
margin: 0 !important;
padding: 0;
}
a {
text-decoration: none;
}
li.version, li.link a {
display: flex;
gap: 0.25rem;
align-items: center;
}
li.version > svg {
/* this icon is skinny, so shave off the edges */
margin-inline: -0.2rem;
}
</style>
30 changes: 30 additions & 0 deletions docs/src/components/package-versions.data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import cliPackage from "@bluecadet/launchpad-cli/package.json" with { type: "json" };
import contentPackage from "@bluecadet/launchpad-content/package.json" with { type: "json" };
import monitorPackage from "@bluecadet/launchpad-monitor/package.json" with { type: "json" };
import scaffoldPackage from "@bluecadet/launchpad-scaffold/package.json" with { type: "json" };
import launchpadPackage from "@bluecadet/launchpad/package.json" with { type: "json" };
import { defineLoader } from "vitepress";

export interface Data {
launchpad: string;
content: string;
monitor: string;
cli: string;
scaffold: string;
}

declare const data: Data;

export { data };

export default defineLoader({
async load(): Promise<Data> {
return {
launchpad: launchpadPackage.version,
content: contentPackage.version,
monitor: monitorPackage.version,
cli: cliPackage.version,
scaffold: scaffoldPackage.version,
};
},
});
44 changes: 32 additions & 12 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# 🚀 Launchpad
---
titleTemplate: 🚀 Launchpad
---
<script setup>
import PackageHeader from './components/PackageHeader.vue'
import PackageCard from './components/PackageCard.vue'
</script>

**A toolkit for building and managing interactive media installations**
<PackageHeader package="launchpad"/>

Launchpad provides a collection of tools designed to streamline the development, deployment, and maintenance of media installations. It handles content management, process monitoring, system configuration, and more.

Expand All @@ -21,18 +27,25 @@ Launchpad provides a collection of tools designed to streamline the development,

## Core Packages

- [@bluecadet/launchpad-cli](./reference/cli/index.md): Command-line interface and configuration management
- [@bluecadet/launchpad-content](./reference/content/index.md): Content pipeline and transformation tools
- [@bluecadet/launchpad-monitor](./reference/monitor/index.md): Process monitoring and management
- [@bluecadet/launchpad-scaffold](./reference/scaffold/index.md): Windows system configuration
<ul class="card-grid">
<PackageCard package="cli" href="./reference/cli" description="Command-line interface and configuration management" />
<PackageCard package="content" href="./reference/content" description="Content pipeline and transformation tools" />
<PackageCard package="monitor" href="./reference/monitor" description="Process monitoring and management" />
<PackageCard package="scaffold" href="./reference/scaffold" description="Windows system configuration" />
</ul>

<style scoped>
.card-grid {
list-style-type: none;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
padding: 0;
}
</style>

## Quick Start

>[!NOTE] Tip
> See the [Getting Started](/guides/getting-started) guide for detailed setup instructions.


1. Install the packages you need:

```bash
Expand Down Expand Up @@ -63,4 +76,11 @@ export default defineConfig({

```bash
npx launchpad start
```
```

>[!NOTE] Tip
> See the [Getting Started](/guides/getting-started) guide for detailed setup instructions.
---

Developed with ❤️ by [Bluecadet](https://bluecadet.com), available free and open-source under the MIT license.
Loading

0 comments on commit de1c3cc

Please sign in to comment.