Skip to content

Migrate blog to astro #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:astro/recommended",
],
overrides: [
{
files: ["*.astro"],
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
},
},
],
};
5 changes: 0 additions & 5 deletions .frigg.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check code style and quality

on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16
cache: "pnpm"
- name: install
run: pnpm install
- name: ESLint
run: pnpm run lint
- name: Prettier
run: pnpm run prettier:check
- name: Typescript
run: pnpm run types
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy to GitHub Pages

on:
push:
branches: [master]
workflow_dispatch:

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@v0
with:
node-version: 16

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@v2
26 changes: 23 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
.idea
.vscode

# 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
node_modules
_site
.jekyll-cache
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# webkom.github.io

> Utviklerbloggen vår på [webkom.dev](http://webkom.dev)

## Hvordan legge til et innlegg

1. Lag en ny fil i `src/content/blog/` med navnet `YYYY-MM-DD-tittel.md`
2. Legg til følgende i toppen av filen:
```
---
title: Tittel
description: Beskrivelse
pubDate: YYYY-MM-DD
author: GitHub-brukernavn
---
```
3. Skriv innlegget i markdown under dette
4. Sjekk at det ser bra ut ved å kjøre `pnpm dev` og gå til [localhost:3000](http://localhost:3000)
5. Forsikre deg om at alt er formatert riktig ved å kjøre `pnpm prettier`
6. Commit og lag en pull request :)
6 changes: 0 additions & 6 deletions Rakefile

This file was deleted.

16 changes: 0 additions & 16 deletions Readme.md

This file was deleted.

11 changes: 0 additions & 11 deletions _config.yml

This file was deleted.

26 changes: 0 additions & 26 deletions _layouts/default.html

This file was deleted.

25 changes: 0 additions & 25 deletions _layouts/post.html

This file was deleted.

10 changes: 10 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "astro/config";
import mdx from "@astrojs/mdx";

import sitemap from "@astrojs/sitemap";

// https://astro.build/config
export default defineConfig({
site: "https://webkom.dev",
integrations: [mdx(), sitemap()],
});
32 changes: 0 additions & 32 deletions atom.xml

This file was deleted.

61 changes: 0 additions & 61 deletions css/pygments.css

This file was deleted.

Loading