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

Main #6

Open
wants to merge 9 commits into
base: Dev2
Choose a base branch
from
Open
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
90 changes: 90 additions & 0 deletions .github/workflows/astro.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Sample workflow for building and deploying an Astro site to GitHub Pages
#
# To get started with Astro see: https://docs.astro.build/en/getting-started/
#
name: Deploy Astro site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

env:
BUILD_PATH: "." # default value when not using subfolders
# BUILD_PATH: subfolder

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
echo "lockfile=yarn.lock" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
echo "lockfile=package-lock.json" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: ${{ steps.detect-package-manager.outputs.manager }}
cache-dependency-path: ${{ env.BUILD_PATH }}/${{ steps.detect-package-manager.outputs.lockfile }}
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
working-directory: ${{ env.BUILD_PATH }}
- name: Build with Astro
run: |
${{ steps.detect-package-manager.outputs.runner }} astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: ${{ env.BUILD_PATH }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_PATH }}/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,14 @@

[Link to creating your own Octocat](https://myoctocat.com/build-your-octocat/)

<<<<<<< HEAD
## Posts
<nav>
<ul>
<li><a href="{{ site.baseurl }}/feed.html">Posts Feed</a></li>
</ul>
</nav>
=======

# Posts
>>>>>>> b7ed8b8e9e83e21451fe73b92eeea6f0292c4d99
13 changes: 11 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ remote_theme: pages-themes/[email protected]
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one

title: Work In Progress
description: An attempt to use Github Pages as a personal site.
plugins:
- jekyll-remote-theme # add this line to the plugins list if you already have one
- jekyll-remote-theme # add this line to the plugins list if you already have one
- jekyll-remote-theme # add this line to the plugins list if you already have one

title: Work In Progress
base_url: "www.johnshelburne.com"
- jekyll-remote-theme # add this line to the plugins list if you already have one

title: John Shelburne
description: John Shelburne's personal website
59 changes: 59 additions & 0 deletions _posts/2024-07-25-Creating A Template For Github Page Posts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
layout: post
title: "Creating A Template"
date: 2024-08-01
---
# How do I create a template for posts for my posts on my Github Page?


To create a template for posts on your GitHub Page using Jekyll, you can follow these steps:

1. **Create a [`_posts`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fjohnjohn%2Fthecatfix.github.io%2F_posts%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/johnjohn/thecatfix.github.io/_posts") directory**: This is where all your blog posts will be stored.
2. **Create a new Markdown file**: The file name should follow the format `YYYY-MM-DD-title.md`.
3. **Add front matter to the file**: This is YAML code at the top of the file that specifies metadata for the post.

Here's a detailed plan:

1. Create a [`_posts`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fjohnjohn%2Fthecatfix.github.io%2F_posts%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/johnjohn/thecatfix.github.io/_posts") directory if it doesn't exist.
2. Create a new Markdown file in the [`_posts`](command:_github.copilot.openRelativePath?%5B%7B%22scheme%22%3A%22file%22%2C%22authority%22%3A%22%22%2C%22path%22%3A%22%2FUsers%2Fjohnjohn%2Fthecatfix.github.io%2F_posts%22%2C%22query%22%3A%22%22%2C%22fragment%22%3A%22%22%7D%5D "/Users/johnjohn/thecatfix.github.io/_posts") directory with the name format `YYYY-MM-DD-title.md`.
3. Add the following front matter to the file:

```markdown
---
layout: post
title: "Your Post Title"
date: YYYY-MM-DD
categories: [category1, category2]
tags: [tag1, tag2]
---
```

4. Write your post content below the front matter.

### Example

1. **Create the `_posts` directory**:
```sh
mkdir -p _posts
```

2. **Create a new post file**:
```sh
touch _posts/2024-01-01-my-first-post.md
```

3. **Add front matter and content**:

```markdown
---
layout: post
title: "My First Post"
date: 2024-01-01
categories: [blog, tutorial]
tags: [jekyll, github pages]
---

This is the content of my first post.
```

This template will help you maintain consistency across your blog posts on your GitHub Page.
Loading
Loading