Skip to content

Commit 677d55f

Browse files
authored
Initial commit
0 parents  commit 677d55f

File tree

274 files changed

+28060
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+28060
-0
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [jackyzha0]
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
name: Bug report
3+
about: Something about Quartz isn't working the way you expect
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
**Describe the bug**
10+
A clear and concise description of what the bug is.
11+
12+
**To Reproduce**
13+
Steps to reproduce the behavior:
14+
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots and Source**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
You can help speed up fixing the problem by either
27+
28+
1. providing a simple reproduction
29+
2. linking to your Quartz repository where the problem can be observed
30+
31+
**Desktop (please complete the following information):**
32+
33+
- Quartz Version: [e.g. v4.1.2]
34+
- `node` Version: [e.g. v18.16]
35+
- `npm` version: [e.g. v10.1.0]
36+
- OS: [e.g. iOS]
37+
- Browser [e.g. chrome, safari]
38+
39+
**Additional context**
40+
Add any other context about the problem here.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea or improvement for Quartz
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
**Is your feature request related to a problem? Please describe.**
10+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
11+
12+
**Describe the solution you'd like**
13+
A clear and concise description of what you want to happen.
14+
15+
**Describe alternatives you've considered**
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
**Additional context**
19+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
groups:
8+
production-dependencies:
9+
applies-to: "version-updates"
10+
patterns:
11+
- "*"
12+
- package-ecosystem: "github-actions"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
groups:
17+
ci-dependencies:
18+
applies-to: "version-updates"
19+
patterns:
20+
- "*"

.github/workflows/ci.yaml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build and Test
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- v4
7+
push:
8+
branches:
9+
- v4
10+
workflow_dispatch:
11+
12+
jobs:
13+
build-and-test:
14+
if: ${{ github.repository == 'jackyzha0/quartz' }}
15+
strategy:
16+
matrix:
17+
os: [windows-latest, macos-latest, ubuntu-latest]
18+
runs-on: ${{ matrix.os }}
19+
permissions:
20+
contents: write
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 20
30+
31+
- name: Cache dependencies
32+
uses: actions/cache@v4
33+
with:
34+
path: ~/.npm
35+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
36+
restore-keys: |
37+
${{ runner.os }}-node-
38+
39+
- run: npm ci
40+
41+
- name: Check types and style
42+
run: npm run check
43+
44+
- name: Test
45+
run: npm test
46+
47+
- name: Ensure Quartz builds, check bundle info
48+
run: npx quartz build --bundleInfo -d docs
49+
50+
publish-tag:
51+
if: ${{ github.repository == 'jackyzha0/quartz' && github.ref == 'refs/heads/v4' }}
52+
runs-on: ubuntu-latest
53+
permissions:
54+
contents: write
55+
steps:
56+
- uses: actions/checkout@v4
57+
with:
58+
fetch-depth: 0
59+
- name: Setup Node
60+
uses: actions/setup-node@v4
61+
with:
62+
node-version: 20
63+
- name: Get package version
64+
run: node -p -e '`PACKAGE_VERSION=${require("./package.json").version}`' >> $GITHUB_ENV
65+
- name: Create release tag
66+
uses: pkgdeps/git-tag-action@v3
67+
with:
68+
github_token: ${{ secrets.GITHUB_TOKEN }}
69+
github_repo: ${{ github.repository }}
70+
version: ${{ env.PACKAGE_VERSION }}
71+
git_commit_sha: ${{ github.sha }}
72+
git_tag_prefix: "v"
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Docker build & push image
2+
3+
on:
4+
push:
5+
branches: [v4]
6+
tags: ["v*"]
7+
pull_request:
8+
branches: [v4]
9+
paths:
10+
- .github/workflows/docker-build-push.yaml
11+
- quartz/**
12+
workflow_dispatch:
13+
14+
jobs:
15+
build:
16+
if: ${{ github.repository == 'jackyzha0/quartz' }} # Comment this out if you want to publish your own images on a fork!
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Set lowercase repository owner environment variable
20+
run: |
21+
echo "OWNER_LOWERCASE=${OWNER,,}" >> ${GITHUB_ENV}
22+
env:
23+
OWNER: "${{ github.repository_owner }}"
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 1
27+
- name: Inject slug/short variables
28+
uses: rlespinasse/[email protected]
29+
- name: Set up QEMU
30+
uses: docker/setup-qemu-action@v3
31+
- name: Set up Docker Buildx
32+
uses: docker/setup-buildx-action@v3
33+
with:
34+
install: true
35+
driver-opts: |
36+
image=moby/buildkit:master
37+
network=host
38+
- name: Install cosign
39+
if: github.event_name != 'pull_request'
40+
uses: sigstore/[email protected]
41+
- name: Login to GitHub Container Registry
42+
uses: docker/login-action@v3
43+
if: github.event_name != 'pull_request'
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Extract metadata tags and labels on PRs
50+
if: github.event_name == 'pull_request'
51+
id: meta-pr
52+
uses: docker/metadata-action@v5
53+
with:
54+
images: ghcr.io/${{ env.OWNER_LOWERCASE }}/quartz
55+
tags: |
56+
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}
57+
labels: |
58+
org.opencontainers.image.source="https://github.com/${{ github.repository_owner }}/quartz"
59+
- name: Extract metadata tags and labels for main, release or tag
60+
if: github.event_name != 'pull_request'
61+
id: meta
62+
uses: docker/metadata-action@v5
63+
with:
64+
flavor: |
65+
latest=auto
66+
images: ghcr.io/${{ env.OWNER_LOWERCASE }}/quartz
67+
tags: |
68+
type=semver,pattern={{version}}
69+
type=semver,pattern={{major}}.{{minor}}
70+
type=semver,pattern={{major}}.{{minor}}.{{patch}}
71+
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
72+
type=raw,value=sha-${{ env.GITHUB_SHA_SHORT }}
73+
labels: |
74+
maintainer=${{ github.repository_owner }}
75+
org.opencontainers.image.source="https://github.com/${{ github.repository_owner }}/quartz"
76+
77+
- name: Build and push Docker image
78+
id: build-and-push
79+
uses: docker/build-push-action@v6
80+
with:
81+
push: ${{ github.event_name != 'pull_request' }}
82+
build-args: |
83+
GIT_SHA=${{ env.GITHUB_SHA }}
84+
DOCKER_LABEL=sha-${{ env.GITHUB_SHA_SHORT }}
85+
tags: ${{ steps.meta.outputs.tags || steps.meta-pr.outputs.tags }}
86+
labels: ${{ steps.meta.outputs.labels || steps.meta-pr.outputs.labels }}
87+
cache-from: type=gha
88+
cache-to: type=gha

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.DS_Store
2+
.gitignore
3+
node_modules
4+
public
5+
prof
6+
tsconfig.tsbuildinfo
7+
.obsidian
8+
.quartz-cache
9+
private/
10+
.replit
11+
replit.nix

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v20.9.0

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

0 commit comments

Comments
 (0)