-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from GDWR/main
Update to use Astro + Tailwind & DaisyUI for site
- Loading branch information
Showing
149 changed files
with
6,069 additions
and
12,290 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: Deploy to GitHub Pages | ||
|
||
on: | ||
# Trigger the workflow every time you push to the `main` branch | ||
# Using a different branch name? Replace `main` with your branch’s name | ||
push: | ||
branches: [ main ] | ||
# Allows you to run this workflow manually from the Actions tab on GitHub. | ||
workflow_dispatch: | ||
|
||
# Allow this job to clone the repo and create a page deployment | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout your repository using git | ||
uses: actions/checkout@v3 | ||
- name: Install, build, and upload your site | ||
uses: withastro/action@v1 | ||
# with: | ||
# path: . # The root location of your Astro project inside the repository. (optional) | ||
# node-version: 18 # The specific version of Node that should be used to build your site. Defaults to 18. (optional) | ||
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
.idea | ||
.venv | ||
__pycache__ | ||
# build output | ||
dist/ | ||
|
||
# generated types | ||
.astro/ | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# environment variables | ||
.env | ||
.env.production | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
*.zip |
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 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
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,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
# Yaksha Lang Website & Docs Site | ||
|
||
* Documentation directories are `yaksha_docs`, `yaksha_lib_docs`, `yaksha_proposals` and `yaksha_tutorials` | ||
|
||
Require `css-minify` and `html-minifier` in path. | ||
|
||
* STEP 01: Install node.js | ||
* STEP 02: | ||
``` | ||
npm install -g css-minify | ||
npm install -g html-minifier | ||
``` | ||
|
||
Uses Python to build the documentation. | ||
* STEP 01: Create virtual environment | ||
``` | ||
python -m venv .venv | ||
``` | ||
* STEP 02: Activate virtual environment | ||
* STEP 03: Install dependencies | ||
``` | ||
pip install -r requirements.txt | ||
``` | ||
* STEP 04: Run the build.py | ||
``` | ||
python build.py | ||
``` | ||
Build with [Astro](https://astro.build/) + [Tailwindcss](https://tailwindcss.com/) & [DaisyUi](https://daisyui.com/). | ||
|
||
## Quick Start | ||
|
||
0. [Install Yarn](https://classic.yarnpkg.com/lang/en/docs/install/) (will require NodeJs) | ||
1. `yarn # Installs dependecies` | ||
2. `yarn dev # Runs development server` | ||
|
||
|
||
## Astro Brief | ||
|
||
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. | ||
|
||
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. | ||
|
||
Any static assets, like images, can be placed in the `public/` directory. | ||
|
||
## 🧞 Commands | ||
|
||
All commands are run from the root of the project, from a terminal: | ||
|
||
| Command | Action | | ||
| :------------------------ | :----------------------------------------------- | | ||
| `yarn install` | Installs dependencies | | ||
| `yarn dev` | Starts local dev server at `localhost:4321` | | ||
| `yarn build` | Build your production site to `./dist/` | | ||
| `yarn preview` | Preview your build locally, before deploying | | ||
| `yarn astro ...` | Run CLI commands like `astro add`, `astro check` | | ||
| `yarn astro -- --help` | Get help using the Astro CLI | |
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,28 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import tailwind from "@astrojs/tailwind"; | ||
|
||
import mdx from "@astrojs/mdx"; | ||
import fetch from 'node-fetch'; | ||
|
||
// Downloads yaksha grammar from main repo, may change in the future? | ||
const yakshaGrammarUrl = "https://raw.githubusercontent.com/YakshaLang/Yaksha/main/editor/vscode/syntaxes/yaksha.json"; | ||
var resp = await fetch(yakshaGrammarUrl, {method: "GET"}); | ||
let yakshaGrammar = await resp.json(); | ||
|
||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: 'https://yakshalang.github.io', | ||
base: '/', | ||
integrations: [tailwind(), mdx()], | ||
markdown: { | ||
shikiConfig: { | ||
wrap: true, | ||
langs: [{ | ||
name: 'yaksha', | ||
scopeName: 'source.yaksha', | ||
...yakshaGrammar | ||
}, "c", "bash", "scheme", "python"] | ||
} | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.