Skip to content

Commit cbbedef

Browse files
committed
✨ feat: Add developer portal
1 parent e75b1fc commit cbbedef

40 files changed

+3745
-0
lines changed

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
deploy-docs:
14+
name: Deploy Docs
15+
runs-on: [self-hosted, Linux]
16+
env:
17+
NODE_OPTIONS: --max_old_space_size=8192
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20
28+
29+
- name: Build Docs
30+
run: |
31+
cd docs
32+
npm ci
33+
npm run build
34+
35+
- name: Update Docs Branch
36+
uses: JamesIves/github-pages-deploy-action@v4
37+
with:
38+
branch: gh-pages
39+
folder: docs/.vitepress/dist

docs/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fund=false

docs/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

docs/.vitepress/config.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { defineConfig } from 'vitepress';
2+
import { markdown } from './config/markdown';
3+
import { head } from './config/en/head';
4+
import { nav } from './config/en/nav';
5+
import { sidebar } from './config/en/sidebar';
6+
7+
export default defineConfig({
8+
title: 'Developer Portal',
9+
titleTemplate: 'Localazy Developer Portal',
10+
description: 'Localazy portal for developers. Learn how to integrate Localazy into your projects.',
11+
12+
lang: 'en-US',
13+
base: '/',
14+
head: head(),
15+
lastUpdated: true,
16+
markdown: markdown(),
17+
18+
sitemap: {
19+
hostname: 'https://developer.localazy.com/',
20+
},
21+
22+
themeConfig: {
23+
logo: {
24+
src: '/theme/localazy-logo.svg',
25+
width: 24,
26+
height: 24,
27+
},
28+
nav: nav(),
29+
sidebar: sidebar(),
30+
externalLinkIcon: true,
31+
},
32+
});

docs/.vitepress/config/en/head.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { HeadConfig } from 'vitepress';
2+
3+
export const head = (): HeadConfig[] => [
4+
// Favicon
5+
['link', { rel: 'icon', href: '/favicon.ico', sizes: '32x32' }],
6+
['link', { rel: 'icon', href: '/theme/localazy-logo.svg', type: 'image/svg+xml' }],
7+
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/theme/apple-touch-icon.png' }],
8+
9+
// Fonts
10+
[
11+
'link',
12+
{
13+
rel: 'stylesheet',
14+
href: 'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap',
15+
},
16+
],
17+
18+
// Open Graph protocol
19+
['meta', { name: 'theme-color', content: '#066fef' }],
20+
['meta', { property: 'og:type', content: 'website' }],
21+
['meta', { property: 'og:locale', content: 'en' }],
22+
['meta', { property: 'og:url', content: 'https://developer.localazy.com/' }],
23+
['meta', { property: 'og:title', content: 'Developer Portal | Localazy' }],
24+
['meta', { property: 'og:site_name', content: 'Localazy Developer Portal' }],
25+
// ['meta', { property: 'og:description', content: '' }],
26+
// ['meta', { property: 'og:image', content: '' }],
27+
28+
// Twitter card
29+
['meta', { property: 'twitter:card', content: 'summary_large_image' }],
30+
['meta', { property: 'twitter:url', content: 'https://developer.localazy.com/' }],
31+
['meta', { property: 'twitter:title', content: 'Developer Portal | Localazy' }],
32+
// ['meta', { property: 'twitter:description', content: '' }],
33+
// ['meta', { property: 'twitter:image', content: '' }],
34+
];

docs/.vitepress/config/en/nav.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { DefaultTheme } from 'vitepress/theme';
2+
3+
export const nav = (): DefaultTheme.NavItem[] => [
4+
{
5+
text: 'Localazy',
6+
link: 'https://localazy.com/',
7+
},
8+
{
9+
text: 'Documentation',
10+
link: 'https://localazy.com/docs',
11+
},
12+
];

docs/.vitepress/config/en/sidebar.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import type { DefaultTheme } from 'vitepress/theme';
2+
3+
export const sidebar = (): DefaultTheme.Sidebar => [
4+
];

docs/.vitepress/config/markdown.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { MarkdownOptions } from 'vitepress';
2+
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs';
3+
import { npmCommandsMarkdownPlugin } from 'vitepress-plugin-npm-commands';
4+
import { renderSandbox } from 'vitepress-plugin-sandpack';
5+
import container from 'markdown-it-container';
6+
7+
export const markdown = (): MarkdownOptions => ({
8+
lineNumbers: true,
9+
config(md): void {
10+
md.use(tabsMarkdownPlugin);
11+
md.use(npmCommandsMarkdownPlugin);
12+
md.use(container, 'loc-sandbox', {
13+
render(tokens, idx) {
14+
return renderSandbox(tokens, idx, 'loc-sandbox');
15+
},
16+
});
17+
},
18+
// https://shiki.style
19+
theme: {
20+
light: 'github-light',
21+
dark: 'github-dark',
22+
},
23+
});

0 commit comments

Comments
 (0)