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

v2.8.0 #457

Merged
merged 47 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b026b79
highlightjs: apply color to foreground
RocketMaDev Nov 11, 2024
bfc3c24
Add Fr translate
Passionlinux Nov 13, 2024
a3b4d42
feat: build and minify JS and CSS files
EvanNotFound Nov 14, 2024
d0f2be7
ci: update build paths in GitHub Actions workflow
EvanNotFound Nov 14, 2024
57408ad
ci: test
EvanNotFound Nov 14, 2024
9f74998
ci: update GitHub Actions workflow for secure push
EvanNotFound Nov 14, 2024
262533c
ci: build and update source/build/js and source/build/css [skip ci]
invalid-email-address Nov 14, 2024
27b5597
feat: add build files
EvanNotFound Nov 14, 2024
004febb
Merge remote-tracking branch 'origin/dev' into dev
EvanNotFound Nov 14, 2024
d3719a8
refactor: Remove SUSTech CDN provider and related references
EvanNotFound Nov 14, 2024
93737cb
ci: Update name of GitHub Actions workflow
EvanNotFound Nov 14, 2024
1903177
ci: optimize GitHub Actions workflow trigger conditions
EvanNotFound Nov 14, 2024
1e9ab16
chore: bump version to 2.7.4
EvanNotFound Nov 14, 2024
9967cde
style: enhance link appearance and underline style
EvanNotFound Nov 14, 2024
202bf85
Merge pull request #452 from Passionlinux/main
EvanNotFound Nov 15, 2024
e87dacd
Merge pull request #451 from RocketMaDev/dev
EvanNotFound Nov 15, 2024
b25d911
feat(pangu): add pangu.js for automatic spacing between Chinese and E…
EvanNotFound Nov 15, 2024
918da0e
refactor: reorganize and optimize CSS imports
EvanNotFound Nov 15, 2024
2d34576
refactor: Optimize CSS imports and Tailwind configuration
EvanNotFound Nov 15, 2024
dfb3287
refactor: Reorganize CSS styles and improve structure
EvanNotFound Nov 15, 2024
48aa3c0
style: Remove unused text section from basic.styl
EvanNotFound Nov 15, 2024
3f4f079
refactor: Update import statements and CSS classes
EvanNotFound Nov 15, 2024
675d775
feat: add new color variables and update theme structure
EvanNotFound Nov 15, 2024
68aeb04
refactor: Update pangu.js to use "markdown-body" class for spacing
EvanNotFound Nov 15, 2024
485dec9
ci: build and update source/build/js and source/build/css [skip ci]
invalid-email-address Nov 15, 2024
4df8a07
refactor: Simplify theme color management
EvanNotFound Nov 17, 2024
5455c10
feat: implement default color mode configuration
EvanNotFound Nov 17, 2024
fb31d33
refactor: simplify page rendering logic and improve code structure
EvanNotFound Nov 17, 2024
81403f9
refactor: rm tag-content
EvanNotFound Nov 17, 2024
72a8c26
refactor: completely refactor layout folder
EvanNotFound Nov 17, 2024
09ff338
refactor: reorganize page rendering logic and simplify helper functions
EvanNotFound Nov 17, 2024
10c6a46
feat: add article info and copyright components
EvanNotFound Nov 17, 2024
4d3fb82
feat: implement new page templates and refactor page helpers
EvanNotFound Nov 18, 2024
1e1b4ed
refactor: Improve page data handling and template rendering
EvanNotFound Nov 18, 2024
6d0546e
refactor: rename scripts
EvanNotFound Nov 18, 2024
64f8cc1
feat: add bookmarks page and enhance theme functionality
EvanNotFound Nov 18, 2024
986f2ac
ci: build and update source/build/js and source/build/css [skip ci]
invalid-email-address Nov 18, 2024
0056903
style: improve layout and spacing in bookmarks page
EvanNotFound Nov 18, 2024
a66108c
Merge remote-tracking branch 'origin/dev' into dev
EvanNotFound Nov 18, 2024
bc8bd89
chore: bump version to 2.8.0
EvanNotFound Nov 18, 2024
824397c
feat(config): add Pangu.js option for automatic spacing
EvanNotFound Nov 19, 2024
28c161b
feat(bookmarks): add bookmark navigation and placeholder image
EvanNotFound Nov 19, 2024
0847f0e
feat: Enhance page transitions with smooth animations
EvanNotFound Nov 19, 2024
f75ff0c
refactor: Rename transition class for main content body
EvanNotFound Nov 19, 2024
eb10488
refactor: Move animations to separate file and update imports
EvanNotFound Nov 19, 2024
3db0348
ci: update CodeRabbit configuration
EvanNotFound Nov 19, 2024
e22b67c
feat(animations): add transition-fade-down animation
EvanNotFound Nov 19, 2024
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
51 changes: 51 additions & 0 deletions .github/workflows/build-and-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build JS and CSS

on:
push:
branches:
- main
- dev
paths:
- 'source/js/**'
- 'source/css/**'
- 'source/build/**'

jobs:
build:
runs-on: ubuntu-latest
Comment on lines +13 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add explicit permissions configuration

The workflow needs write permissions to push changes to the repository.

 jobs:
   build:
     runs-on: ubuntu-latest
+    permissions:
+      contents: write
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
jobs:
build:
runs-on: ubuntu-latest
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write


steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
persist-credentials: false # Prevent using GITHUB_TOKEN automatically
fetch-depth: 0 # Fetch all history for accurate file diffs

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x' # Specify your Node.js version

- name: Install Dependencies
run: npm install

- name: Build Project
run: npm run build

Comment on lines +29 to +34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Optimize build performance with caching

Consider adding npm cache and artifact persistence to improve workflow efficiency.

