-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e75b1fc
commit cbbedef
Showing
40 changed files
with
3,745 additions
and
0 deletions.
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,39 @@ | ||
name: Release CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
deploy-docs: | ||
name: Deploy Docs | ||
runs-on: [self-hosted, Linux] | ||
env: | ||
NODE_OPTIONS: --max_old_space_size=8192 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Build Docs | ||
run: | | ||
cd docs | ||
npm ci | ||
npm run build | ||
- name: Update Docs Branch | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: docs/.vitepress/dist |
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 @@ | ||
fund=false |
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 @@ | ||
20 |
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,32 @@ | ||
import { defineConfig } from 'vitepress'; | ||
import { markdown } from './config/markdown'; | ||
import { head } from './config/en/head'; | ||
import { nav } from './config/en/nav'; | ||
import { sidebar } from './config/en/sidebar'; | ||
|
||
export default defineConfig({ | ||
title: 'Developer Portal', | ||
titleTemplate: 'Localazy Developer Portal', | ||
description: 'Localazy portal for developers. Learn how to integrate Localazy into your projects.', | ||
|
||
lang: 'en-US', | ||
base: '/', | ||
head: head(), | ||
lastUpdated: true, | ||
markdown: markdown(), | ||
|
||
sitemap: { | ||
hostname: 'https://developer.localazy.com/', | ||
}, | ||
|
||
themeConfig: { | ||
logo: { | ||
src: '/theme/localazy-logo.svg', | ||
width: 24, | ||
height: 24, | ||
}, | ||
nav: nav(), | ||
sidebar: sidebar(), | ||
externalLinkIcon: true, | ||
}, | ||
}); |
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,34 @@ | ||
import { HeadConfig } from 'vitepress'; | ||
|
||
export const head = (): HeadConfig[] => [ | ||
// Favicon | ||
['link', { rel: 'icon', href: '/favicon.ico', sizes: '32x32' }], | ||
['link', { rel: 'icon', href: '/theme/localazy-logo.svg', type: 'image/svg+xml' }], | ||
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/theme/apple-touch-icon.png' }], | ||
|
||
// Fonts | ||
[ | ||
'link', | ||
{ | ||
rel: 'stylesheet', | ||
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', | ||
}, | ||
], | ||
|
||
// Open Graph protocol | ||
['meta', { name: 'theme-color', content: '#066fef' }], | ||
['meta', { property: 'og:type', content: 'website' }], | ||
['meta', { property: 'og:locale', content: 'en' }], | ||
['meta', { property: 'og:url', content: 'https://developer.localazy.com/' }], | ||
['meta', { property: 'og:title', content: 'Developer Portal | Localazy' }], | ||
['meta', { property: 'og:site_name', content: 'Localazy Developer Portal' }], | ||
// ['meta', { property: 'og:description', content: '' }], | ||
// ['meta', { property: 'og:image', content: '' }], | ||
|
||
// Twitter card | ||
['meta', { property: 'twitter:card', content: 'summary_large_image' }], | ||
['meta', { property: 'twitter:url', content: 'https://developer.localazy.com/' }], | ||
['meta', { property: 'twitter:title', content: 'Developer Portal | Localazy' }], | ||
// ['meta', { property: 'twitter:description', content: '' }], | ||
// ['meta', { property: 'twitter:image', content: '' }], | ||
]; |
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,12 @@ | ||
import { DefaultTheme } from 'vitepress/theme'; | ||
|
||
export const nav = (): DefaultTheme.NavItem[] => [ | ||
{ | ||
text: 'Localazy', | ||
link: 'https://localazy.com/', | ||
}, | ||
{ | ||
text: 'Documentation', | ||
link: 'https://localazy.com/docs', | ||
}, | ||
]; |
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,4 @@ | ||
import type { DefaultTheme } from 'vitepress/theme'; | ||
|
||
export const sidebar = (): DefaultTheme.Sidebar => [ | ||
]; |
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,23 @@ | ||
import { MarkdownOptions } from 'vitepress'; | ||
import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'; | ||
import { npmCommandsMarkdownPlugin } from 'vitepress-plugin-npm-commands'; | ||
import { renderSandbox } from 'vitepress-plugin-sandpack'; | ||
import container from 'markdown-it-container'; | ||
|
||
export const markdown = (): MarkdownOptions => ({ | ||
lineNumbers: true, | ||
config(md): void { | ||
md.use(tabsMarkdownPlugin); | ||
md.use(npmCommandsMarkdownPlugin); | ||
md.use(container, 'loc-sandbox', { | ||
render(tokens, idx) { | ||
return renderSandbox(tokens, idx, 'loc-sandbox'); | ||
}, | ||
}); | ||
}, | ||
// https://shiki.style | ||
theme: { | ||
light: 'github-light', | ||
dark: 'github-dark', | ||
}, | ||
}); |
Oops, something went wrong.