mirror of
https://github.com/tiennm99/blog.git
synced 2026-10-11 03:13:10 +00:00
refactor(projects): rename the demo list identifiers to match the page
This commit is contained in:
1 parent
2b6ba57f47
commit
26e2ff3721
3 files changed
+15
-15
No files matched your search
@@ -62,11 +62,11 @@ export function renderStarred(repos) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Repos that have a clickable URL, by name.
|
||||
* Repos with a live demo URL.
|
||||
* @param {import("./github-api.mjs").Repo[]} repos
|
||||
* @returns {string[]}
|
||||
*/
|
||||
export function renderLinked(repos) {
|
||||
export function renderDemo(repos) {
|
||||
const rows = repos.map((r) => [
|
||||
`[${r.nameWithOwner}](${r.htmlUrl})`,
|
||||
cell(r.description),
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
//
|
||||
// 1. Starred — public repos I own (personal account or an org I administer)
|
||||
// with at least one star, by stars then most recent push.
|
||||
// 2. Linked — public repos I own that have a clickable URL (homepage or
|
||||
// GitHub Pages), no star requirement, by most recent push.
|
||||
// May overlap list 1.
|
||||
// 2. Demo — public repos I own with a live URL (homepage or GitHub
|
||||
// Pages), no star requirement, by most recent push. May
|
||||
// overlap list 1.
|
||||
// 3. Contributed — public repos owned by someone else, by how many of my pull
|
||||
// requests were merged there, then most recent push.
|
||||
//
|
||||
// Forks are excluded from lists 1 and 2: their homepage belongs to upstream,
|
||||
// Forks are excluded from the two owned lists: their homepage belongs to upstream,
|
||||
// not to me. Private repos are excluded everywhere — the page is public.
|
||||
|
||||
import fs from "node:fs/promises";
|
||||
@@ -19,7 +19,7 @@ import { GitHubProjects } from "./lib/github-api.mjs";
|
||||
import {
|
||||
injectBlock,
|
||||
renderContributed,
|
||||
renderLinked,
|
||||
renderDemo,
|
||||
renderStarred,
|
||||
resolveUrl,
|
||||
} from "./lib/render-projects.mjs";
|
||||
@@ -55,7 +55,7 @@ async function main() {
|
||||
.filter((r) => r.stars > 0)
|
||||
.sort((a, b) => b.stars - a.stars || byRecentPush(a, b));
|
||||
|
||||
const linked = mine.filter((r) => resolveUrl(r) !== "").sort(byRecentPush);
|
||||
const demo = mine.filter((r) => resolveUrl(r) !== "").sort(byRecentPush);
|
||||
|
||||
const contributed = contributions
|
||||
.filter((c) => !ownedLogins.has(c.repo.owner.toLowerCase()))
|
||||
@@ -64,10 +64,10 @@ async function main() {
|
||||
const file = path.resolve(PAGE);
|
||||
const current = await fs.readFile(file, "utf8");
|
||||
let next = injectBlock(current, "PROJECTS_STARRED", renderStarred(starred));
|
||||
next = injectBlock(next, "PROJECTS_LINKED", renderLinked(linked));
|
||||
next = injectBlock(next, "PROJECTS_DEMO", renderDemo(demo));
|
||||
next = injectBlock(next, "PROJECTS_CONTRIBUTED", renderContributed(contributed));
|
||||
|
||||
const summary = `${starred.length} starred, ${linked.length} linked, ${contributed.length} contributed`;
|
||||
const summary = `${starred.length} starred, ${demo.length} demo, ${contributed.length} contributed`;
|
||||
if (next === current) {
|
||||
console.log(`No changes (${summary}).`);
|
||||
return;
|
||||
|
||||
@@ -40,7 +40,7 @@ Vài có URL để bấm vào xem trực tiếp (demo). URL có thể là:
|
||||
- Telegram bot ([t.me/...](https://t.me/))
|
||||
- Custom domain, hoặc một số hình thức deploy khác
|
||||
|
||||
<!-- PROJECTS_LINKED_START -->
|
||||
<!-- PROJECTS_DEMO_START -->
|
||||
|
||||
| Name | Description | URL |
|
||||
| --- | --- | --- |
|
||||
@@ -101,7 +101,7 @@ Vài có URL để bấm vào xem trực tiếp (demo). URL có thể là:
|
||||
| [tiennm99/tn1](https://github.com/tiennm99/tn1) | Hugo photo gallery site built on the Gallery Deluxe module | [https://tiennm99.github.io/tn1/](https://tiennm99.github.io/tn1/) |
|
||||
| [survival2d/survival2d.github.io](https://github.com/survival2d/survival2d.github.io) | Repo to deploy client to GitHub Pages | [https://survival2d.github.io/](https://survival2d.github.io/) |
|
||||
|
||||
<!-- PROJECTS_LINKED_END -->
|
||||
<!-- PROJECTS_DEMO_END -->
|
||||
|
||||
## Project đã đóng góp
|
||||
|
||||
@@ -115,14 +115,14 @@ Project của người khác/tổ chức khác mà mình gửi PR và được m
|
||||
| [is-a-dev/register](https://github.com/is-a-dev/register) | Grab your own sweet-looking '.is-a.dev' subdomain. | 4 | 11323 |
|
||||
| [is-a-good-dev/register](https://github.com/is-a-good-dev/register) | Register for your is-a-good.dev domain! | 4 | 620 |
|
||||
| [open-domains/register](https://github.com/open-domains/register) | Free subdomains for personal sites, open-source projects, and more. | 4 | 2601 |
|
||||
| [coollabsio/coolify](https://github.com/coollabsio/coolify) | An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers. | 3 | 61966 |
|
||||
| [coollabsio/coolify](https://github.com/coollabsio/coolify) | An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers. | 3 | 61968 |
|
||||
| [tarampampam/domains](https://github.com/tarampampam/domains) | 🌐 DNS configuration for some of my domains | 3 | 807 |
|
||||
| [zfoo-project/zfoo](https://github.com/zfoo-project/zfoo) | 💡Extremely fast enterprise server framework, can be used in RPC, game server, web server. | 3 | 2014 |
|
||||
| [old-free-domains/register](https://github.com/old-free-domains/register) | Free subdomains for personal sites, open-source projects, and more. | 2 | 598 |
|
||||
| [onyx-dot-app/documentation](https://github.com/onyx-dot-app/documentation) | Documentation for the Onyx Software | 1 | 33 |
|
||||
| [oraios/serena](https://github.com/oraios/serena) | A powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent | 1 | 29548 |
|
||||
| [oraios/serena](https://github.com/oraios/serena) | A powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent | 1 | 29550 |
|
||||
| [sirmalloc/ccstatusline](https://github.com/sirmalloc/ccstatusline) | 🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more. | 1 | 12930 |
|
||||
| [ripienaar/free-for-dev](https://github.com/ripienaar/free-for-dev) | A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev | 1 | 137712 |
|
||||
| [ripienaar/free-for-dev](https://github.com/ripienaar/free-for-dev) | A list of SaaS, PaaS and IaaS offerings that have free tiers of interest to devops and infradev | 1 | 137711 |
|
||||
| [Bogdanp/awesome-advent-of-code](https://github.com/Bogdanp/awesome-advent-of-code) | A collection of awesome resources related to the yearly Advent of Code challenge. | 1 | 3225 |
|
||||
| [kaitranntt/ccs](https://github.com/kaitranntt/ccs) | Switch between Claude accounts, Gemini, Copilot, OpenRouter (300+ models) via CLIProxyAPI OAuth proxy. Visual dashboard, remote proxy support, WebSearch fallback. Zero-config to production-ready. | 1 | 2856 |
|
||||
| [projectlombok/lombok](https://github.com/projectlombok/lombok) | Very spicy additions to the Java programming language. | 1 | 13484 |
|
||||
|
||||
Reference in new issue
Block a user