-
-
Notifications
You must be signed in to change notification settings - Fork 541
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 #45 from otoyo/features-0.3
Features 0.3
- Loading branch information
Showing
79 changed files
with
3,135 additions
and
1,325 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
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
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
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,4 +1,4 @@ | ||
version: "1" | ||
version: '1' | ||
rules: | ||
- base: main | ||
upstream: otoyo:main | ||
|
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
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,25 @@ | ||
name: Format | ||
|
||
on: | ||
push: | ||
branches: | ||
|
||
jobs: | ||
format: | ||
name: Prettier | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 16.x | ||
|
||
- name: Run format | ||
run: yarn format | ||
|
||
- uses: stefanzweifel/[email protected] | ||
with: | ||
commit_message: Format by GitHub Actions |
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,10 +1,8 @@ | ||
name: Lint | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
push: | ||
branches: | ||
|
||
permissions: | ||
checks: write | ||
|
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 |
---|---|---|
|
@@ -23,3 +23,6 @@ pnpm-debug.log* | |
|
||
tmp/ | ||
!tmp/.gitkeep | ||
|
||
public/notion/* | ||
!public/notion/.gitkeep |
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,2 @@ | ||
dist/**/* | ||
tmp/**/* |
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,12 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.astro"], | ||
"options": { | ||
"semi": false | ||
} | ||
} | ||
] | ||
} |
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
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
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,26 +1,33 @@ | ||
import { defineConfig } from 'astro/config' | ||
import { defineConfig } from 'astro/config'; | ||
import { CUSTOM_DOMAIN, BASE_PATH } from './src/server-constants'; | ||
import FeaturedImageDownloader from './src/integrations/featured-image-downloader'; | ||
import PublicNotionCopier from './src/integrations/public-notion-copier'; | ||
|
||
|
||
const CUSTOM_DOMAIN = '' // <- Set your costom domain if you have. e.g. alpacat.com | ||
|
||
|
||
const getSite = function() { | ||
const getSite = function () { | ||
if (!process.env.CF_PAGES) { | ||
return 'http://localhost:3000' | ||
return new URL(BASE_PATH, 'http://localhost:3000').toString(); | ||
} | ||
|
||
if (process.env.CF_PAGES_BRANCH !== 'main') { | ||
return process.env.CF_PAGES_URL | ||
return new URL(BASE_PATH, process.env.CF_PAGES_URL).toString(); | ||
} | ||
|
||
if (CUSTOM_DOMAIN) { | ||
return `https://${CUSTOM_DOMAIN}` | ||
return new URL(BASE_PATH, `https://${CUSTOM_DOMAIN}`).toString(); | ||
} | ||
|
||
return `https://${new URL(process.env.CF_PAGES_URL).host.split('.').slice(1).join('.')}` | ||
} | ||
return new URL( | ||
BASE_PATH, | ||
`https://${new URL(process.env.CF_PAGES_URL).host | ||
.split('.') | ||
.slice(1) | ||
.join('.')}` | ||
).toString(); | ||
}; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
site: getSite(), | ||
}) | ||
base: BASE_PATH, | ||
integrations: [FeaturedImageDownloader(), PublicNotionCopier()], | ||
}); |
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
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
Empty file.
Oops, something went wrong.