Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kotx committed Feb 18, 2024
0 parents commit 072e5e5
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to Cloudflare Pages
on: push
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install

- name: Build site
run: bun run build

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: afdc9b319dc9eb7543f28d8e7cd900c0
projectName: pink
directory: dist/
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
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"
}
]
}
16 changes: 16 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { defineConfig } from "astro/config";
import tailwind from "@astrojs/tailwind";
import cloudflare from "@astrojs/cloudflare";
import sitemap from "@astrojs/sitemap";

import metaTags from "astro-meta-tags";

// https://astro.build/config
export default defineConfig({
site: "https://kot.pink",
output: "hybrid",
integrations: [tailwind(), sitemap(), metaTags()],
adapter: cloudflare({
imageService: "cloudflare",
}),
});
Binary file added bun.lockb
Binary file not shown.
23 changes: 23 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "kot.pink",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "wrangler pages dev ./dist",
"astro": "astro"
},
"dependencies": {
"@astrojs/cloudflare": "^9.0.1",
"@astrojs/sitemap": "^3.0.5",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.4.0",
"astro-meta-tags": "^0.2.1",
"tailwindcss": "^3.4.1"
},
"devDependencies": {
"wrangler": "^3.28.3"
}
}
Binary file added public/opengraph.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /

Sitemap: https://kot.pink/sitemap-index.xml
1 change: 1 addition & 0 deletions src/env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="astro/client" />
29 changes: 29 additions & 0 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
---

<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta property="og:image" content={Astro.site + "opengraph.webp"} />
<meta property="og:image:type" content="image/webp" />
<meta property="og:image:alt" content="pink and white gradient background, centered text 'kot.pink'" />
<meta property="og:image:width" content="800" />
<meta property="og:image:height" content="400" />
<link rel="sitemap" href="/sitemap-index.xml" />
<title>Kot!</title>
</head>
<body class="h-screen">
<main class="h-full">
<slot />
</main>

<style>
body {
color: white;
background: linear-gradient(90deg, #ea11f1, #dfabff);
}
</style>
</body>
</html>
9 changes: 9 additions & 0 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
import BaseLayout from "../layouts/BaseLayout.astro";
---

<BaseLayout>
<section class="flex flex-col justify-center items-center h-full">
<h1 class="font-bold text-5xl">kot.pink</h1>
</section>
</BaseLayout>
8 changes: 8 additions & 0 deletions tailwind.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
}
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}

0 comments on commit 072e5e5

Please sign in to comment.