-
Notifications
You must be signed in to change notification settings - Fork 3
add getting started and billing docs #94
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
Open
halfcyan
wants to merge
12
commits into
main
Choose a base branch
from
cypress/add-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0d940e5
update account and billing docs
halfcyan 7404700
simplify +layout.svelte for each docs category
halfcyan 592baeb
add about page and work on getting started page
halfcyan 6ad65cd
more work on getting started
halfcyan d829dfc
finish up getting started
halfcyan 8c023ce
update about page
halfcyan fc9befd
update about page again
halfcyan c48da51
Update +page.svx
halfcyan 51e990d
fix mobile nav regression
halfcyan a8218bc
fix a couple of issues
halfcyan 7cc8d90
mark how we bill as soon
halfcyan b99d5e8
fix formatting
halfcyan 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 hidden or 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,98 @@ | ||
| <script lang="ts"> | ||
| import { resolve } from '$app/paths'; | ||
| import { page } from '$app/stores'; | ||
| import { Icon } from '@steeze-ui/svelte-icon'; | ||
| import { ArrowLeft } from '@steeze-ui/carbon-icons'; | ||
| import DocsMobileCategoryMenu from '$lib/components/DocsMobileCategoryMenu.svelte'; | ||
|
|
||
| type Category = 'account-billing' | 'colocation' | 'vps'; | ||
| type NavItem = { | ||
| label: string; | ||
| href: string; | ||
| }; | ||
|
|
||
| const categoryLabels: Record<Category, string> = { | ||
| 'account-billing': 'Account & Billing', | ||
| colocation: 'Colocation', | ||
| vps: 'VPS' | ||
| }; | ||
|
|
||
| const pages = import.meta.glob('/src/routes/docs/*/*/+page.svx', { | ||
| eager: true, | ||
| query: '?raw', | ||
| import: 'default' | ||
| }) as Record<string, string>; | ||
|
|
||
| function titleFromSource(source: string, slug: string): string { | ||
| const title = source.match(/<DocsMeta[\s\S]*?title=["']([^"']+)["']/)?.[1]; | ||
| if (title) return title; | ||
|
|
||
| return slug | ||
| .split('-') | ||
| .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) | ||
| .join(' '); | ||
| } | ||
|
|
||
| function discoverCategory(category: Category, order: readonly string[]): NavItem[] { | ||
| const discovered = Object.entries(pages) | ||
| .filter(([path]) => path.includes(`/docs/${category}/`)) | ||
| .map(([path, source]) => { | ||
| const slug = path.split('/').at(-2); | ||
| return slug | ||
| ? { | ||
| label: titleFromSource(source, slug), | ||
| href: `/docs/${category}/${slug}` | ||
| } | ||
| : null; | ||
| }) | ||
| .filter((item): item is NavItem => item !== null); | ||
|
|
||
| const bySlug = new Map(discovered.map((item) => [item.href.split('/').at(-1), item])); | ||
| const ordered = order | ||
| .map((slug) => bySlug.get(slug)) | ||
| .filter((item): item is NavItem => item !== undefined); | ||
| const explicitlyOrdered = new Set(order); | ||
|
|
||
| return ordered.concat( | ||
| discovered | ||
| .filter((item) => !explicitlyOrdered.has(item.href.split('/').at(-1) ?? '')) | ||
| .sort((a, b) => a.label.localeCompare(b.label)) | ||
| ); | ||
| } | ||
|
|
||
| let { category, order }: { category: Category; order: readonly string[] } = $props(); | ||
| const label = $derived(categoryLabels[category]); | ||
| const nav = $derived(discoverCategory(category, order)); | ||
| </script> | ||
|
|
||
| <aside class="hidden w-56 shrink-0 lg:block"> | ||
| <div class="sticky {category === 'account-billing' ? 'top-0' : 'top-22'} px-6 py-8"> | ||
| <p class="mb-3 text-[10px] font-medium tracking-widest text-fyra-gray-300 uppercase">{label}</p> | ||
| <nav class="flex flex-col gap-0.5" aria-label={`${label} documentation`}> | ||
| {#each nav as item (item.href)} | ||
| <a | ||
| href={resolve(item.href)} | ||
| class="rounded-sm px-2 py-1.5 text-sm transition-colors {$page.url.pathname === item.href | ||
| ? 'bg-fyra-gray-800 font-medium text-fyra-gray-50' | ||
| : 'text-fyra-gray-300 hover:text-fyra-gray-100'}" | ||
| > | ||
| {item.label} | ||
| </a> | ||
| {/each} | ||
| </nav> | ||
|
|
||
| <div class="mt-8 border-t border-fyra-gray-800 pt-6"> | ||
| <a | ||
| href={resolve('/docs')} | ||
| class="flex items-center gap-1.5 text-xs text-fyra-gray-300 transition-colors hover:text-fyra-gray-100" | ||
| > | ||
| <Icon src={ArrowLeft} class="h-3 w-3" aria-hidden="true" /> | ||
| All docs | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </aside> | ||
|
|
||
| <div class="lg:hidden"> | ||
| <DocsMobileCategoryMenu category={label} {nav} /> | ||
| </div> |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,28 @@ | ||
| <script lang="ts"> | ||
| import DocsMeta from '$lib/components/DocsMeta.svelte'; | ||
| </script> | ||
|
|
||
| <DocsMeta title="How We Bill" description="Learn about our billing process." /> | ||
|
|
||
| # How We Bill | ||
|
|
||
| For billing, we use a hybrid hourly/monthly system. Think of it like fare capping for transit systems. Each VPS tier has an hourly and monthly rate. For each VPS, you are charged for the hourly rate until you reach the monthly rate. At that point, you will be capped at the monthly rate. | ||
|
|
||
| --- | ||
| ## Why we use this system | ||
|
|
||
| Provisioning a VPS has a cost associated with it. We use a hybrid system to account for that cost while maintaining a low rate for people who set up one VPS and stick with it. If someone is going to spin up a new VPS for a short period of time, especially once we have an API available, our costs are higher, so we wanted a model that charges fairly for both short- and long-term VPS usage. | ||
|
|
||
| --- | ||
| ## Hourly and Monthly Rates for Each Tier | ||
|
|
||
| |Tier |vCPU |Memory |Hourly Rate |Monthly Rate | ||
| |--- |--- |--- |--- |--- | ||
| |BASE-2G |2 |2G |$0.01/hr |$5.00/mo | ||
| |BASE-4G |2 |4G |$0.03/hr |$12.00/mo | ||
| |BASE-6G |3 |6G |$0.04/hr |$18.00/mo | ||
| |BASE-8G |4 |8G |$0.05/hr |$24.00/mo | ||
| |BASE-10G |5 |10G |$0.06/hr |$30.00/mo | ||
| |BASE-12G |6 |12G |$0.07/hr |$36.00/mo | ||
| |BASE-14G |7 |14G |$0.08/hr |$42.00/mo | ||
| |BASE-16G |8 |16G |$0.10/hr |$48.00/mo |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
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.
due to a misconfiguration this is actually kinda broken and slightly wrong, might want to hold this page until fixed.