+      - name: Cache dependencies
+        uses: actions/cache@v3
+        with:
+          path: ~/.npm
+          key: npm-${{ hashFiles('package-lock.json') }}
+          restore-keys: npm-
+
       - name: Install Dependencies
         run: npm install

       - name: Build Project
         run: npm run build
+
+      - name: Upload build artifacts
+        uses: actions/upload-artifact@v3
+        with:
+          name: build-files
+          path: |
+            source/build/js
+            source/build/css

Committable suggestion skipped: line range outside the PR's diff.

- name: Configure Git
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"

- name: Commit and Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git add source/build/js source/build/css
# Check if there are any changes
if ! git diff --cached --quiet; then
git commit -m "ci: build and update source/build/js and source/build/css [skip ci]"
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/}
else
Comment on lines +44 to +49
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix security and shell script issues

The git push command exposes the token in the command line and has potential shell escaping issues.

-            git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/}
+            git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF#refs/heads/}"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
git add source/build/js source/build/css
# Check if there are any changes
if ! git diff --cached --quiet; then
git commit -m "ci: build and update source/build/js and source/build/css [skip ci]"
git push "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:${GITHUB_REF#refs/heads/}
else
git add source/build/js source/build/css
# Check if there are any changes
if ! git diff --cached --quiet; then
git commit -m "ci: build and update source/build/js and source/build/css [skip ci]"
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF#refs/heads/}"
else

echo "No changes to commit"
fi
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

- run: npm ci

- run: npm run build:css
- run: npm run build

- run: npm publish
env:
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run build
4 changes: 3 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ articles:
default: cc_by_nc_sa # Default license, can be cc_by_nc_sa, cc_by_nd, cc_by_nc, cc_by_sa, cc_by, all_rights_reserved, public_domain
# Whether to enable lazyload for images
lazyload: true
# Pangu.js (automatically add space between Chinese and English). See https://github.com/vinta/pangu.js
pangu_js: false
# Article recommendation. Requires nodejieba (npm install nodejieba). Transplanted from hexo-theme-volantis.
recommendation:
# Whether to enable article recommendation
Expand Down Expand Up @@ -461,7 +463,7 @@ cdn:
# Whether to enable CDN
enable: false
# CDN Provider
provider: npmmirror # npmmirror, zstatic, sustech, cdnjs, jsdelivr, unpkg, custom
provider: npmmirror # npmmirror, zstatic, cdnjs, jsdelivr, unpkg, custom
# Custom CDN URL
# format example: https://cdn.custom.com/hexo-theme-redefine/${version}/source/${path}
# The ${path} must leads to the root of the "source" folder of the theme
Expand Down
92 changes: 92 additions & 0 deletions languages/fr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# ----------------------------------------
# Traduction du site
# ----------------------------------------
search: recherche...
toc: Sur cette page
prev: Précédent
next: Suivant
prev_posts: Articles précédents
next_posts: Articles suivants
page: Page %d
recent_posts: Articles récents
share: Partager
powered_by: "POWERED BY %s"
theme: THEME
rss_feed: Flux RSS
category: Catégorie
categories: Catégories
tag: Tag
tags: Tags
post: Post
posts: Posts
tagcloud: Nuage de tags
comment: Commentaire
comments: Commentaires
home: Accueil
archive: Archive
archives: Archives
top: TOP
sticky: Sticky
go-back-home: Retour à l'accueil

# ----------------------------------------
# Traduction du menu
# ----------------------------------------
about: À propos
changelog: Journal des modifications
links: Liens
link: Lien
friends: Amis
friend: Ami
timeline: Chronologie
shuoshuo: Shuoshuo

# ----------------------------------------
# Nombre de sites Web
# ----------------------------------------
site_uv: VISITEURS
site_pv: NOMBRE TOTAL DE PAGES VUES
read_more: Lire la suite
wordcount: Mots
min2read: Min
status: Status

# ----------------------------------------
# Pied de page
# ----------------------------------------
runtime: Blog en ligne depuis
days: Jours
hours: Hrs
minutes: Min
seconds: Sec
optimized_by: et Propulsé par Evan
rights: Tous droits réservés
site_posts: "%s posts au total"
site_wordcount: "%s mots au total"

# ----------------------------------------
# Post
# ----------------------------------------
copyright:
author: Auteur
title: Titre
link: Lien
create_time: Créé à
update_time: Mis à jour à
license_title: Licence
license_content: "Cette œuvre est sous licence %s."
all_rights_reserved: "Tous droits réservés à © %s"
public_domain: "Cette œuvre est dans le domaine public."

ago:
second: "Il y a %s secondes"
minute: "Il y a %s minutes"
hour: "Il y a %s heures"
day: "Il y a %s jours"
week: "Il y a %s semaines"
month: "Il y a %s mois"
year: "Il y a %s années"

create_time: Créé
update_time: Mis à jour
expired: "Ce message a été écrit il y a %s jours et son contenu peut être obsolète."
42 changes: 0 additions & 42 deletions layout/_partials/page-template.ejs

This file was deleted.

23 changes: 0 additions & 23 deletions layout/_widgets/essays.ejs

This file was deleted.

65 changes: 0 additions & 65 deletions layout/_widgets/friends-link.ejs

This file was deleted.

27 changes: 0 additions & 27 deletions layout/_widgets/local-search.ejs

This file was deleted.

27 changes: 0 additions & 27 deletions layout/_widgets/masonry.ejs

This file was deleted.

7 changes: 0 additions & 7 deletions layout/_widgets/paginator.ejs

This file was deleted.

17 changes: 0 additions & 17 deletions layout/_widgets/post-tools.ejs

This file was deleted.

Loading
Loading