Skip to content
Merged
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# These are supported funding model platforms

github: mazino2d
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-deploy-page.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Build and Deploy Jekyll site
on:
push:
Expand Down
12 changes: 10 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ repos:
hooks:
- id: lint-markdown
name: Lint Markdown files
entry: npx --yes markdownlint-cli2
language: system
entry: markdownlint-cli2
language: node
files: \.md$
pass_filenames: true
additional_dependencies: [markdownlint-cli2]
- id: lint-yaml
name: Lint YAML files
entry: yamllint
language: conda
files: \.(yaml|yml)$
pass_filenames: true
additional_dependencies: [yamllint]
17 changes: 17 additions & 0 deletions .yamllint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
extends: default

rules:
document-start:
present: true

line-length:
max: 150
level: warning

indentation:
spaces: 2
indent-sequences: consistent

colons: {max-spaces-before: 0, max-spaces-after: 1}
new-lines: {type: unix}
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ The site will automatically rebuild when you make changes to the source files.

## Pre-commit Setup (Optional)

This project uses pre-commit hooks to automatically lint Markdown files before each commit.
This project uses pre-commit hooks to automatically check code quality before each commit.

### What Pre-commit Checks

- **Markdown Linting**: Uses `markdownlint-cli2` (Node.js) to enforce Markdown style guidelines
- **YAML Linting**: Uses `yamllint` (Conda) to validate YAML syntax and formatting

### Installing Pre-commit

Expand All @@ -92,6 +97,12 @@ This project uses pre-commit hooks to automatically lint Markdown files before e
pre-commit install
```

3. Pre-commit will automatically create isolated environments and install dependencies:
- Node.js environment for `markdownlint-cli2`
- Conda environment for `yamllint`

The first run will take time to set up these environments.

### Running Pre-commit Manually

To run pre-commit hooks on all files manually:
Expand All @@ -106,16 +117,31 @@ To run pre-commit on specific files:
pre-commit run --files path/to/file.md
```

To run a specific hook:

```bash
# Lint Markdown only
pre-commit run lint-markdown --all-files

# Lint YAML only
pre-commit run lint-yaml --all-files
```

### Pre-commit Configuration

The project uses `markdownlint-cli2` to check Markdown files. The configuration is in `.pre-commit-config.yaml`.
The pre-commit configuration is in `.pre-commit-config.yaml`:

- **lint-markdown**: Checks all `.md` files using markdownlint-cli2 (runs in Node.js environment)
- **lint-yaml**: Checks all `.yaml` and `.yml` files using yamllint (runs in Conda environment)

Both tools run in isolated environments managed by pre-commit, so you don't need to install them manually.

### Troubleshooting

If pre-commit fails:

1. Review the error messages
2. Fix the issues in your Markdown files
2. Fix the issues in your files
3. Stage the fixes: `git add .`
4. Try committing again

Expand Down
28 changes: 12 additions & 16 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
###########################################################
### Welcome to Beautiful Jekyll!
### This config file is meant for settings that affect your entire website. When you first
Expand Down Expand Up @@ -38,7 +39,6 @@ round-avatar: true
# then specify the following parameter
#title-img: /path/to/image


#####################################
# --- Footer social media links --- #
#####################################
Expand Down Expand Up @@ -71,7 +71,7 @@ social-network-links:
# mastodon: instance.url/@username
# ORCID: your ORCID ID
# google-scholar: your google scholar
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# kaggle: yourname
# hackerrank: yourname

Expand Down Expand Up @@ -206,23 +206,23 @@ commentbox: "5716156111388672-proj" # Project ID, e.g. "5694267682979840-proj"
# label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances

# To use Staticman comments, uncomment the following section. You may leave the reCaptcha
# section commented if you aren't using reCaptcha for spam protection.
# Using Staticman requires advanced knowledge, please consult
# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
# instructions. For any support with staticman please direct questions to staticman and
# section commented if you aren't using reCaptcha for spam protection.
# Using Staticman requires advanced knowledge, please consult
# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
# instructions. For any support with staticman please direct questions to staticman and
# not to BeautifulJekyll.
#staticman:
# repository : # GitHub username/repository eg. "mazino2d/mazino2d.github.io"
# branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml`
# endpoint : # URL of your deployment, with a trailing slash eg. "https://<your-api>/v3/entry/github/"
# reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
# reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
# siteKey : # You need to apply for a site key on Google
# secret : # Encrypt your password by going to https://<your-own-api>/v3/encrypt/<your-site-secret>

# To use giscus comments:
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (2) Install the giscus app in your repository (details at https://giscus.app),
# (3) Fill in *all* the parameters below
# (3) Fill in *all* the parameters below
# See more details about giscus and each of the following parameters at https://giscus.app
#giscus:
# hostname: giscus.app # Replace with your giscus instance's hostname if self-hosting
Expand Down Expand Up @@ -261,16 +261,14 @@ kramdown:

# Default YAML values (more information on Jekyll's site)
defaults:
-
scope:
- scope:
path: ""
type: "posts"
values:
layout: "post"
comments: true # add comments to all blog posts
comments: true # add comments to all blog posts
social-share: true # add social media sharing buttons to all blog posts
-
scope:
- scope:
path: "" # any file that's not a post will be a "page" layout by default
values:
layout: "page"
Expand All @@ -289,7 +287,5 @@ exclude:
plugins:
- jekyll-paginate
- jekyll-sitemap

# Beautiful Jekyll / Dean Attali
# 2fc73a3a967e97599c9763d05e564189

Loading