forked from microsoft/fluentui-charting-contrib
-
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.
Merge branch 'microsoft:main' into main
- Loading branch information
Showing
83 changed files
with
10,718 additions
and
63,276 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,48 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Review gh actions docs if you want to further define triggers, paths, etc | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
|
||
# defaults: | ||
# run: | ||
# shell: bash | ||
# working-directory: ./apps/docsite | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: cd apps/docsite && yarn install --frozen-lockfile | ||
- name: Build website | ||
run: cd apps/docsite && yarn build | ||
|
||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./apps/docsite/build | ||
# The following lines assign commit authorship to the official | ||
# GH-Actions bot for deploys to `gh-pages` branch: | ||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
# The GH actions bot is used by default if you didn't specify the two fields. | ||
# You can swap them out with your own user credentials. | ||
user_name: github-actions[bot] | ||
user_email: 41898282+github-actions[bot]@users.noreply.github.com |
This file was deleted.
Oops, something went wrong.
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,25 @@ | ||
name: Test deployment | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
# Review gh actions docs if you want to further define triggers, paths, etc | ||
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | ||
|
||
|
||
jobs: | ||
test-deploy: | ||
name: Test deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
|
||
- name: Install dependencies | ||
run: cd apps/docsite && yarn install --frozen-lockfile | ||
- name: Test build website | ||
run: cd apps/docsite && yarn build |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
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,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
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,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
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,135 @@ | ||
import { themes as prismThemes } from "prism-react-renderer"; | ||
import type { Config } from "@docusaurus/types"; | ||
import type * as Preset from "@docusaurus/preset-classic"; | ||
import remarkMath from 'remark-math'; | ||
import rehypeKatex from 'rehype-katex'; | ||
|
||
const config: Config = { | ||
title: "FluentUI Charting Contrib Docsite", | ||
tagline: "MD docs related to FluentUI Charting library", | ||
favicon: "img/favicon.ico", | ||
|
||
// Set the production url of your site here | ||
url: "https://microsoft.github.io", | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: "/fluentui-charting-contrib/", | ||
|
||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: "microsoft", // Usually your GitHub org/user name. | ||
projectName: "fluentui-charting-contrib", // Usually your repo name. | ||
deploymentBranch: "gh-pages", | ||
trailingSlash: false, | ||
staticDirectories: ['../../docs/assets', 'static'], | ||
|
||
onBrokenLinks: "warn", | ||
onBrokenMarkdownLinks: "warn", | ||
|
||
// Even if you don't use internationalization, you can use this field to set | ||
// useful metadata like html lang. For example, if your site is Chinese, you | ||
// may want to replace "en" with "zh-Hans". | ||
i18n: { | ||
defaultLocale: "en", | ||
locales: ["en"], | ||
}, | ||
|
||
presets: [ | ||
[ | ||
"classic", | ||
{ | ||
docs: { | ||
path: '../../docs', | ||
sidebarPath: "./sidebars.ts", | ||
// Please change this to your repo. | ||
// Remove this to remove the "edit this page" links. | ||
// editUrl: | ||
// "https://github.com/microsoft/fluentui-charting-contrib/tree/main/packages/create-docusaurus/templates/shared/", | ||
remarkPlugins: [remarkMath], | ||
rehypePlugins: [rehypeKatex], | ||
}, | ||
theme: { | ||
customCss: "./src/css/custom.css", | ||
}, | ||
} satisfies Preset.Options, | ||
], | ||
], | ||
|
||
stylesheets: [ | ||
{ | ||
href: 'https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css', | ||
type: 'text/css', | ||
integrity: | ||
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM', | ||
crossorigin: 'anonymous', | ||
}, | ||
], | ||
|
||
themeConfig: { | ||
// Replace with your project's social card | ||
image: "img/docusaurus-social-card.jpg", | ||
navbar: { | ||
title: "FluentUI Charting", | ||
logo: { | ||
alt: "FluentUI Charting Logo", | ||
src: "img/logo.svg", | ||
}, | ||
items: [ | ||
{ | ||
type: "docSidebar", | ||
sidebarId: "tutorialSidebar", | ||
position: "left", | ||
label: "Docs", | ||
}, | ||
{ | ||
href: "https://github.com/microsoft/fluentui-charting-contrib", | ||
label: "GitHub", | ||
position: "right", | ||
}, | ||
], | ||
}, | ||
footer: { | ||
style: "dark", | ||
links: [ | ||
{ | ||
title: "Docs", | ||
items: [ | ||
{ | ||
label: "Docs", | ||
to: "/docs/Fluent-React-Charting", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "FluentUI", | ||
items: [ | ||
{ | ||
label: "Public Developer Docsite", | ||
href: "https://aka.ms/fluentcharting", | ||
}, | ||
{ | ||
label: "Github", | ||
href: "https://github.com/microsoft/fluentui", | ||
}, | ||
], | ||
}, | ||
{ | ||
title: "FluentUI Charting Contrib", | ||
items: [ | ||
{ | ||
label: "GitHub", | ||
href: "https://github.com/microsoft/fluentui-charting-contrib", | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: `Copyright © ${new Date().getFullYear()} FluentUI React Charting. Built with Docusaurus.`, | ||
}, | ||
prism: { | ||
theme: prismThemes.github, | ||
darkTheme: prismThemes.dracula, | ||
}, | ||
} satisfies Preset.ThemeConfig, | ||
}; | ||
|
||
export default config; |
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,49 @@ | ||
{ | ||
"name": "docsite", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start", | ||
"build": "docusaurus build", | ||
"swizzle": "docusaurus swizzle", | ||
"deploy": "docusaurus deploy", | ||
"clear": "docusaurus clear", | ||
"serve": "docusaurus serve", | ||
"write-translations": "docusaurus write-translations", | ||
"write-heading-ids": "docusaurus write-heading-ids", | ||
"typecheck": "tsc" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "3.1.0", | ||
"@docusaurus/preset-classic": "3.1.0", | ||
"@mdx-js/react": "^3.0.0", | ||
"clsx": "^2.0.0", | ||
"prism-react-renderer": "^2.3.0", | ||
"react": "^18.0.0", | ||
"react-dom": "^18.0.0", | ||
"rehype-katex": "7", | ||
"remark-math": "6" | ||
}, | ||
"devDependencies": { | ||
"@docusaurus/module-type-aliases": "3.1.0", | ||
"@docusaurus/tsconfig": "3.1.0", | ||
"@docusaurus/types": "3.1.0", | ||
"typescript": "~5.2.2" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 3 chrome version", | ||
"last 3 firefox version", | ||
"last 5 safari version" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">=18.0" | ||
} | ||
} |
Oops, something went wrong.