Compare commits

..

62 Commits

Author SHA1 Message Date
Elizabeth Cray 9cf23740c8 Favicon 2025-04-22 20:58:22 -04:00
Elizabeth Cray a0a4ac32bf Filled out links 2025-04-22 20:55:05 -04:00
Elizabeth Cray a53f154c04 Update to run outside of gh-actions 2025-04-22 18:13:19 -04:00
Elizabeth Cray 370e8d6e54 WIP 2025-04-22 17:49:23 -04:00
ZhgChgLiBot 82ffa4867a Merge branch 'main' of github.com:ZhgChgLi/linkyee 2025-03-22 22:01:18 +08:00
ZhgChgLiBot 3e5b3f4dc5 update ga id setting 2025-03-22 22:01:06 +08:00
ZhgChgLi 1e283d0410 Update build.yml 2025-03-22 20:52:31 +08:00
ZhgChgLiBot d5bd16cb26 upgrade ruby version 2025-03-22 20:50:38 +08:00
ZhgChgLi 693b0d2bb7 Update README.md 2025-03-04 21:48:42 +08:00
ZhgChgLiBot 1b19ce110e add last_modified_at meta for http refresh cache 2024-11-24 20:59:04 +08:00
ZhgChgLiBot 3e16491a61 update head html 2024-10-27 22:16:29 +08:00
ZhgChgLi 40504349c2 Update README.md 2024-10-27 21:56:41 +08:00
ZhgChgLi 75c1c936b4 Update README.md 2024-10-27 21:55:25 +08:00
ZhgChgLi 8ff994f592 Update README.md 2024-10-27 21:54:20 +08:00
ZhgChgLi 284802d697 Update README.md 2024-10-27 21:51:53 +08:00
ZhgChgLi 6bdd98694c Update index.html 2024-10-27 21:42:08 +08:00
ZhgChgLi 48e1ad4d41 Update index.html 2024-10-27 21:41:53 +08:00
ZhgChgLi d66d8afc79 Update config.yml 2024-10-27 21:40:35 +08:00
ZhgChgLiBot a933faae9d delete _output 2024-10-27 21:34:04 +08:00
ZhgChgLiBot 4d8c9e3dc2 update script 2024-10-27 21:33:32 +08:00
ZhgChgLiBot 89e840ea75 update deply.sh 2024-10-27 21:29:01 +08:00
ZhgChgLiBot f1540a002b update deploy.sh 2024-10-27 21:24:25 +08:00
ZhgChgLiBot 9af1145a69 update deploy.sh 2024-10-27 21:22:01 +08:00
ZhgChgLiBot b6db57caf4 udpate deploy.sh 2024-10-27 21:19:48 +08:00
ZhgChgLiBot 76d507409a udpate deploy.sh 2024-10-27 21:16:30 +08:00
ZhgChgLiBot 103dd5c136 update deploy.sh 2024-10-27 21:15:25 +08:00
app-harry 44d3849379 update deploy.sh 2024-10-27 21:00:28 +08:00
app-harry 19caf1ac5b update deploy.sh 2024-10-27 20:56:50 +08:00
app-harry 0e9122c1cc update deploy.sh 2024-10-27 20:56:05 +08:00
app-harry 485d30ba69 update deploy.sh 2024-10-27 20:52:13 +08:00
app-harry 96ef4c7b7c update deploy.sh 2024-10-27 20:50:52 +08:00
app-harry 7a0f43e965 update deploy.sh 2024-10-27 20:48:10 +08:00
ZhgChgLi 1e6a1f2139 Update README.md 2024-10-27 18:31:11 +08:00
app-harry 1ac5a3b7a1 Merge branch 'main' of github.com:ZhgChgLi/linkyee 2024-10-27 18:28:12 +08:00
app-harry 87b42a0eb8 update script 2024-10-27 18:28:07 +08:00
ZhgChgLi e09748382e Update README.md 2024-10-27 11:24:43 +08:00
app-harry 8492c8a596 update setting 2024-10-27 11:23:03 +08:00
ZhgChgLi e4a0dfe229 Update README.md 2024-10-27 11:07:18 +08:00
ZhgChgLi ec04c3f7bb Update build.yml 2024-10-27 11:02:19 +08:00
app-harry 090e34e2f4 update style and scripts 2024-10-27 10:55:32 +08:00
ZhgChgLi 760a2d892b Create AUTO_GEN_FOLDER_DO_NOT_EDIT_FILE_HERE 2024-10-27 10:49:32 +08:00
ZhgChgLi c3c0b68ac8 Update scaffold.rb 2024-10-27 10:48:59 +08:00
ZhgChgLi 9b956ee6e5 Update README.md 2024-10-27 10:45:55 +08:00
ZhgChgLi 0b2d0d1159 Update config.yml 2024-10-27 10:45:06 +08:00
ZhgChgLi 257698a8d1 Update README.md 2024-10-27 10:44:06 +08:00
ZhgChgLi 4561091757 Create FUNDING.yml 2024-10-27 10:40:57 +08:00
ZhgChgLi 31a1ab2084 Create LICENSE 2024-10-27 10:39:27 +08:00
ZhgChgLi 76adf5e18e Update README.md 2024-10-27 10:35:49 +08:00
ZhgChgLi 5d0a7362e4 Update README.md 2024-10-27 01:27:26 +08:00
ZhgChgLi cddb2129eb Update README.md 2024-10-27 01:20:42 +08:00
app-harry 0919080f39 update config 2024-10-27 01:18:21 +08:00
app-harry d7603d4fb8 remove rake 2024-10-27 00:57:55 +08:00
ZhgChgLi e6d7be0373 Update README.md 2024-10-27 00:57:02 +08:00
ZhgChgLi c164e0c76e Update README.md 2024-10-27 00:38:09 +08:00
app-harry 0f8ad2ba20 update deploy.sh 2024-10-27 00:08:48 +08:00
app-harry d33fcf26c9 update deploy.sh 2024-10-27 00:04:58 +08:00
app-harry 14132502af Merge branch 'main' of github.com:ZhgChgLi/linkyee 2024-10-27 00:02:33 +08:00
app-harry 7c68898bf2 update deploy.sh 2024-10-27 00:02:12 +08:00
ZhgChgLi afd0ceac73 Create build.yml 2024-10-27 00:00:36 +08:00
app-harry 129c395823 update deploy.sh 2024-10-26 23:59:10 +08:00
app-harry be2a1b0d42 init commit 2024-10-26 23:40:47 +08:00
ZhgChgLi 81619da270 Initial commit 2024-10-24 22:07:30 +08:00
2172 changed files with 616 additions and 114 deletions
Vendored
BIN
View File
Binary file not shown.
+3
View File
@@ -0,0 +1,3 @@
# These are supported funding model platforms
buy_me_a_coffee: zhgchgli
+32
View File
@@ -0,0 +1,32 @@
name: 'Automatic build'
on:
push:
branches:
- main
paths-ignore:
- .gitignore
- README.md
- LICENSE
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight (00:00 UTC)
jobs:
continuous-delivery:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.2
bundler-cache: true
- name: Deploy
run: bash deploy.sh
+3
View File
@@ -0,0 +1,3 @@
_output
!/_output/AUTO_GEN_FOLDER_DO_NOT_EDIT_FILE_HERE
.DS_Store
+1
View File
@@ -0,0 +1 @@
3.4.2
+7
View File
@@ -0,0 +1,7 @@
source 'https://rubygems.org'
gem 'bigdecimal'
gem 'base64'
gem 'yaml', '~> 0.3'
gem 'liquid', '~> 5.5'
gem 'nokogiri', '>= 1.18.4'
+25
View File
@@ -0,0 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
base64 (0.2.0)
bigdecimal (3.1.9)
liquid (5.5.1)
mini_portile2 (2.8.7)
nokogiri (1.18.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
racc (1.8.1)
yaml (0.3.0)
PLATFORMS
ruby
DEPENDENCIES
base64
bigdecimal
liquid (~> 5.5)
nokogiri (>= 1.18.4)
yaml (~> 0.3)
BUNDLED WITH
2.6.6
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 ZhgChgLi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+3
View File
@@ -0,0 +1,3 @@
# Elizabeth's Link Page
Built with [Linkyee](https://github.com/ZhgCH/Linkyee)
@@ -0,0 +1 @@
The files in this folder (./_output) are auto-generated. Do not edit any files here.
+86
View File
@@ -0,0 +1,86 @@
# Site Config
theme: default
lang: "en"
title: "Elizabeth Cray"
avatar: "./images/profile.jpeg"
name: "Elizabeth Cray"
tagline: "Full-stack developer by day, analog photographer by night."
links:
- link:
icon: "fa-solid fa-person"
text: "Pronouns Page"
url: "https://en.pronouns.page/@hackerLiz"
alt: "Elizabeth's pronoun and details page"
title: "Elizabeth's Pronouns Profile"
target: "_blank"
- link:
icon: "fa-brands fa-bluesky"
text: "Bluesky"
url: "https://bsky.app/profile/cray.gay"
alt: "Elizabeth's Bluesky profile"
title: "Bluesky Profile"
target: "_blank"
- link:
icon: "fa-brands fa-linkedin"
text: "Linkedin"
url: "https://linkedin.com/in/lizcray"
alt: "Elizabeth's Linkedin"
title: "Elizabeth's Linkedin"
target: "_blank"
- link:
icon: "fa-brands fa-mastodon"
text: "Mastodon"
url: "https://masto.hackers.town/@liz"
alt: "Elizabeth's Hackers Town Mastodon Profile"
title: "Elizabeth's Mastodon"
target: "_blank"
- link:
icon: "fa-brands fa-discord"
text: "Discord"
url: "https://discord.com/channels/@me/172886870110371849"
alt: "Elizabeth's Discord Account"
title: "Elizabeth's Discord"
target: "_blank"
- link:
icon: "fa-brands fa-git-alt"
text: "Git"
url: "https://git.corrupt.link/liz"
alt: "Elizabeth's Gitea Page"
title: "Elizabeth's Gitea"
target: "_blank"
- link:
icon: "fa-solid fa-shuttle-space"
text: "Gemini Blog"
url: "gemini://gemini.hackers.town/liz/"
alt: "Elizabeth's Gemini Blog"
title: "Elizabeth's Gemini Blog"
target: "_blank"
- link:
icon: "fa-solid fa-envelope"
text: "Email"
url: "mailto:liz@corrupt.link"
alt: "Elizabeth's email"
title: "Elizabeth's email"
target: ""
- link:
icon: "fa-solid fa-briefcase"
text: "Resume"
url: "https://corrupt.link/pub/Resume.pdf"
alt: "Elizabeth's Resume PDF"
title: "Elizabeth's Resume"
target: "_blank"
# Todo: Image Gallery
footer: ""
copyright: >
©2025 Elizabeth Cray. Powered by <a href="https://github.com/ZhgChgLi/linkyee" target="_blank">linkyee</a>
+150
View File
@@ -0,0 +1,150 @@
# Site Configuration
# Theme, mapped to the directory: ./theme/xxxx
theme: default
# HTML Language setting
lang: "en"
# Plugins, implemented in ./plugins/PLUGIN_NAME
# Use {{ vars.PLUGIN_NAME }} in the settings below
# The output of the plugin can be used below, e.g., {{vars.MediumFollowersCountPlugin}}
plugins:
# Automatically fetch Medium follower count
- MediumFollowersCountPlugin:
username: zhgchgli
# Automatically fetch Github repo star count
- GithubRepoStarsCountPlugin:
- ZhgChgLi/ZMarkupParser
- ZhgChgLi/ZReviewTender
- ZhgChgLi/ZMediumToMarkdown
- ZhgChgLi/linkyee
# Google Analytics tracking id
google_analytics_id:
# HTML Title
title: "ZhgChgLi's Links"
# Avatar image path
avatar: "./images/profile.jpeg"
# Name section text
name: "@zhgchgli"
# Tagline section text
tagline: >-
An iOS, web, and automation developer from Taiwan 🇹🇼 who also loves sharing, traveling, and writing.
# List of links
# icon: Use Font Awesome icons (https://fontawesome.com/search?o=r&m=free)
# text: The displayed text for the link
# title: The url title
# url: The URL of the link
# alt: Alternative text for accessibility
# target: `_blank` opens in a new tab, `_self` opens in the same frame
links:
- link:
icon: "fa-brands fa-medium"
text: "Tech Blog <span class='link-button-text'>({{vars.MediumFollowersCountPlugin}} Followers)</span>"
url: "https://blog.zhgchg.li"
alt: "ZhgChgLi's Tech Blog"
title: "ZhgChgLi's Tech Blog"
target: "_blank"
- link:
icon: "fa-brands fa-medium"
text: "Travelog <span class='link-button-text'>({{vars.MediumFollowersCountPlugin}} Followers)</span>"
url: "https://medium.com/ztravel"
alt: "ZhgChgLi's Travelog"
title: "ZhgChgLi's Travelog"
target: "_blank"
- link:
icon: "fa-solid fa-rss"
text: "Website"
url: "https://zhgchg.li/"
alt: "ZhgChgLi's Website"
title: "ZhgChgLi's Website"
target: "_blank"
- link:
icon: "fa-brands fa-swift"
text: "ZMarkupParser <span class='link-button-text'>({{vars.GithubRepoStarsCountPlugin['ZhgChgLi/ZMarkupParser']}} Stars)</span>"
url: "https://github.com/ZhgChgLi/ZMarkupParser"
alt: "ZMarkupParser is a pure-Swift library that helps you to convert HTML strings to NSAttributedString with customized style and tags."
title: "ZMarkupParser is a pure-Swift library that helps you to convert HTML strings to NSAttributedString with customized style and tags."
target: "_blank"
- link:
icon: "fa-brands fa-app-store-ios"
text: "ZReviewTender <span class='link-button-text'>({{vars.GithubRepoStarsCountPlugin['ZhgChgLi/ZReviewTender']}} Stars)</span>"
url: "https://github.com/ZhgChgLi/ZReviewTender"
alt: "ZReviewTender is a tool for fetching app reviews from the App Store and Google Play Console and integrating them into your workflow."
title: "ZReviewTender is a tool for fetching app reviews from the App Store and Google Play Console and integrating them into your workflow."
target: "_blank"
- link:
icon: "fa-brands fa-markdown"
text: "ZMediumToMarkdown <span class='link-button-text'>({{vars.GithubRepoStarsCountPlugin['ZhgChgLi/ZMediumToMarkdown']}} Stars)</span>"
url: "https://github.com/ZhgChgLi/ZMediumToMarkdown"
alt: "ZMediumToMarkdown is a powerful tool that allows you to effortlessly download and convert your Medium posts to Markdown format."
title: "ZMediumToMarkdown is a powerful tool that allows you to effortlessly download and convert your Medium posts to Markdown format."
target: "_blank"
- link:
icon: "fa-brands fa-github"
text: "linkyee <span class='link-button-text'>({{vars.GithubRepoStarsCountPlugin['ZhgChgLi/linkyee']}} Stars)</span>"
url: "https://github.com/ZhgChgLi/linkyee"
alt: "linkyee is a fully customized, open-source LinkTree alternative deployed directly on GitHub Pages."
title: "linkyee is a fully customized, open-source LinkTree alternative deployed directly on GitHub Pages."
target: "_blank"
# List of social media links
# icon: Use Font Awesome icons (https://fontawesome.com/search?o=r&m=free)
# title: The url title
# url: The URL of the social media link
# alt: Alternative text for accessibility
# target: _blank opens in a new tab, _self opens in the same frame
socials:
- social:
icon: "fa-brands fa-medium"
url: "https://blog.zhgchg.li"
title: "ZhgChgLi's Medium"
alt: "ZhgChgLi's Medium"
target: "_blank"
- social:
icon: "fa-brands fa-github"
url: "https://github.com/ZhgChgLi"
title: "ZhgChgLi's GitHub"
alt: "ZhgChgLi's GitHub"
target: "_blank"
- social:
icon: "fa-brands fa-twitter"
url: "https://twitter.com/zhgchgli"
title: "ZhgChgLi's Twitter"
alt: "ZhgChgLi's Twitter"
target: "_blank"
- social:
icon: "fa-brands fa-linkedin"
url: "https://www.linkedin.com/in/zhgchgli/"
title: "ZhgChgLi's LinkedIn"
alt: "ZhgChgLi's LinkedIn"
target: "_blank"
- social:
icon: "fa-brands fa-instagram"
url: "https://www.instagram.com/zhgchgli/"
title: "Instagram"
alt: "ZhgChgLi's Instagram"
target: "_blank"
- social:
icon: "fa-solid fa-envelope"
url: "mailto:zhgchgli@gmail.com"
title: "Email: zhgchgli@gmail.com"
alt: "zhgchgli@gmail.com"
target: "_blank"
# Footer text
footer: >
Hi there! Follow me on Medium or GitHub, or stay connected on Instagram or LinkedIn.
# Footer copyright message
# Linkyee is a 100% free, open-source project—feel free to modify the copyright message as you like. :)
copyright: >
© 2024 <a href="https://zhgchg.li" target="_blank">ZhgChgLi</a>. Powered by <a href="https://github.com/ZhgChgLi/linkyee" target="_blank">linkyee</a>
Executable
+83
View File
@@ -0,0 +1,83 @@
#!/usr/bin/env bash
# ref: https://github.com/jekyll/jekyll
set -eu # Exit on error or unset variable
PAGES_BRANCH="site"
SITE_DIR="_output"
_backup_dir="$(mktemp -d)"
DATE_STAMP=$(date +"%Y-%m-%d %H:%M:%S")
init() {
echo "Initializing..."
}
build() {
# clean
if [[ -d $SITE_DIR ]]; then
rm -rf "$SITE_DIR"
fi
# Run the Ruby script to generate the output
bundle exec ruby "./scaffold.rb"
}
setup_gh() {
if [[ -z $(git branch -av | grep "$PAGES_BRANCH") ]]; then
git checkout -b "$PAGES_BRANCH"
else
git checkout "$PAGES_BRANCH"
fi
}
backup() {
mv "$SITE_DIR"/* "$_backup_dir"
mv .git "$_backup_dir"
if [[ -f CNAME ]]; then
mv CNAME "$_backup_dir"
fi
}
flush() {
rm -rf ./*
rm -rf .[^.] .??*
shopt -s dotglob nullglob
mv "$_backup_dir"/* .
}
deploy() {
# Configure Git user for the commit
git config --global user.name "Elizabeth Cray"
git config --global user.email "liz@cray.lgbt"
# Reset the current HEAD to prepare for new commits
git update-ref -d HEAD
git add -A
git commit -m "[Automation] Site update: ${DATE_STAMP}"
# Push the new branch to the remote repository
git push -u origin "$PAGES_BRANCH" --force
}
reset() {
git checkout main
}
main() {
init
build
setup_gh
backup
flush
deploy
reset
}
# Execute the main function
main
-114
View File
@@ -1,114 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Elizabeth Cray</title>
<meta charset="UTF-8">
<meta name="last-modified" content="2025-11-23T16:33:11-0500">
<meta name="theme-color" media="(prefers-color-scheme: light)" content="#f7f7f7">
<meta name="theme-color" media="(prefers-color-scheme: dark)" content="#1b1b1e">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta
name="viewport"
content="width=device-width, user-scalable=no initial-scale=1, shrink-to-fit=no, viewport-fit=cover"
>
<meta property="og:title" content="Elizabeth Cray" />
<meta name="author" content="Elizabeth Cray" />
<meta property="og:locale" content="en" />
<meta name="description" content="Full-stack developer by day, analog photographer by night." />
<meta property="og:description" content="Full-stack developer by day, analog photographer by night." />
<meta property="og:site_name" content="Elizabeth Cray" />
<meta property="og:image" content="./images/profile.jpeg" />
<meta property="og:type" content="article" />
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:image" content="./images/profile.jpeg" />
<meta property="twitter:title" content="Elizabeth Cray" />
<link rel="apple-touch-icon" sizes="180x180" href="./images/favicons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./images/favicons/favicon-16x16.png">
<link rel="manifest" href="./images/favicons/site.webmanifest">
<link rel="shortcut icon" href="./images/favicons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Elizabeth Cray">
<meta name="application-name" content="Elizabeth Cray">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="./images/favicons/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="./styles.css" />
</head>
<body>
<div class="container">
<div class="profile">
<img src="./images/profile.jpeg" alt="Profile Picture" class="profile-pic" />
<h1 class="name">Elizabeth Cray</h1>
<p class="description">Full-stack developer by day, analog photographer by night.</p>
</div>
<div class="links">
<a href="https://bsky.app/profile/cray.gay" target="_blank" class="link-button" alt="Elizabeth's Bluesky profile" title="Bluesky Profile">
<i class="fa-brands fa-bluesky"></i> Bluesky
</a>
<a href="https://linkedin.com/in/lizcray" target="_blank" class="link-button" alt="Elizabeth's Linkedin" title="Elizabeth's Linkedin">
<i class="fa-brands fa-linkedin"></i> Linkedin
</a>
<a href="https://masto.hackers.town/@liz" target="_blank" class="link-button" alt="Elizabeth's Hackers Town Mastodon Profile" title="Elizabeth's Mastodon">
<i class="fa-brands fa-mastodon"></i> Mastodon
</a>
<a href="https://discord.com/channels/@me/172886870110371849" target="_blank" class="link-button" alt="Elizabeth's Discord Account" title="Elizabeth's Discord">
<i class="fa-brands fa-discord"></i> Discord
</a>
<a href="https://git.corrupt.link/liz" target="_blank" class="link-button" alt="Elizabeth's Gitea Page" title="Elizabeth's Gitea">
<i class="fa-brands fa-git-alt"></i> Git
</a>
<a href="gemini://gemini.hackers.town/liz/" target="_blank" class="link-button" alt="Elizabeth's Gemini Blog" title="Elizabeth's Gemini Blog">
<i class="fa-solid fa-shuttle-space"></i> Gemini Blog
</a>
<a href="mailto:liz@corrupt.link" target="" class="link-button" alt="Elizabeth's email" title="Elizabeth's email">
<i class="fa-solid fa-envelope"></i> Email
</a>
<a href="https://corrupt.link/pub/Resume.pdf" target="_blank" class="link-button" alt="Elizabeth's Resume PDF" title="Elizabeth's Resume">
<i class="fa-solid fa-briefcase"></i> Resume
</a>
</div>
<div class="button-container">
<div class="button-group">
</div>
</div>
<footer class="footer">
<div class="copyright">©2025 Elizabeth Cray. Powered by <a href="https://github.com/ZhgChgLi/linkyee" target="_blank">linkyee</a>
</div>
</footer>
</div>
<script src="fontawesome/js/all.js" data-auto-replace-svg="nest"></script>
<script src="https://livejs.com/live.js"></script>
<script src="./scripts.js"></script>
</body>
</html>
+11
View File
@@ -0,0 +1,11 @@
class Plugin
attr_reader :data
def initialize(data)
@data = data
end
def execute
end
end
+98
View File
@@ -0,0 +1,98 @@
require 'fileutils'
require 'liquid'
require 'yaml'
if File.exist?("config.yml")
config = YAML.load_file("config.yml")
else
raise "Error: config.yml not found."
end
settings = YAML.load_file("config.yml") || {}
#
source_dir = "./themes/#{settings["theme"] || "default"}"
destination_dir = "./_output/"
# Clean _output folder
if Dir.exist?(destination_dir)
Dir.foreach(destination_dir) do |file|
next if file == '.' || file == '..' || file == 'AUTO_GEN_FOLDER_DO_NOT_EDIT_FILE_HERE'
file_path = File.join(destination_dir, file)
if File.file?(file_path)
FileUtils.rm(file_path)
end
end
else
FileUtils.mkdir_p(destination_dir)
end
# Copy all files and directories while preserving the structure
Dir.glob("#{source_dir}/**/*").each do |entry|
relative_path = entry.sub("#{source_dir}/", '')
new_location = File.join(destination_dir, relative_path)
if File.directory?(entry)
FileUtils.mkdir_p(new_location)
else
FileUtils.cp(entry, new_location)
end
end
template_file = "#{destination_dir}/index.html"
if !File.exist?(template_file)
raise "Error: #{template_file} file not found."
end
template_content = File.read(template_file)
settings["vars"] = {}
if !settings["plugins"].nil?
settings["plugins"].each do |plugin|
pluginFileName = plugin.keys[0]
if File.exist?("./plugins/#{pluginFileName}.rb")
require_relative "./plugins/#{pluginFileName}.rb"
pluginObject = Object.const_get(pluginFileName).new(plugin.values)
settings["vars"][pluginFileName] = pluginObject.execute()
end
end
end
if !settings["links"].nil?
settings["links"].each_with_index do |link, index|
settings["links"][index]["link"]["icon"] = Liquid::Template.parse(settings["links"][index]["link"]["icon"]).render(settings)
settings["links"][index]["link"]["url"] = Liquid::Template.parse(settings["links"][index]["link"]["url"]).render(settings)
settings["links"][index]["link"]["alt"] = Liquid::Template.parse(settings["links"][index]["link"]["alt"]).render(settings)
settings["links"][index]["link"]["title"] = Liquid::Template.parse(settings["links"][index]["link"]["title"]).render(settings)
settings["links"][index]["link"]["text"] = Liquid::Template.parse(settings["links"][index]["link"]["text"]).render(settings)
end
end
if !settings["socials"].nil?
settings["socials"].each_with_index do |link, index|
settings["socials"][index]["social"]["icon"] = Liquid::Template.parse(settings["socials"][index]["social"]["icon"]).render(settings)
settings["socials"][index]["social"]["url"] = Liquid::Template.parse(settings["socials"][index]["social"]["url"]).render(settings)
settings["socials"][index]["social"]["alt"] = Liquid::Template.parse(settings["socials"][index]["social"]["alt"]).render(settings)
settings["socials"][index]["social"]["title"] = Liquid::Template.parse(settings["socials"][index]["social"]["title"]).render(settings)
end
end
settings["title"] = Liquid::Template.parse(settings["title"]).render(settings)
settings["footer"] = Liquid::Template.parse(settings["footer"]).render(settings)
settings["tagline"] = Liquid::Template.parse(settings["tagline"]).render(settings)
settings["name"] = Liquid::Template.parse(settings["name"]).render(settings)
settings["last_modified_at"] = Time.now.strftime("%Y-%m-%dT%H:%M:%S%z")
# Parse the Liquid template
liquid_template = Liquid::Template.parse(template_content)
rendered_content = liquid_template.render(settings)
File.open(template_file, 'w') do |file|
file.write(rendered_content)
end
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 496 KiB

After

Width:  |  Height:  |  Size: 496 KiB

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 115 KiB

Before

Width:  |  Height:  |  Size: 870 KiB

After

Width:  |  Height:  |  Size: 870 KiB

Some files were not shown because too many files have changed in this diff Show More