Skip to content

Commit

Permalink
delete history
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 22, 2023
0 parents commit aebce07
Show file tree
Hide file tree
Showing 689 changed files with 209,656 additions and 0 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/Deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Sample workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress Site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches: [gh-pages]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0 # Not needed if lastUpdated is not enabled
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm ci # or pnpm install / yarn install
- name: Build with VitePress
run: NODE_OPTIONS=--max-old-space-size=32768 npm run docs:build # or pnpm docs:build / yarn docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
.vitepress/cache
.vitepress/dist
build
173 changes: 173 additions & 0 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
import { defineConfig } from "vitepress";
import { generateSidebar } from "vitepress-sidebar";
import mathjax3 from "markdown-it-mathjax3";
import markdownitsup from "markdown-it-sup";
import markdownitabbr from "markdown-it-abbr";
import markdownittasklists from "markdown-it-task-lists";
import { readdirSync } from "fs";

const customElements = ["mjx-container"];

const sideBarGeneratorList = [];

const VITEPRESS_DOC_VERSIONS = readdirSync(".", { withFileTypes: true })
.filter((x) => x.isDirectory())
.map((x) => x.name)
.filter((x) => x.startsWith("v"))
.filter((x) => !["v0.5.0", "v0.5.1", "v0.4.58", "v0.3.0"].includes(x));
VITEPRESS_DOC_VERSIONS.push("dev");

for (let i = 0; i < VITEPRESS_DOC_VERSIONS.length; i++) {
var version = VITEPRESS_DOC_VERSIONS[i];
sideBarGeneratorList.push({
documentRootPath: "/",
scanStartPath: "/" + version + "/tutorials/",
useTitleFromFileHeading: true,
capitalizeFirst: true,
rootGroupText: "Tutorials",
manualSortFileNameByPriority: ["beginner", "intermediate", "advanced"],
resolvePath: "/" + version + "/tutorials/",
includeFolderIndexFile: true,
rootGroupLink: "/" + version + "/tutorials/",
});
sideBarGeneratorList.push({
documentRootPath: "/",
scanStartPath: "/" + version + "/introduction/",
useTitleFromFileHeading: true,
rootGroupText: "Getting Started",
resolvePath: "/" + version + "/introduction/",
manualSortFileNameByPriority: [
"installation.md",
"quickstart.md",
"overview.md",
"resources.md",
"citation.md",
],
rootGroupLink: "/" + version + "/introduction/",
includeFolderIndexFile: true,
});
sideBarGeneratorList.push({
documentRootPath: "/",
scanStartPath: "/" + version + "/manual/",
rootGroupText: "Manual",
useTitleFromFileHeading: true,
resolvePath: "/" + version + "/manual/",
includeFolderIndexFile: true,
manualSortFileNameByPriority: ["interface.md"],
});
sideBarGeneratorList.push({
documentRootPath: "/",
scanStartPath: "/" + version + "/api/",
rootGroupText: "API Reference",
useTitleFromFileHeading: true,
resolvePath: "/" + version + "/api/",
includeFolderIndexFile: true,
rootGroupLink: "/" + version + "/api/",
manualSortFileNameByPriority: [
"Lux",
"Building Blocks",
"Domain Specific Modeling",
"Accelerator Support",
"Testing Functionality",
"layers.md",
"utilities.md",
"flux_to_lux.md",
"contrib.md",
],
hyphenToSpace: true,
underscoreToSpace: true,
});
}

const sideBar = generateSidebar(sideBarGeneratorList);

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "LuxDL Docs",
description: "Elegant Deep Learning in Julia",

lastUpdated: true,
cleanUrls: true,

ignoreDeadLinks: true,

themeConfig: {
externalLinkIcon: true,

logo: {
light: "/lux-logo.svg",
dark: "/lux-logo-dark.svg",
},

nav: [
{ text: "Home", link: "/" },
{ text: "Getting Started", link: "/dev/introduction/" },
{ text: "Ecosystem", link: "/dev/ecosystem" },
{ text: "Tutorials", link: "/dev/tutorials/" },
{ text: "Manual", link: "/dev/manual/interface" },
{
text: "API",
items: [
{ text: "Latest", link: "/dev/api/" },
{ text: "Stable", link: "/stable/api/" },
{ text: "v0.5", link: "/v0.5/api/" },
],
},
],

sidebar: sideBar,

socialLinks: [
{ icon: "github", link: "https://github.com/LuxDL/" },
{ icon: "twitter", link: "https://twitter.com/avikpal1410" },
],

search: {
provider: "local",
},

footer: {
message:
"Released under the MIT License. Powered by the <a href='https://www.julialang.org'>Julia Programming Language</a>.",
copyright: "Copyright © 2022-Present Avik Pal",
},
},

head: [
[
"script",
{ async: "", src: "https://www.googletagmanager.com/gtag/js?id=G-Q8GYTEVTZ2" },
],
[
"script",
{},
`window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-Q8GYTEVTZ2');`,
],
],

markdown: {
theme: {
light: "github-light",
dark: "github-dark",
},

config: (md) => {
// TODO: https://github.com/luckrya/markdown-it-link-to-card
md.use(markdownitsup);
md.use(markdownitabbr);
md.use(markdownittasklists);
md.use(mathjax3);
},
},

vue: {
template: {
compilerOptions: {
isCustomElement: (tag) => customElements.includes(tag),
},
},
},
});
77 changes: 77 additions & 0 deletions .vitepress/theme/components/Card.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!-- <template>
<div class="tutorial-demo-card">
<div class="tutorial-demo-card-header">
<h2>{{ title }}</h2>
</div>
<div class="tutorial-demo-card-content">
<p>{{ description }}</p>
<div class="tutorial-demo-card-actions">
<a :href="demoLink" target="_blank" class="demo-link">View Demo</a>
<a :href="tutorialLink" target="_blank" class="tutorial-link">Tutorial</a>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
title: String,
description: String,
demoLink: String,
tutorialLink: String,
},
};
</script>
<style scoped>
.tutorial-demo-card {
border: 1px solid #ccc;
border-radius: 4px;
padding: 16px;
margin: 16px 0;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}
.tutorial-demo-card-header {
font-size: 1.5rem;
margin-bottom: 8px;
}
.tutorial-demo-card-content {
font-size: 1rem;
margin-bottom: 8px;
}
.tutorial-demo-card-actions {
display: flex;
justify-content: space-between;
}
.demo-link,
.tutorial-link {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
text-decoration: none;
color: #333;
transition: background-color 0.3s, color 0.3s;
}
.demo-link:hover,
.tutorial-link:hover {
background-color: #f0f0f0;
color: #000;
}
</style>
-->

<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>

<template>
<button @click="count++">You clicked me {{ count }} times.</button>
</template>
17 changes: 17 additions & 0 deletions .vitepress/theme/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import Theme from 'vitepress/theme'
import './style.css'


export default {
extends: Theme,
Layout: () => {
return h(Theme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
})
},
enhanceApp({ app, router, siteData }) {
//
}
}
Loading

0 comments on commit aebce07

Please sign in to comment.