2017-07-05 159 views
3

我正在構建我的投資組合,並使用HTML/CSS和Javascript進行簡單的蝕刻草圖項目。我想主辦在Heroku上的網站,但我得到這個錯誤:在Heroku上傳靜態網站?

remote: !  No default language could be detected for this app. 
remote:    HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. 
remote:    See https://devcenter.heroku.com/articles/buildpacks 

這基本上是一個靜態的網站,我真的不需要一個buildpack,有沒有什麼辦法,我還是可以把什麼我必須Heroku?

+0

試試這個:https://github.com/heroku/heroku-buildpack-static – yuriy636

回答

1

Heroku通常用於部署應用程序,而不是靜態網站。我發現使用GitHub頁面更容易靜態站點託管。如果您的項目已經在GitHub上,只需轉到repo的設置選項卡,滾動到GitHub頁面部分,然後選擇您要部署的回購站的哪個分支。 **編輯 - 只要確保您的主頁html文件標題爲index.html

但是,如果您確實需要使用Heroku,無論出於何種原因,here is a guide on how to do so。它顯示瞭如何創建靜態網站所需的composer.json和index.php。