-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [M3-7538] - Cloud Manager Docs with Vitepress #10027
Merged
abailly-akamai
merged 13 commits into
linode:develop
from
abailly-akamai:M3-7538-vitepress
Jan 5, 2024
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e2bb298
Initial commit - config
abailly-akamai f76f706
Add GHA
abailly-akamai 3d14d72
cleanup
abailly-akamai f606118
cleanup
abailly-akamai 390c7c4
clean comments
abailly-akamai 7282826
clean plugin
abailly-akamai c23e5a6
remove setup node
abailly-akamai 5866079
replace npx with bunx
abailly-akamai 5cadd67
fix assets paths
abailly-akamai dea3b1d
Added changeset: Cloud Manager Documentation microsite with vitepress
abailly-akamai 62d1f06
fix typo
abailly-akamai 3d97408
Feedback
abailly-akamai 5bb2fda
Feedback 2
abailly-akamai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Deploy Cloud Manager Docs | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
|
||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- uses: oven-sh/setup-bun@v1 | ||
with: | ||
bun-version: 1.0.21 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pinning bun version for good measure |
||
|
||
- name: Build with VitePress | ||
run: bunx vitepress@1.0.0-rc.35 build docs | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: docs/.vitepress/dist | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
needs: build | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { guides } from "./plugins/sidebar"; | ||
|
||
export default { | ||
title: "Cloud Manager Docs", | ||
description: "Akamai Cloud Manger Documentation", | ||
srcDir: "./", | ||
base: "/manager/", | ||
themeConfig: { | ||
logo: "/akamai-wave.svg", | ||
nav: [ | ||
{ text: "Home", link: "/" }, | ||
{ text: "Getting Started", link: "/GETTING_STARTED" }, | ||
{ text: "Contributing", link: "/CONTRIBUTING" }, | ||
], | ||
search: { | ||
provider: "local", | ||
}, | ||
sidebar: [ | ||
{ | ||
text: "Development Guide", | ||
items: guides, | ||
}, | ||
], | ||
socialLinks: [ | ||
{ icon: "github", link: "https://github.com/linode/manager" }, | ||
], | ||
}, | ||
head: [["link", { rel: "icon", href: "/manager/favicon.ico" }]], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import * as fs from "fs"; | ||
import * as path from "path"; | ||
|
||
const DEVELOPMENT_GUIDE_PATH = "./docs/development-guide"; | ||
|
||
interface MarkdownInfo { | ||
text: string; | ||
link: string; | ||
} | ||
|
||
/** | ||
* Aggregates the pages in the development-guide and populates the left sidebar. | ||
*/ | ||
const scanDirectory = (directoryPath: string): MarkdownInfo[] => { | ||
const markdownFiles = fs | ||
.readdirSync(directoryPath) | ||
.filter((file) => file.endsWith(".md")); | ||
const markdownInfoArray: MarkdownInfo[] = []; | ||
|
||
markdownFiles.forEach((file) => { | ||
const filePath = path.join(directoryPath, file); | ||
const fileContent = fs.readFileSync(filePath, "utf-8"); | ||
|
||
const titleMatch = fileContent.match(/^#\s+(.*)/m); | ||
const title = titleMatch ? titleMatch[1] : "Untitled"; | ||
|
||
const markdownInfo: MarkdownInfo = { | ||
text: title, | ||
link: `/development-guide/${file}`, | ||
}; | ||
|
||
markdownInfoArray.push(markdownInfo); | ||
}); | ||
|
||
return markdownInfoArray; | ||
}; | ||
|
||
export const guides = scanDirectory(DEVELOPMENT_GUIDE_PATH); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Akamai Cloud Manager Documentation | ||
|
||
## Get Started | ||
|
||
To setup Cloud Manager and get ready for development, process to the [get started docs](GETTING_STARTED.md). | ||
|
||
## Contributing | ||
|
||
If you already have your development environment set up, please read the [contributing guidelines](CONTRIBUTING.md) to get help in creating your first Pull Request. | ||
|
||
To report a bug or request a feature in Cloud Manager, please [open a GitHub Issue](https://github.com/linode/manager/issues/new). For general feedback, use [linode.com/feedback](https://www.linode.com/feedback/). | ||
|
||
## Development Guide | ||
|
||
Please consult our [development guide](development-guide/01-repository-structure.md) to start contributing! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Added | ||
--- | ||
|
||
Cloud Manager Documentation microsite with vitepress ([#10027](https://github.com/linode/manager/pull/10027)) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we may want to target
master
eventually? I think it's ok for now but open to feedbackThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My vote would be keeping
develop
with this setup. Our docs are mostly targeted at developers and we want them looking at our latest documentation at all times.I also hold this opinion on Storybook but I don't think many agree
If we start building multiple environments (like design.dev.linode.com or docs.cloud.dev.linode.com) then it would be a different story imo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd agree with this.