Deployment
github.io
Download github desktop https://desktop.github.com/
Step 1. Preparation
準備好你已經做好的網頁(放在一個資料夾內)
註冊github並得到你的username
下載並安裝好github desktop(對新手來說比較好用)
Step 2. Create a new repository username.github.io

如果你的github帳號是abc,那你就要建立abc.github.io,首頁也就是http://abc.github.io。依此類推。注意,應該要設定為public。

(Option) 建立另一個網頁
你不想要網頁擺在username.github.io
而想要有別的網頁,實際上每個repository都可以是一個網站或網頁。你可以先產生一個repository(你喜歡的名字就好)。例如我就建立bt這個repository。這樣這個repository未來的網址就會是username.github.io/bt/
。注意,應該要設定為public。

Step 3. 選擇在GitHub Desktop開啟
這麼做會在你的電腦所指定的資料夾中clone一個github repository。日後,你對該資料夾做的所有更新,放置檔案、修改檔案,都會被記錄下來等候commmit或push(上傳動作)。

Step 3.1 設定該repository在電腦中的位置

Step 4. 將Local端已經設計好的網頁內容拖入github desktop所clone下來的資料夾
會發現GitHub Desktop上會顯示更新過的檔案。

Step 4.1. 寫Commit Summary
記得要寫commit summary才能夠commit。

Step 5. Commit -> Push
Commit是用來提交你所做的修改,要再Push出去才算是完成「上傳」到github repository。

Step 6. Go to github to check your files

Step 7. 啟用該Repository的Github Pages
選擇該Repository的Settings,下拉找到Github Pages。


Step 7. Browse the page by
https://jirlong.github.io/bt/bt.html 因為首頁不是index.html,所以他不會自動讀到bt.html,因此要特別指定要bt目錄中的bt.html。 但如果首頁是index.html,那就只要給https://jirlong.github.io/bt 即可。會過一下才生效。不用太急著瀏覽
Step 8. Modify filename
Step 9. Pull modified files back to local computer
homepage.ntu
Upload unstruction: http://jsc.cc.ntu.edu.tw/ntucc/homepage/
Download filezilla https://filezilla-project.org/
Last updated
Was this helpful?