diff --git a/assets/pageforge.min.js b/assets/pageforge.min.js index 1f6d1c7..3d31c09 100644 --- a/assets/pageforge.min.js +++ b/assets/pageforge.min.js @@ -1,16 +1,4 @@ -(()=>{var h={formatNumber(t){return t>=1e6?(t/1e6).toFixed(1)+"m":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()},showLoading(){let t=` -
-
-
-
-
-
-
-
-
-
-
- `,a=document.createElement("style");a.textContent=` +(()=>{var h={formatNumber(t){return t>=1e6?(t/1e6).toFixed(1)+"m":t>=1e3?(t/1e3).toFixed(1)+"k":t.toString()},showLoading(){if(!this.styleAdded){let e=document.createElement("style");e.textContent=` .skeleton-loader { width: 60px; height: 16px; @@ -23,16 +11,16 @@ 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } } - `,document.head.appendChild(a),[".tag-container",".stars-container",".forks-container"].forEach(e=>{document.querySelectorAll(e).forEach(o=>{o.innerHTML='
'})})},async fetchStats(t,a){var l;let e=`github-stats-${t}-${a}`,r=localStorage.getItem(e),o=localStorage.getItem(`${e}-time`);if(this.showLoading(),r&&o&&Date.now()-parseInt(o)<36e5){let s=JSON.parse(r);return this.updateUI(s),s}let c={Accept:"application/vnd.github.v3+json","User-Agent":"PageForge-Docs"};try{let[s,n]=await Promise.all([fetch(`https://api.github.com/repos/${t}/${a}`,{headers:c}),fetch(`https://api.github.com/repos/${t}/${a}/tags`,{headers:c})]);if(!s.ok||!n.ok)throw new Error("GitHub API request failed");let d=await s.json(),g=await n.json(),i={stars:this.formatNumber(d.stargazers_count||0),forks:this.formatNumber(d.forks_count||0),tag:((l=g[0])==null?void 0:l.name)||"-"};return localStorage.setItem(e,JSON.stringify(i)),localStorage.setItem(`${e}-time`,Date.now().toString()),this.updateUI(i),i}catch(s){console.error("\u{1F92F} \u83B7\u53D6 GitHub Stats \u5931\u8D25",s);let n={stars:"-",forks:"-",tag:"-"};return this.updateUI(n),n}},updateUI(t){if(!t)return;let a=document.querySelectorAll(".tag-container"),e=document.querySelectorAll(".stars-container"),r=document.querySelectorAll(".forks-container");a.forEach(o=>{o.innerHTML=` + `,document.head.appendChild(e),this.styleAdded=!0}let t={tag:'
',stars:'
',forks:'
'};this.updateUI(t)},async fetchStats(t,e){var l;let a=`github-stats-${t}-${e}`,i=localStorage.getItem(a),o=localStorage.getItem(`${a}-time`);if(this.showLoading(),i&&o&&Date.now()-parseInt(o)<36e5){let s=JSON.parse(i);return this.updateUI(s),s}let c={Accept:"application/vnd.github.v3+json","User-Agent":"PageForge-Docs"};try{let[s,r]=await Promise.all([fetch(`https://api.github.com/repos/${t}/${e}`,{headers:c}),fetch(`https://api.github.com/repos/${t}/${e}/tags`,{headers:c})]);if(!s.ok||!r.ok)throw new Error("GitHub API request failed");let d=await s.json(),g=await r.json(),n={stars:this.formatNumber(d.stargazers_count||0),forks:this.formatNumber(d.forks_count||0),tag:((l=g[0])==null?void 0:l.name)||"-"};return localStorage.setItem(a,JSON.stringify(n)),localStorage.setItem(`${a}-time`,Date.now().toString()),this.updateUI(n),n}catch(s){console.error("\u{1F92F} \u83B7\u53D6 GitHub Stats \u5931\u8D25",s);let r={stars:"-",forks:"-",tag:"-"};return this.updateUI(r),r}},updateUI(t){if(!t)return;let e=document.querySelectorAll(".tag-container"),a=document.querySelectorAll(".stars-container"),i=document.querySelectorAll(".forks-container");e.forEach(o=>{o.innerHTML=` - ${t.tag}`}),e.forEach(o=>{o.innerHTML=` + ${t.tag}`}),a.forEach(o=>{o.innerHTML=` - ${t.stars}`}),r.forEach(o=>{o.innerHTML=` + ${t.stars}`}),i.forEach(o=>{o.innerHTML=` - ${t.forks}`})},init(t,a){if(!t||!a)return;this.showLoading();let e=async()=>{await this.fetchStats(t,a)};e(),setInterval(e,36e5)}};window.PageForge=window.PageForge||{};window.PageForge.GitHubStats=h;})(); + ${t.forks}`})},init(t,e){if(!t||!e)return;this.showLoading();let a=async()=>{await this.fetchStats(t,e)};a(),setInterval(a,36e5)}};window.PageForge=window.PageForge||{};window.PageForge.GitHubStats=h;})(); diff --git a/getting-started/create-site/img.png b/en/getting-started/create-site/img.png similarity index 100% rename from getting-started/create-site/img.png rename to en/getting-started/create-site/img.png diff --git a/en/getting-started/get-started.html b/en/getting-started/get-started.html new file mode 100644 index 0000000..0561284 --- /dev/null +++ b/en/getting-started/get-started.html @@ -0,0 +1,1017 @@ + + + + + + Getting Started - PageForge + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + +
+ + + + + + +
+
+ +
+ +
+ +
+ +

+ Getting Started +

+ + +
+ + +
+ + +
+ +
+ + PageForge is a modern static page generation and deployment platform designed to help users quickly create beautiful static websites and deploy them to GitHub Pages with a single click. Whether it's a personal blog, a project document, or a business website, PageForge makes it easy to build, intelligently deploy, and go live instantly. + +
+ + Using PageForge is very simple, and it only takes a few steps to build and deploy your website. All you need to do is write a markdown file, and PageForge will help you generate a high-quality static website. Whether it's a personal blog, a project document, or a business website, PageForge makes it easy to build, intelligently deploy, and go live instantly. + +
+ +
+
+ Installation +
+
+ +
+ +
+ + PageForge offers the following installation methods: + +
+ +
    +
  • + Online installation +
  • + Source code installation +
  • +
+ +
+ +
+
+ Install online +
+
+ +
+ +
+ + You can install it online using a package management tool like pnpm or yarn: + +
+
pnpm add -g pageforge +yarn global add pageforge
+
+ +
+
+ Source code installation +
+
+ +
+ +
+
git clone https://github.com/devlive-community/pageforge.git +cd pageforge +pnpm install +pnpm link --global
+
+
+
+
+
+ + + + + + + + + +
+
+

目录

+ +
+ +
+ +
+ + + + +
+ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 6770c59..6053fd6 100644 --- a/index.html +++ b/index.html @@ -60,7 +60,7 @@