This commit is contained in:
Elizabeth Cray 2025-04-22 17:49:23 -04:00
parent 82ffa4867a
commit 370e8d6e54
7 changed files with 167 additions and 511 deletions

290
README.md
View File

@ -1,289 +1,3 @@
<!-- markdownlint-disable-next-line --> # Elizabeth's Link Page
<div align="center">
<!-- markdownlint-disable-next-line -->
# linkyee - Your Own Link Pages
A fully customized, open-source LinkTree alternative deployed directly on GitHub Pages.
Inspired by Jekyllrb and LinkTree.
[![Automatic build](../../actions/workflows/build.yml/badge.svg)](../../actions/workflows/build.yml) [![pages-build-deployment](../../actions/workflows/pages/pages-build-deployment/badge.svg)](../../actions/workflows/pages/pages-build-deployment)
[**Live Demo**→](https://zhgchg.li/linkyee/)
![linkyee](https://github.com/user-attachments/assets/f6a1ac98-0f0f-485f-ae2a-9abb57a114d3)
</div>
[中文介紹](https://medium.com/zrealm-robotic-process-automation/linkyee-%E4%BD%BF%E7%94%A8-github-pages-%E5%BF%AB%E9%80%9F%E5%85%8D%E8%B2%BB%E5%BB%BA%E7%AB%8B%E5%80%8B%E4%BA%BA%E9%A1%9E-linktree-%E9%80%A3%E7%B5%90%E9%A0%81%E9%9D%A2-70aeddb1fd9b)
- [Features](https://github.com/ZhgChgLi/linkyee/edit/main/README.md#features)
- [Get Started Deploy on GitHub Pages](https://github.com/ZhgChgLi/linkyee/edit/main/README.md#get-started--deploy-on-github-pages)
- [Configuration & Customized & Automatic Redeployment](https://github.com/ZhgChgLi/linkyee/edit/main/README.md#configuration)
- [Custom Domain](https://en.zhgchg.li/posts/483af5d93297/)
## Features
- 100% Customized
- 100% Free
- Supports plugins and dynamic variable injection (e.g., displaying current Medium follower count, GitHub repo stars)
- Deployed directly on GitHub Pages
- SEO and performance optimization
- Theme switching and custom themes supported (the default theme is generated by ChatGPT :\))
### Buy me a coffee ❤️❤️❤️
<a href="https://www.buymeacoffee.com/zhgchgli" target="_blank"><img width="545" alt="bmc-button" src="https://github.com/user-attachments/assets/5983bfc9-27fd-49e0-a7f4-eb07657c6e31"></a>
[**If this project has helped you, please consider starring the repo, recommending it to your friends, or sponsoring me a cup of coffee. Thank you for your support!**](https://www.buymeacoffee.com/zhgchgli)
Feel free to open an issue or submit a fix/contribution via pull request. :)
## Get Started Deploy on GitHub Pages
### About Github Pages
> GitHub Pages is a free hosting service provided by GitHub, designed for creating and publishing websites directly from a GitHub repository. It allows developers, designers, and anyone with a GitHub account to host personal, project, or organizational websites without needing external hosting services. GitHub Pages works seamlessly with GitHub repositories, automatically generating a static website whenever new content is pushed.
#### Step 1. Click the “Use this template” button at the top-right corner of the [linkyee](https://github.com/ZhgChgLi/linkyee) Template Repo -> “Create a new repository”:
![image](https://github.com/user-attachments/assets/4b88da62-df4b-4f3b-a22c-e78b7527a92d)
#### Step 2. Check “Include all branches,” enter your desired GitHub Pages repo name, and click “Create repository” once finished:
![image](https://github.com/user-attachments/assets/d3611204-7507-41a1-8221-707200a3e269)
> The GitHub Pages repo name will affect the access URL. If you enter `your-username.github.io` as the Repo Name, that will be the direct URL to your GitHub Pages site.
> If you already have a `your-username.github.io` repo, the GitHub Pages URL will be `your-username.github.io/Repo-Name`.
#### Wait for the fork to complete. You might encounter deployment errors during the initial setup due to forked repo permission issues. Lets proceed with the steps to adjust this.
![image](https://github.com/user-attachments/assets/038fac9e-83eb-4f2f-ba9a-88712b4af022)
#### Step 4. Go to Settings -> Actions -> General, ensure the following options are selected:
![image](https://github.com/user-attachments/assets/6851c4e6-9466-4800-862f-e9e5e5b65b11)
- Actions permissions: `Allow all actions and reusable workflows`
- Workflow permissions: `Read and write permissions`
After selecting, click the Save button to save your changes.
#### Step 5. Go to Settings -> Pages and ensure the selected branch for GitHub Pages is set to “gh-pages”:
![image](https://github.com/user-attachments/assets/1802bc78-4615-4d29-b180-9c84f3fb8d6d)
> The message `Your site is live at: XXXX` above is your public GitHub Pages access URL.
#### Step 6. Go to Settings -> Actions and wait for the first deployment to complete:
![image](https://github.com/user-attachments/assets/e57336ef-2f35-4455-abc0-76dce07470ee)
#### Step 7. Access the GitHub Pages URL to ensure the fork was successful:
![image](https://github.com/user-attachments/assets/023c39f7-9351-4175-8c9f-5eb42e2ecdb9)
> Congratulations! Deployment successful. You can now modify the configuration files with your own data. 🎉🎉🎉
### Configuration
Edit The [config.yml](./config.yml) file located in the root directory.
```yaml
# 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:
# 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: >
Welcome to my website! 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>
```
#### Please note that after each files modification, you need to wait for GitHub Actions to complete the `Automatic build` and `pages build and deployment` tasks.
![image](https://github.com/user-attachments/assets/0ba637cc-3bb6-4458-a076-5f754c7429b3)
Refresh the page for the changes to take effect. 🚀
### Customized
#### Modify Default Theme
- `./themes/default/index.html`
- `./themes/default/styles.css`
- `./themes/default/scripts.js`
#### Create a New Theme
1. `./themes/YOUR_THEME`
2. Update `theme:YOUR_THEME` in `config.yml` file
> Yes, you can use GenAI tools like ChatGPT to help you create your own custom link pages!
#### Automatic Redeployment
By default, the project redeploys automatically once a day to refresh the values of plugin's dynamic variables. You can adjust the [cron](https://crontab.guru/#0_0_*_*_*) settings in [build.yml](../../actions/workflows/build.yml):
```
schedule:
- cron: '0 0 * * *' # Runs daily at midnight (00:00 UTC)
```
If you dont need scheduled redeployment, simply delete the schedule block.
## Custom Domain ❤️❤️❤️
You can set a custom GitHub Pages domain, such as my own: [https://link.zhgchg.li](https://link.zhgchg.li).
Follow [my tutorial for domain binding.](https://en.zhgchg.li/posts/483af5d93297/) If youd like, you can [purchase a domain through my Namecheap referral](https://namecheap.pxf.io/P0jdZQ) link—Ill earn a small commission, which will help me continue contributing to open-source projects.
---
## About
- [ZhgChg.Li](https://zhgchg.li/)
- [ZhgChgLi's Medium](https://blog.zhgchg.li/)
## Other works
### Swift Libraries
- [ZMarkupParser](https://github.com/ZhgChgLi/ZMarkupParser) is a pure-Swift library that helps you to convert HTML strings to NSAttributedString with customized style and tags.
- [ZPlayerCacher](https://github.com/ZhgChgLi/ZPlayerCacher) is a lightweight implementation of the AVAssetResourceLoaderDelegate protocol that enables AVPlayerItem to support caching streaming files.
### Integration Tools
- [XCFolder](https://github.com/ZhgChgLi/XCFolder) is a powerful command-line tool that converts Xcode virtual groups into actual directories, reorganizing your project structure to align with Xcode groups and enabling seamless integration with modern Xcode project generation tools like Tuist and XcodeGen.
- [ZReviewTender](https://github.com/ZhgChgLi/ZReviewTender) is a tool for fetching app reviews from the App Store and Google Play Console and integrating them into your workflow.
- [ZMediumToMarkdown](https://github.com/ZhgChgLi/ZMediumToMarkdown) is a powerful tool that allows you to effortlessly download and convert your Medium posts to Markdown format.
Built with [Linkyee](https://github.com/ZhgCH/Linkyee)

View File

@ -1,150 +1,26 @@
# Site Configuration # Site Config
# Theme, mapped to the directory: ./theme/xxxx
theme: default theme: default
# HTML Language setting
lang: "en" lang: "en"
# Plugins, implemented in ./plugins/PLUGIN_NAME title: "Elizabeth Cray"
# 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" avatar: "./images/profile.jpeg"
# Name section text name: "Elizabeth Cray"
name: "@zhgchgli"
# Tagline section text tagline: "Full-stack developer by day ☀️, analog photographer by night 🌒."
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: links:
- link: - link:
icon: "fa-brands fa-medium" icon: "fa-person"
text: "Tech Blog <span class='link-button-text'>({{vars.MediumFollowersCountPlugin}} Followers)</span>" text: "Pronouns Page"
url: "https://blog.zhgchg.li" url: "https://en.pronouns.page/@hackerLiz"
alt: "ZhgChgLi's Tech Blog" alt: "Elizabeth's pronoun and details page"
title: "ZhgChgLi's Tech Blog" title: "Elizabeth's Pronouns Profile"
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" target: "_blank"
footer: ""
# 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: > copyright: >
© 2024 <a href="https://zhgchg.li" target="_blank">ZhgChgLi</a>. Powered by <a href="https://github.com/ZhgChgLi/linkyee" target="_blank">linkyee</a> ©2025 Elizabeth Cray. Powered by <a href="https://github.com/ZhgChgLi/linkyee" target="_blank">linkyee</a>

150
default.config.yml Normal file
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>

View File

@ -3,7 +3,7 @@
set -eu # Exit on error or unset variable set -eu # Exit on error or unset variable
PAGES_BRANCH="gh-pages" PAGES_BRANCH="site"
SITE_DIR="_output" SITE_DIR="_output"
@ -56,8 +56,8 @@ flush() {
deploy() { deploy() {
# Configure Git user for the commit # Configure Git user for the commit
git config --global user.name "ZhgChgLiBot" git config --global user.name "Elizabeth Cray"
git config --global user.email "no-reply@zhgchg.li" git config --global user.email "liz@cray.lgbt"
# Reset the current HEAD to prepare for new commits # Reset the current HEAD to prepare for new commits
git update-ref -d HEAD git update-ref -d HEAD
@ -78,4 +78,4 @@ main() {
} }
# Execute the main function # Execute the main function
main main

View File

@ -1,44 +0,0 @@
require_relative 'Plugin'
require 'net/http'
require 'nokogiri'
require 'uri'
class GithubRepoStarsCountPlugin < Plugin
attr_reader :data, :repos
def initialize(data)
@data = data
repos = {}
data[0].each do |repo|
repos[repo] = 0
end
@repos = repos
end
def execute
repos.each do |repo, value|
repos[repo] = load_repo_stars(repo)
end
return repos
end
def load_repo_stars(repo)
uri = URI("https://github.com/#{repo}")
response = Net::HTTP.get_response(uri)
case response
when Net::HTTPSuccess then
document = Nokogiri::HTML(response.body)
stargazers_count_element = document.at('span#repo-stars-counter-star')
stargazers_count = stargazers_count_element&.text
return stargazers_count || 0
else
return 0
end
end
end

View File

@ -1,40 +0,0 @@
require_relative 'Plugin'
require 'net/http'
require 'nokogiri'
require 'uri'
class MediumFollowersCountPlugin < Plugin
attr_reader :data, :username
def initialize(data)
@data = data
@username = data[0]["username"]
end
def execute
return load_medium_followers("https://medium.com/@#{@username}")
end
def load_medium_followers(url, limit = 10)
return 0 if limit.zero?
uri = URI(url)
response = Net::HTTP.get_response(uri)
case response
when Net::HTTPSuccess then
document = Nokogiri::HTML(response.body)
follower_count_element = document.at('span.pw-follower-count > a')
follower_count = follower_count_element&.text&.split(' ')&.first
return follower_count || 0
when Net::HTTPRedirection then
location = response['location']
return load_medium_followers(location, limit - 1)
else
return 0
end
end
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 59 KiB