Skip to content

Commit

Permalink
Merge pull request #5 from PaiJi/fix-image-url
Browse files Browse the repository at this point in the history
fix: fix image url path
  • Loading branch information
PaiJi authored May 19, 2024
2 parents e91185e + fcfe61c commit 24fec0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/assets/themes.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{
"themeTitle": "Illinois",
"themeDescription": "NetNewsWire plus a little bit of classic macOS.",
"themeThumbs": ["NetNewsWire-themes-collection/images/themes/illinois/illinois-mac.png"],
"themeThumbs": ["/NetNewsWire-themes-collection/images/themes/illinois/illinois-mac.png"],
"themeRepo": "https://github.com/stuartbreckenridge/Illinois",
"themeAuthor": {
"name": "stuartbreckenridge",
Expand Down Expand Up @@ -112,7 +112,7 @@
{
"themeTitle": "Minutes for NetNewsWire",
"themeDescription": "Inspired by Simone Silvestroni's site, Minutes uses Seravek for headings and Iowan Old Style for body text.Based on the default theme for NetNewsWire. Font size has been bumped up 2px on macOS to bring the font size in line with Safari's reader view when using Iowan.",
"themeThumbs": ["NetNewsWire-themes-collection/images/themes/minutes/mac-white.png"],
"themeThumbs": ["/NetNewsWire-themes-collection/images/themes/minutes/mac-white.png"],
"themeRepo": "https://github.com/lkhrs/nnw-minutes",
"themeAuthor": {
"name": "Luke Harris",
Expand All @@ -123,7 +123,7 @@
{
"themeTitle": "serif-gazette",
"themeDescription": "",
"themeThumbs": ["NetNewsWire-themes-collection/images/themes/serif-gazette/mac-white.png"],
"themeThumbs": ["/NetNewsWire-themes-collection/images/themes/serif-gazette/mac-white.png"],
"themeRepo": "https://github.com/jsit/serif-gazette",
"themeAuthor": {
"name": "Jay Sitter",
Expand Down
7 changes: 3 additions & 4 deletions src/utils/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ const GITHUB_REPO_STAR_BADGE = "https://img.shields.io/github/stars";
export function getRepoStarBadge(repoUrl: string) {
try {
const spliteRepoUrl = repoUrl.replace("https://", "").split("/");
console.log(spliteRepoUrl);
return `${GITHUB_REPO_STAR_BADGE}/${
spliteRepoUrl[1]
}/${spliteRepoUrl[2].split("#")[0]}?style=flat&logo=github`;
return `${GITHUB_REPO_STAR_BADGE}/${spliteRepoUrl[1]}/${
spliteRepoUrl[2].split("#")[0]
}?style=flat&logo=github`;
} catch (error) {
return null;
}
Expand Down

0 comments on commit 24fec0a

Please sign in to comment.