Skip to content
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

Version2 #5

Merged
merged 37 commits into from
Aug 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
895cff9
testdeploy
evanharmon1 Aug 13, 2024
bfd7642
test
evanharmon1 Aug 13, 2024
f7e3b06
add netlify.toml
evanharmon1 Aug 13, 2024
13a3fe0
test2
evanharmon1 Aug 13, 2024
c5416b7
test3
evanharmon1 Aug 13, 2024
cf53fe3
test4
evanharmon1 Aug 13, 2024
b5c2709
test5
evanharmon1 Aug 13, 2024
2113d21
test6
evanharmon1 Aug 13, 2024
429ae61
test7
evanharmon1 Aug 13, 2024
fe0087a
test 9
evanharmon1 Aug 13, 2024
ab647e3
spec pnpm version
evanharmon1 Aug 13, 2024
fd1cc65
test11
evanharmon1 Aug 13, 2024
f07b074
quick-commit
evanharmon1 Aug 13, 2024
2cc7545
quick-commit
evanharmon1 Aug 13, 2024
5362cf6
quick-commit
evanharmon1 Aug 13, 2024
b158822
quick-commit
evanharmon1 Aug 13, 2024
98e36be
quick-3
evanharmon1 Aug 15, 2024
6d71f37
quick-4
evanharmon1 Aug 15, 2024
579490e
Update readme. Working deploy. Pre-adding v1 content.
evanharmon1 Aug 15, 2024
9a3c605
quick-1
evanharmon1 Aug 15, 2024
7569469
About page
evanharmon1 Aug 15, 2024
bea4c0a
quick-3
evanharmon1 Aug 15, 2024
e9f13fe
testing
evanharmon1 Aug 15, 2024
a44073f
contact page
evanharmon1 Aug 15, 2024
6362a58
Finish hero component
evanharmon1 Aug 16, 2024
9d76013
Finish header
evanharmon1 Aug 16, 2024
adcdab1
Finish theme component
evanharmon1 Aug 16, 2024
12efa8e
Finish services component
evanharmon1 Aug 16, 2024
21c10aa
Update light color scheme for updpated components.
evanharmon1 Aug 16, 2024
4bef516
Add services page for header
evanharmon1 Aug 16, 2024
21ddd02
Fix page hero
evanharmon1 Aug 16, 2024
9fdee62
Finish footer and other issues
evanharmon1 Aug 16, 2024
30b020f
quick-4
evanharmon1 Aug 16, 2024
8dc28e7
Add gallery page
evanharmon1 Aug 16, 2024
8aa81d5
stuff
evanharmon1 Aug 17, 2024
d73fe2d
Add remaining content from original site - newsletter page, mowing pa…
evanharmon1 Aug 17, 2024
e39cd6a
Fix dark and light bg color for index images
evanharmon1 Aug 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: [
'plugin:css/recommended',
'plugin:mdx/recommended',
'plugin:markdown/recommended-legacy',
'plugin:astro/recommended'
],
"plugins": [
"css"
],
parser: '@typescript-eslint/parser',
parserOptions: {
tsconfigRootDir: __dirname,
sourceType: 'module',
ecmaVersion: 'latest'
},
overrides: [
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro']
},
rules: {
// override/add rules settings here, such as:
// "astro/no-set-html-directive": "error"
}
}
]
}
1 change: 1 addition & 0 deletions .frontmatter/content/mediaDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
13 changes: 0 additions & 13 deletions .github/FUNDING.yml

This file was deleted.

56 changes: 25 additions & 31 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
name: Github Pages Astro CI
# name: Github Pages Astro CI

