Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/website"
schedule:
interval: "weekly"
groups:
docusaurus:
patterns:
- "@docusaurus/*"
react:
patterns:
- "react*"
- package-ecosystem: "github-actions"
# Don't need to specify `/.github/workflows` for `directory`. Github knows it.
directory: "/"
schedule:
interval: "weekly"
41 changes: 41 additions & 0 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Doc Website to GitHub Pages

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write

defaults:
run:
shell: bash
working-directory: ./website

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
cache: "npm"
cache-dependency-path: website/package-lock.json
- run: npm ci

- name: Build website
run: npm run 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@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./website/build
20 changes: 20 additions & 0 deletions website/.gitignore
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*
41 changes: 41 additions & 0 deletions website/README.md
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.
3 changes: 3 additions & 0 deletions website/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
};
1 change: 1 addition & 0 deletions website/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hello World
114 changes: 114 additions & 0 deletions website/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
import type * as Preset from "@docusaurus/preset-classic";
import type { Config } from "@docusaurus/types";

import { themes as prismThemes } from "prism-react-renderer";

const config: Config = {
title: "sas-code-examples Documentation",
favicon: "images/sas.png",

// Set the production url of your site here
url: "https://sassoftware.github.io",
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/sas-code-examples/'
baseUrl: "/sas-code-examples/",

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "sassoftware", // Usually your GitHub org/user name.
projectName: "sas-code-examples", // Usually your repo name.

onBrokenLinks: "throw",
onBrokenMarkdownLinks: "throw",

// 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: {
routeBasePath: "/",
// Remove this to remove the "edit this page" links.
editUrl:
"https://github.com/sassoftware/sas-code-examples/tree/main/website/",
},
blog: false,
theme: {
customCss: ["./src/css/custom.css"],
},
} satisfies Preset.Options,
],
],

themeConfig: {
docs: {
sidebar: {
hideable: true,
},
},
navbar: {
title: "sas-code-examples Documentation",
logo: {
alt: "SAS",
src: "images/sas.png",
},
items: [
{
href: "https://github.com/sassoftware/sas-code-examples",
className: "header-github-link",
title: "GitHub repository",
position: "right",
},
],
},
footer: {
style: "dark",
links: [
{
title: "Support",
items: [
{
label: "GitHub Repository",
href: "https://github.com/sassoftware/sas-code-examples",
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()}, SAS Institute Inc., Cary, NC, USA. All Rights Reserved. Built with Docusaurus.`,
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
// uncomment below to add language support
// additionalLanguages: ["bash", "json"],
},
} satisfies Preset.ThemeConfig,

// uncomment below for mermaid support
// markdown: {
// mermaid: true,
// },

themes: [
[
"@easyops-cn/docusaurus-search-local",
{
docsRouteBasePath: "/",
explicitSearchResultPath: true,
hashed: true,
highlightSearchTermsOnTargetPage: true,
},
],
// uncomment below for mermaid support
// "@docusaurus/theme-mermaid",
],
};

export default config;
Loading