Skip to content

Commit

Permalink
fix: url
Browse files Browse the repository at this point in the history
  • Loading branch information
whes1015 committed Nov 5, 2024
1 parent be1179b commit 9650f75
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export async function PluginContentIntroduction({
}

async function get_content(repo: string, pkg: string): Promise<string> {
const url = `https://raw.githubusercontent.com/${repo}/master/${pkg}/info.json`;
const url = `https://raw.githubusercontent.com/${repo}/main/${pkg}/info.json`;
const rsp = await fetch(url);
const data = await rsp.json();
const desc = data.description.zh_tw;
Expand Down
2 changes: 1 addition & 1 deletion src/app/[locale]/plugin/[pluginId]/readme/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default async function Page({params: {pluginId, locale}}: { params: { plu
}

async function get_readme(repo: string): Promise<{ data: string, url: string }> {
const url = `https://raw.githubusercontent.com/${repo}/master/README.md`
const url = `https://raw.githubusercontent.com/${repo}/main/README.md`
const rsp = await fetch(url)
const data = await rsp.text()
const replace = replace_hashtag(repo,data)
Expand Down
2 changes: 1 addition & 1 deletion src/catalogue/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function fetchEverything(): Promise<Everything> {
}

export async function getInfo(github: string, pkg: string): Promise<trem_json> {
const url = `https://raw.githubusercontent.com/${github}/master/${pkg}/info.json`;
const url = `https://raw.githubusercontent.com/${github}/main/${pkg}/info.json`;
const rsp = await fetch(url, {
next: {
revalidate: 10 * 60, // ISR 10min
Expand Down

0 comments on commit 9650f75

Please sign in to comment.