diff --git a/.ansible-lint b/.ansible-lint index 899978fe4d..b5d0d27cd0 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -1,3 +1,5 @@ skip_list: - - yaml[truthy] - - yaml[line-length] +- yaml[truthy] +- yaml[line-length] +exclude_paths: +- public/decapcms/config.yml diff --git a/.npmrc b/.npmrc index 999db39309..ef83021af3 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,2 @@ # Expose Astro dependencies for `pnpm` users -shamefully-hoist=true \ No newline at end of file +shamefully-hoist=true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f9152c2817..b26951e2bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ repos: - id: check-json - id: check-merge-conflict - id: check-shebang-scripts-are-executable - exclude: "^(codeTemplates/|tempalte/|{% if code_templates %}codeTemplates{% endif %}/)" + exclude: '^(codeTemplates/|tempalte/|{% if code_templates %}codeTemplates{% endif %}/)' # - id: check-symlinks # I needed to disable since I use symbolic links to files outside my repo which will cause the CI check to fail. - id: check-toml - id: check-xml @@ -29,14 +29,7 @@ repos: rev: 1.0.5 hooks: - id: shell-lint - args: - [ - --format=json, - --color=always, - --exclude=SC3037, - --exclude=SC2148, - --severity=error, - ] + args: [--format=json, --color=always, --exclude=SC3037, --exclude=SC2148, --severity=error] - repo: https://github.com/antonbabenko/pre-commit-terraform rev: v1.96.1 hooks: @@ -64,8 +57,8 @@ ci: for more information, see https://pre-commit.ci autofix_prs: true - autoupdate_branch: "" - autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate" + autoupdate_branch: '' + autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate' autoupdate_schedule: weekly skip: [] submodules: false diff --git a/.prettierignore b/.prettierignore index 76b517ce3f..e14bbdedd8 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,4 +1,4 @@ dist node_modules .github -.changeset \ No newline at end of file +.changeset diff --git a/.stackblitzrc b/.stackblitzrc index 43798ecff8..0dfa8f1e05 100644 --- a/.stackblitzrc +++ b/.stackblitzrc @@ -3,4 +3,4 @@ "env": { "ENABLE_CJS_IMPORTS": true } -} \ No newline at end of file +} diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e173d53f9b..f4ad089701 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community. Examples of behavior that contributes to a positive environment for our community include: -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall +- Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: -* The use of sexualized language or imagery, and sexual attention or advances of +- The use of sexualized language or imagery, and sexual attention or advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a19af39b61..06b8538a7c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,28 +1,35 @@ # Contributing to Evan Harmon Website + First of all, thank you for taking the time to contribute! 🎉 The following is a set of guidelines to ensure your contribution is as smooth as possible. We welcome all types of contributions, including issues, documentation updates, bug fixes, feature requests, and more! ## Code of Conduct + This project adheres to a [Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to Evan Harmon at evan@evanharmon.com. ## How Can I Contribute? + ### 1. Reporting Issues + If you find a bug or have a feature request, please create an issue using the appropriate template: - **Bug Reports:** [bug report link] - **Feature Requests:** [feature request link] When submitting an issue, please include the following information: + - Clear title describing the issue. - Steps to reproduce (for bugs). - Any relevant screenshots or code snippets. - Version of the project or environment. ### 2. Submitting Pull Requests + Before starting work on a major change, open an issue first to discuss your proposed changes. This will avoid any duplication of effort and ensure your contribution aligns with the project goals. To submit a pull request: + 1. Fork the repository and clone your fork. 2. Create a new branch for your contribution: `git checkout -b my-feature-branch` 3. Make your changes. @@ -32,6 +39,7 @@ To submit a pull request: 7. Open a pull request in the main repository, linking to the issue if one exists. ### 3. Guidelines for Code Contributions + - Follow the existing code style. If there is an `.editorconfig` or linter configuration, use it to format your code. - Write clear, descriptive commit messages. - Write unit tests for any new functionality or bug fixes, if applicable. @@ -39,18 +47,22 @@ To submit a pull request: - Document new public methods or features in the relevant documentation files. ### 4. Improving Documentation + We also appreciate improvements to our documentation! You can: + - Fix typos, clarify instructions, or correct grammar. - Add new sections or examples for difficult concepts. Feel free to submit a pull request with your improvements. ## Commit Message Guidelines + We follow the [Conventional Commits](https://www.conventionalcommits.org) standard for writing commit messages. This helps us manage the code history, generate changelogs, and automate CI/CD tooling. Example: Example commit message: + ``` feat(api): add support for custom endpoints @@ -59,6 +71,7 @@ Resolves issue #42. ``` Commit message structure: + ``` [optional scope]: @@ -68,6 +81,7 @@ Commit message structure: ``` Types: + - feat: A new feature for the user. - fix: A bug fix for the user. - chore: Routine tasks (e.g., build tasks, dependencies). @@ -81,6 +95,7 @@ Types: - revert: Reverts a previous commit. ## Contact + If you have any questions about contributing, feel free to open an issue or contact Evan Harmon at evan@evanharmon.com. Thank you for contributing! diff --git a/README.md b/README.md index 10b29d89cf..6e462ace22 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,54 @@ # Evan Harmon Website -My personal website -[Evan Harmon Website](https://evanharmon.com) +My personal website built with Astro and Tailwind CSS with the AstroWind starter template. + + + Author: Evan Harmon [![Validate](https://github.com/evanharmon1/evan-harmon/actions/workflows/validate.yml/badge.svg)](https://github.com/evanharmon1/evan-harmon/actions/workflows/validate.yml) [![Security](https://github.com/evanharmon1/evan-harmon/actions/workflows/security.yml/badge.svg)](https://github.com/evanharmon1/evan-harmon/actions/workflows/security.yml) +[![License](https://img.shields.io/github/license/onwidget/astrowind?style=flat-square&color=dddddd&labelColor=000000)](https://github.com/onwidget/astrowind/blob/main/LICENSE.md) +[![Maintained](https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square)](https://github.com/onwidget) +[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/onwidget/astrowind#contributing) +[![Known Vulnerabilities](https://snyk.io/test/github/onwidget/astrowind/badge.svg?style=flat-square)](https://snyk.io/test/github/onwidget/astrowind) ## Setup & Installation ### Requirements + - Homebrew - Python - [Taskfile](https://taskfile.dev/) ### Bootstrap + Install required software to run other project installers and task runners `task bootstrap` ### Install + Install required dependencies `task install` ## Usage -TODO: project usage ### Task Runner + [Taskfile.yaml](./Taskfile.yml) ### Testing #### Validate + `task validate` #### Security + `task security` #### Linting, Formatting, Conventions, Style Guidelines, etc + - .pre-commit-config.yaml - .shellcheckrc - .ansible-lint-ignore @@ -44,4 +56,190 @@ TODO: project usage ### Building, Deploying, & CI/CD ## Todo File + [todo.md](./todo.md) + +## AstroWind + +Very little vanilla javascript is used only to provide basic functionality so that each developer decides which framework (React, Vue, Svelte, Solid JS...) to use and how to approach their goals. + +In this version the template supports all the options in the `output` configuration, `static`, `hybrid` and `server`, but the blog only works with `prerender = true`. We are working on the next version and aim to make it fully compatible with SSR. + +### Project structure + +Inside **AstroWind** template, you'll see the following folders and files: + +``` +/ +├── public/ +│ ├── _headers +│ └── robots.txt +├── src/ +│ ├── assets/ +│ │ ├── favicons/ +│ │ ├── images/ +│ │ └── styles/ +│ │ └── tailwind.css +│ ├── components/ +│ │ ├── blog/ +│ │ ├── common/ +│ │ ├── ui/ +│ │ ├── widgets/ +│ │ │ ├── Header.astro +│ │ │ └── ... +│ │ ├── CustomStyles.astro +│ │ ├── Favicons.astro +│ │ └── Logo.astro +│ ├── content/ +│ │ ├── post/ +│ │ │ ├── post-slug-1.md +│ │ │ ├── post-slug-2.mdx +│ │ │ └── ... +│ │ └-- config.ts +│ ├── layouts/ +│ │ ├── Layout.astro +│ │ ├── MarkdownLayout.astro +│ │ └── PageLayout.astro +│ ├── pages/ +│ │ ├── [...blog]/ +│ │ │ ├── [category]/ +│ │ │ ├── [tag]/ +│ │ │ ├── [...page].astro +│ │ │ └── index.astro +│ │ ├── index.astro +│ │ ├── 404.astro +│ │ ├-- rss.xml.ts +│ │ └── ... +│ ├── utils/ +│ ├── config.yaml +│ └── navigation.js +├── package.json +├── astro.config.ts +└── ... +``` + +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. + +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. + +Any static assets, like images, can be placed in the `public/` directory if they do not require any transformation or in the `assets/` directory if they are imported directly. + +### Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :------------------ | :------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `localhost:4321` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run check` | Check your project for errors | +| `npm run fix` | Run Eslint and format codes with Prettier | +| `npm run astro ...` | Run CLI commands like `astro add`, `astro preview` | + +### Configuration + +Basic configuration file: `./src/config.yaml` + +```yaml +site: + name: 'Example' + site: 'https://example.com' + base: '/' # Change this if you need to deploy to Github Pages, for example + trailingSlash: false # Generate permalinks with or without "/" at the end + + googleSiteVerificationId: false # Or some value, + +# Default SEO metadata +metadata: + title: + default: 'Example' + template: '%s — Example' + description: 'This is the default meta description of Example website' + robots: + index: true + follow: true + openGraph: + site_name: 'Example' + images: + - url: '~/assets/images/default.png' + width: 1200 + height: 628 + type: website + twitter: + handle: '@twitter_user' + site: '@twitter_user' + cardType: summary_large_image + +i18n: + language: en + textDirection: ltr + +apps: + blog: + isEnabled: true # If the blog will be enabled + postsPerPage: 6 # Number of posts per page + + post: + isEnabled: true + permalink: '/blog/%slug%' # Variables: %slug%, %year%, %month%, %day%, %hour%, %minute%, %second%, %category% + robots: + index: true + + list: + isEnabled: true + pathname: 'blog' # Blog main path, you can change this to "articles" (/articles) + robots: + index: true + + category: + isEnabled: true + pathname: 'category' # Category main path /category/some-category, you can change this to "group" (/group/some-category) + robots: + index: true + + tag: + isEnabled: true + pathname: 'tag' # Tag main path /tag/some-tag, you can change this to "topics" (/topics/some-category) + robots: + index: false + + isRelatedPostsEnabled: true # If a widget with related posts is to be displayed below each post + relatedPostsCount: 4 # Number of related posts to display + +analytics: + vendors: + googleAnalytics: + id: null # or "G-XXXXXXXXXX" + +ui: + theme: 'system' # Values: "system" | "light" | "dark" | "light:only" | "dark:only" +``` + +
+ +#### Customize Design + +To customize Font families, Colors or more Elements refer to the following files: + +- `src/components/CustomStyles.astro` +- `src/assets/styles/tailwind.css` + +### Deploy + +#### Deploy to production (manual) + +You can create an optimized production build with: + +```shell +npm run build +``` + +Now, your website is ready to be deployed. All generated files are located at +`dist` folder, which you can deploy the folder to any hosting service you +prefer. + +## Acknowledgements + +Initially created by [onWidget](https://onwidget.com) and maintained by a community of [contributors](https://github.com/onwidget/astrowind/graphs/contributors). diff --git a/Taskfile.yml b/Taskfile.yml index c5db092963..2fa7f6a532 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,5 +1,5 @@ # Taskfile for Evan Harmon Website -version: "3" +version: '3' tasks: boostrap: cmds: diff --git a/docs/CHECKLIST.md b/docs/CHECKLIST.md index 03d43fb38c..fc88994a02 100644 --- a/docs/CHECKLIST.md +++ b/docs/CHECKLIST.md @@ -1,4 +1,5 @@ # Checklist - Evan Harmon Website + - [ ] Raycast - Setup Raycast VS Code Workspace alias (use its cli?) - [ ] Framework/Application diff --git a/public/_headers b/public/_headers index 806338c162..ed88e9a22d 100644 --- a/public/_headers +++ b/public/_headers @@ -1,2 +1,2 @@ /_astro/* - Cache-Control: public, max-age=31536000, immutable \ No newline at end of file + Cache-Control: public, max-age=31536000, immutable diff --git a/public/robots.txt b/public/robots.txt index 6f27bb66a3..eb0536286f 100644 --- a/public/robots.txt +++ b/public/robots.txt @@ -1,2 +1,2 @@ User-agent: * -Disallow: \ No newline at end of file +Disallow: diff --git a/test/whisperConfig.yml b/test/whisperConfig.yml index 15fdb7555c..a31e97e860 100644 --- a/test/whisperConfig.yml +++ b/test/whisperConfig.yml @@ -1,6 +1,6 @@ include: files: - - "**/*" + - '**/*' exclude: files: