Skip to content

Commit

Permalink
deploy?
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarusA committed Dec 26, 2023
1 parent df3f691 commit f2b0f25
Show file tree
Hide file tree
Showing 8 changed files with 147 additions and 134 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/Documenter.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/deployDocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# 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: [master]

# 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
# - uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
- name: Julia version
uses: julia-actions/setup-julia@v1
- name: Julia cache
uses: julia-actions/cache@v1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm # or pnpm / yarn
cache-dependency-path: 'package.json' # this should be a package-lock.json file
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: npm add -D vitepress # or pnpm install / yarn install / bun install
- name: Install documentation dependencies
run: julia --project=docs -e 'using Pkg; pkg"dev ."; Pkg.instantiate()'
- name: Creating docs/docs folder
run: julia --project=docs/ --color=yes docs/make.jl
- name: Build and deploy with VitePress
run: |
npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
touch docs/docs/.vitepress/dist/.nojekyll
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: docs/docs/.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
7 changes: 0 additions & 7 deletions docs/package.json

This file was deleted.

8 changes: 4 additions & 4 deletions docs/src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'

// https://vitepress.dev/reference/site-config
export default defineConfig({
base: '/DocumenterVitepress/',
// base: '/DocumenterVitepress/',
title: "DocumenterVitepress",
description: "A VitePress Site",
lastUpdated: true,
Expand Down Expand Up @@ -41,11 +41,11 @@ export default defineConfig({
],

socialLinks: [
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
{ icon: 'github', link: 'https://github.com/LuxDL/DocumenterVitepress.jl' }
],
footer: {
message: 'Made with <a href="https://documenter.juliadocs.org/stable/" target="_blank"><strong>Documenter.jl</strong></a> & <a href="https://vitepress.dev" target="_blank"><strong>VitePress</strong></a> <br> Released under the MIT License. Powered by the <a href="https://julialang.org" target="_blank">Julia Programming Language.</a>',
copyright: 'Copyright © 2023-present <strong>LuxDL</strong>'
message: 'Made with <a href="https://documenter.juliadocs.org/stable/" target="_blank"><strong>Documenter.jl</strong></a> & <a href="https://vitepress.dev" target="_blank"><strong>VitePress</strong></a> <br>',
copyright: Copyright ${new Date().getUTCFullYear()}. Released under the MIT License.`
}
}
})
55 changes: 43 additions & 12 deletions docs/src/.vitepress/theme/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
*/

/**
/**
* Layouts
* -------------------------------------------------------------------------- */
/*
:root {
--vp-layout-max-width: 1440px;
} */

.VPHero .clip {
white-space: pre;
max-width: 500px;
}

* Fonts
* --------------------------------------------------------------------------
*/
Expand All @@ -32,12 +46,12 @@
--julia-green: #389826;

--vp-c-brand: #389826;
--vp-c-brand-light: #a0a0ab;
--vp-c-brand-light: #e3e3f3;
--vp-c-brand-lighter: #9499ff;
--vp-c-brand-lightest: #bcc0ff;
--vp-c-brand-dark: #535bf2;
--vp-c-brand-darker: #454ce1;
--vp-c-brand-dimm: rgba(100, 108, 255, 0.08);
--vp-c-brand-dimm: #212425;
}

/**
Expand All @@ -56,6 +70,7 @@
--vp-button-brand-active-bg: var(--vp-button-brand-bg);
}


/**
* Component: Home
* -------------------------------------------------------------------------- */
Expand All @@ -70,8 +85,9 @@

--vp-home-hero-image-background-image: linear-gradient(
-45deg,
#9558B2 50%,
#CB3C33 50%
#9558B2 30%,
#389826 30%,
#CB3C33
);
--vp-home-hero-image-filter: blur(40px);
}
Expand All @@ -92,16 +108,32 @@
* Component: Custom Block
* -------------------------------------------------------------------------- */

:root {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-darker);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
}

.dark {
:root.dark {
--vp-custom-block-tip-border: var(--vp-c-brand);
--vp-custom-block-tip-text: var(--vp-c-brand-lightest);
--vp-custom-block-tip-bg: var(--vp-c-brand-dimm);

/* // Tweak the color palette for blacks and dark grays */
--vp-c-black: hsl(220 20% 9%);
--vp-c-black-pure: hsl(220, 24%, 4%);
--vp-c-black-soft: hsl(220 16% 13%);
--vp-c-black-mute: hsl(220 14% 17%);
--vp-c-gray: hsl(220 8% 56%);
--vp-c-gray-dark-1: hsl(220 10% 39%);
--vp-c-gray-dark-2: hsl(220 12% 28%);
--vp-c-gray-dark-3: hsl(220 12% 23%);
--vp-c-gray-dark-4: hsl(220 14% 17%);
--vp-c-gray-dark-5: hsl(220 16% 13%);

/* // Backgrounds */
/* --vp-c-bg: hsl(240, 2%, 11%); */
--vp-custom-block-info-bg: hsl(220 14% 17%);
/* --vp-c-gutter: hsl(220 20% 9%);
--vp-c-bg-alt: hsl(220 20% 9%);
--vp-c-bg-soft: hsl(220 14% 17%);
--vp-c-bg-mute: hsl(220 12% 23%);
*/
}

/**
Expand All @@ -112,7 +144,6 @@
--docsearch-primary-color: var(--vp-c-brand) !important;
}


/**
* Component: MathJax
* -------------------------------------------------------------------------- */
Expand Down
52 changes: 9 additions & 43 deletions docs/src/api-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,14 @@ outline: deep
---
```

# Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## Public API
```@meta
DocTestSetup= quote
using DocumenterVitepress
end
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
```@autodocs
Modules = [DocumenterVitepress]
Private = false
```
18 changes: 9 additions & 9 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
layout: home
hero:
name: "DocumenterVitePress"
text: "A Documenter.jl + VitePress Site"
tagline: My great project tagline
name: "DocumenterVitepress"
text: "Document your code"
tagline: A Markdown backend designed to work with VitePress
image:
src: /logo_dark.png
alt: DocumenterVitepress
Expand All @@ -22,12 +22,12 @@ hero:
link: /api-examples
features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Markdown
details: Write in standar markdown syntax
- title: Scripts
details: Parse scripts into markdown via Literate.jl
- title: VUE components
details: Explore the possibilities with VUE components
---
```

7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"scripts": {
"docs:dev": "vitepress dev docs/docs",
"docs:build": "vitepress build docs/docs",
"docs:preview": "vitepress preview docs/docs"
}
}

0 comments on commit f2b0f25

Please sign in to comment.