on:
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
# on:
# # Trigger the workflow every time you push to the `main` branch
# # Using a different branch name? Replace `main` with your branch’s name
# push:
# branches: [main]
# # Allows you to run this workflow manually from the Actions tab on GitHub.
# workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
# # Allow this job to clone the repo and create a page deployment
# permissions:
# contents: read
# pages: write
# id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v2
- name: Install, build, and upload your site
uses: withastro/action@v0
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout your repository using git
# uses: actions/checkout@v4
# - name: Install, build, and upload your site
# uses: withastro/action@v2
# with:
# package-manager: pnpm
# node-version: 20
# path: . # The root location of your Astro project inside the repository. (optional)

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@v1
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ pnpm-debug.log*

# macOS-specific files
.DS_Store

.astro
4 changes: 2 additions & 2 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"MD033": false
}
"MD033": false
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Expose Astro dependencies for `pnpm` users
shamefully-hoist=true
# auto-install-peers=true
4 changes: 0 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
pnpm-lock.yaml
dist
node_modules
src/pages/blog/*.md
astro
astro.build
astro.new
13 changes: 0 additions & 13 deletions .prettierrc.json

This file was deleted.

19 changes: 19 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"eslint.validate": [
"css",
"javascript",
"javascriptreact",
"astro",
"typescript",
"typescriptreact",
"markdown",
"mdx"
],
"prettier.documentSelectors": ["**/*.astro"],
"[astro]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.associations": {
"*.mdoc": "markdown"
}
}
152 changes: 81 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,89 @@
# hello-astro
# Sommer Lawn
Website for https://sommerlawn.com
This is an [Astro](https://astro.build) website based on the [Hello Astro](https://github.com/hellotham/hello-astro) starter theme which uses Typescript, TailwindCSS, Markdown and MDX. It follows the [JAMstack architecture](https://jamstack.org) by automatically building a static version from the Git repository.

## Development
### Get Started
- `git clone` this repo and cd to the repo directory
- `npm install -g pnpm` Install performant NPM which is required for builds and deployment
- `pnpm install` Install dependencies
- `pnpm dev` Run local server for local development

### Adding New Features
- When adding new features, create a feature branch. E.g: `git checkout -B new-contact-page` and develop from that branch.
- When local development works, deploy those updates by pushing to the remote feature branch which will build a Netlify Deploy Preview. E.g, with the feature branch checked out: `git push` and then you can check how the Deploy Preview looks.
- If the Deploy Preview looks good, then you can open a PR and merge to the `main` git branch, which will then automatically deploy to production and make your new changes live on https://sommerlawn.com.

### Notes on Deploying to the Netlify Environment
- All commits to the main branch are automatically deployed to production on Netlify at https://sommerlawn.com.
- Builds for deployments to Netlify should be handled in `netlify.toml` and `package.json`, not in the Netlify GUI.
- Don't upgrade packages unless required.
- Packages should be handled via `pnpm-lock.yaml` and commited since that is what the production build will use via the `pnpm i --frozen-lockfile && pnpm build` command.
- Develop with the same version of Node that Netlify will use and specify that in `package.json`.

Hello Astro is a full featured [Astro](https://astro.build) corporate/marketing/blog starter theme written in Typescript and TailwindCSS. It supports Markdown and MDX based pages and blog posts.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:

### PNPM & Astro
| Command | Action |
| :------------------ | :------------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:3000` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying |
| `pnpm lint` | Pretty print the source code |
| `pnpm check` | Check the source code for errors |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `pnpm astro --help` | Get help using the Astro CLI |

### Netlify CLI
Optionally, you can install the Netlify CLI to manually push deploy previews and use other Netlify features
`brew install netlify-cli`

## 🚀 Project Structure
```text
/
├── public/
│ └── favicon.ico
├── src/
│ ├── assets/
│ │ ├── image.png
│ │ └── gallery/
│ │ └── gallery-name/
│ │ └── image.jpg
│ ├── components/
│ │ └── header.astro
│ ├── content/
│ │ ├── blog/
│ │ | └── 2022-08-01-post.md
│ │ ├── doc/
│ │ | └── documentation-page.md
| │ └── config.ts
│ ├── layouts/
│ │ ├── base.astro
│ │ ├── blog.astro
│ │ └── doc.astro
│ ├── pages/
│ │ ├── index.astro
│ │ └── contact.astro
│ └── config.ts
└── package.json
```

![Light](https://github.com/hellotham/hello-astro/raw/main/screenshot-light.png)
Astro looks for `.astro`, `.md` or `.mdx` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

![Dark](https://github.com/hellotham/hello-astro/raw/main/screenshot-dark.png)
`src/components/` is where we put any Astro components and similarly `src/layouts/` for layouts.

![Lighthouse](https://github.com/hellotham/hello-astro/raw/main/lighthouse.png)
Images can be placed in `src/assets/`.

Uses the following integrations:
Blog and documentation content are created as collections of Markdown or MDX files in `src/content`.

Any static assets, eg. images, can be placed in the `public/` directory.

## Integrations & Features
Uses the following integrations:
- @astrojs/mdx
- @astrojs/image
- @astrojs/markdoc
- @astrojs/sitemap
- @astrojs/rss
- @astrojs/tailwind
Expand All @@ -22,10 +94,6 @@ Uses the following integrations:

In addition, SVG and PNG illustrations sourced from [Undraw](https://undraw.co)

This project initially started as a bare bones port of [hello-gatsby-starter](https://github.com/hellotham/hello-gatsby-starter), but now contains more features (light/dark modes, category pages, search, diagrams, math and more!)

## Features

- Full-featured blog with frontmatter (title, description, author, date, image, tags)
- High performance low overhead with minimal Javascript (AlpineJS)
- Full text client based search of blog pages via lunrjs (search index only loaded on first invocation of search on a page)
Expand All @@ -45,10 +113,7 @@ This project initially started as a bare bones port of [hello-gatsby-starter](ht
- Carousel component using Swiper
- Documentation pages (modelled after astro docs starter but using Tailwind)

## External Packages

The start uses the following external packages:

## External Packages
- [Astro](https://astro.build/)
- [TypeScript](https://www.typescriptlang.org/)
- [TailwindCSS](https://tailwindcss.com) and [TailwindUI](https://tailwindui.com)
Expand All @@ -68,59 +133,4 @@ The start uses the following external packages:
- [PhotoSwipe](https://photoswipe.com)
- [exifr](https://mutiny.cz/exifr/)
- [Swiper](https://swiperjs.com/)

It follows the [JAMstack architecture](https://jamstack.org) by automatically building a static version from the Git repository. The demo is deployed on Github Pages.

## 🚀 Project Structure

Inside this starter, you'll see the following folders and files:

```text
/
├── public/
│ └── favicon.ico
├── src/
│ ├── components/
│ │ └── header.astro
│ ├── images/
│ │ └── image.png
│ ├── layouts/
│ │ └── base.astro
│ ├── pages/
│ │ ├── index.astro
│ │ └── blog/
│ │ └── 2022-08-01-post.md
│ ├── svg/
│ │ └── image.svg
│ └── config.ts
└── package.json
```

Astro looks for `.astro`, `.md` or `.mdx` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.

`src/components/` is where we put any Astro components and similarly `src/layouts/` for layouts.

Images can be placed in `src/images/` or `src/svg/` depending on type.

Any static assets, like images, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------ | :------------------------------------------------- |
| `yarn` | Installs dependencies |
| `yarn dev` | Starts local dev server at `localhost:3000` |
| `yarn build` | Build your production site to `./dist/` |
| `yarn preview` | Preview your build locally, before deploying |
| `yarn format` | Pretty print the source code |
| `yarn lint` | Check the source code for errors |
| `yarn astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `yarn astro --help` | Get help using the Astro CLI |

## Release History

- 1.0.0: Initial Release
- 1.0.1: Moved social images to src, improved coverImage processing
- 1.0.2: Upgrade packages to latest
- [Remark Emoji](https://github.com/rhysd/remark-emoji)
Loading