diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..08540e2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,3 @@ +root = true +end_of_line = lf +charset = utf-8 diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6d4c0aa..9117301 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +.direnv diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index 22a1505..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "recommendations": ["astro-build.astro-vscode"], - "unwantedRecommendations": [] -} diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index d642209..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "command": "./node_modules/.bin/astro dev", - "name": "Development server", - "request": "launch", - "type": "node-terminal" - } - ] -} diff --git a/README.md b/README.md index e463183..258562e 100644 --- a/README.md +++ b/README.md @@ -11,12 +11,16 @@ This is my personal portfolio and blog template. It allows you to create blog po - Plausible Analytics: Analytics integration with Plausible allows you to track visitor statistics and gain insights into the site's performance. - Light and Dark Theme: The site includes both light and dark themes, and the current theme is set based on system settings. -## Installation +## Development -1. Clone the repository to your local machine. -2. Install the necessary dependencies by running `bun install`. -3. Customize the site's content and configuration files to reflect your personal information and preferences. -4. Deploy the site, according to [Astro's documentation](https://docs.astro.build/en/guides/deploy/), to your hosting provider of choice. +This repository includes a Nix Flakes-based development environment. If Nix is configured on your system, run `nix develop` to enter the development environment. Optionally, [direnv](https://github.com/direnv/direnv) can automatically do this for you, when you change into the directory. + +1. Install the necessary dependencies by running `bun install`. +2. Start the development server by running `bun dev`. + +## Deployment + +This repository contains a workflow that automatically deploys to GitHub Pages, for other options refer to [Astro's deployment guide](https://docs.astro.build/en/guides/deploy/). ## Usage diff --git a/bun.lockb b/bun.lockb index dd04977..4627a4b 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eslint.config.js b/eslint.config.js index 1e1aaa5..2086180 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -39,6 +39,6 @@ export default [ }, }, { - ignores: [".astro/**"], + ignores: [".astro/**", "dist/**"], }, ]; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c69572f --- /dev/null +++ b/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1734083684, + "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=", + "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84", + "revCount": 711150, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2411.711150%2Brev-314e12ba369ccdb9b352a4db26ff419f7c49fa84/0193c701-367f-7052-bef0-8f30cc5e4be1/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/%2A" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..682cba3 --- /dev/null +++ b/flake.nix @@ -0,0 +1,21 @@ +{ + description = "A Nix-flake-based Bun development environment"; + inputs = { + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*"; + }; + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + bun + ]; + }; + }); + }; +} diff --git a/package.json b/package.json index 52800ad..2ff6c65 100644 --- a/package.json +++ b/package.json @@ -16,28 +16,28 @@ }, "dependencies": { "@astrojs/partytown": "^2.1.2", - "@astrojs/tailwind": "^5.1.2", - "astro": "^4.16.8", + "@astrojs/tailwind": "^5.1.3", + "astro": "^4.16.17", "mdast-util-to-string": "^4.0.0", "reading-time": "^1.5.0", - "tailwindcss": "^3.4.14" + "tailwindcss": "^3.4.16" }, "devDependencies": { - "@commitlint/cli": "^19.5.0", - "@commitlint/config-conventional": "^19.5.0", - "@eslint/js": "^9.13.0", + "@commitlint/cli": "^19.6.1", + "@commitlint/config-conventional": "^19.6.0", + "@eslint/js": "^9.17.0", "@tailwindcss/typography": "^0.5.15", - "@typescript-eslint/parser": "^8.12.2", - "astro-eslint-parser": "^1.0.3", - "eslint": "^9.13.0", - "eslint-plugin-astro": "^1.3.0", - "husky": "^9.1.6", - "prettier": "^3.3.3", + "@typescript-eslint/parser": "^8.18.1", + "astro-eslint-parser": "^1.1.0", + "eslint": "^9.17.0", + "eslint-plugin-astro": "^1.3.1", + "husky": "^9.1.7", + "prettier": "^3.4.2", "prettier-plugin-astro": "^0.14.1", - "prettier-plugin-tailwindcss": "^0.6.8", + "prettier-plugin-tailwindcss": "^0.6.9", "rehype-katex": "^7.0.1", "rehype-mathjax": "^6.0.0", "remark-math": "^6.0.0", - "typescript-eslint": "^8.12.2" + "typescript-eslint": "^8.18.1" } }