A straight-forward starting point for building a great website on the HubSpot CMS.
Documentation | Demo website | Contributing
The HubSpot CMS Boilerplate is designed to offer developers a head start in the website building process. While the HubSpot CMS Boilerplate represents HubSpot's opinionated best practices, we intend to learn from similar projects and feedback. We hope it offers inspiration and utility for all website projects!
Before getting started, you will need to have Node.js installed, the HubSpot CMS CLI installed, and we strongly suggest that you set up a HubSpot CMS Developer Sandbox for your QA/testing environment.
Navigate to the directory that you want to use for your project
Run hs create website-theme <directory>
to create a project from the HubSpot CMS Boilerplate
Configure the local development tools for the portal(s) you'd like to use for your project.
Run hs watch --portal=<portal> src <directory> --initial-upload
to upload all the files in the project and watch for changes to files in the src
directory
Please reference our Quick start guide to developing on the HubSpot CMS and our Getting started with local development articles for more information.
Set up GitHub secrets in your forked repository to encrypt sensitive information from showing publically for HUBSPOT_PORTAL_ID
and HUBSPOT_PERSONAL_ACCESS_KEY
Update the name of the directory that you'll be deploying to in your Design Manager in the .github/workflows/deploy.yml
file (the current default dest_dir
is cms-theme-boilerplate
)
Deploy changes to your Design Manager by pushing to the main
branch of your forked repository
Please reference our HubSpot CMS deploy GitHub action page and Setting up continuous integration with a GitHub repository using GitHub Actions article for more information.
For details about the HubSpot CMS Boilerplate's recommended best practices and code formatting, please reference our style guide.
If you’re interested in contributing to the HubSpot CMS Boilerplate, please read CONTRIBUTING.md and STYLEGUIDE.md to see how you can report an issue, make a feature request, or make a pull request.
Previous releases and their documentation are available for download. To provide transparency into future releases, we create a project board that documents our planning in preparation for each upcoming major and minor version.
You can stay up to date with HubSpot CMS Boilerplate updates and discussions in the #hs-cms-boilerplate channel in the HubSpot Developer Slack.
The code is available under the Apache License, Version 2.0
<p對齊=“中心”> 在 HubSpot CMS 上構建出色網站的直接起點。
[](https://github.com/HubSpot/cms-theme-boilerplate/commits /主要的) [](https://github.com/HubSpot/cms-theme-boilerplate/圖表/貢獻者) [](https://github.com/HubSpot/cms-theme-boilerplate /觀察者) [](https://github.com/HubSpot/cms-theme-boilerplate /觀星者) [](https://github.com/HubSpot/cms-theme-boilerplate /網絡/成員) [](https://website.grader.com/tests/boilerplate.hubspotcms .com) [](https://developers.google.com/web/工具/燈塔) [](https://github.com/HubSpot/cms-theme-boilerplate/blob/main/執照)
## 目的
HubSpot CMS Boilerplate 旨在為開發人員在網站構建過程中提供先機。雖然 HubSpot CMS 樣板代表了 HubSpot 固執己見的最佳實踐,但我們打算從類似的項目和反饋中學習。我們希望它為所有網站項目提供靈感和實用性!
## 入門
在開始之前,您需要安裝 Node.js、[HubSpot CMS CLI](https://developers.hubspot.com/docs/cms/guides/getting- started-with-local-development#install-dependencies) 已安裝,我們強烈建議您為您的質量保證/測試環境。
導航到您要用於項目的目錄
運行 hs create website-theme <directory>
從 HubSpot CMS Boilerplate 創建一個項目
配置 門戶的本地開發工具( s) 你想用於你的項目。
運行hs watch --portal=<portal> src <directory> --initial-upload
上傳項目中的所有文件並【關注變化】(https://developers.hubspot.com/docs/ cms/developer-reference/local-development-cms-cli#watch) 到 src
目錄中的文件
請參考我們的_在 HubSpot CMS 上開發的快速入門指南_ 和我們的_[本地開發入門](https: //designers.hubspot.com/tutorials/getting-started-with-local-development)_ 文章了解更多信息。
Fork HubSpot CMS Boilerplate 存儲庫和[clone](https://help. github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) 你的分叉存儲庫到你的計算機
[在您的分叉存儲庫中設置 GitHub 機密以加密敏感信息以防止公開顯示](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-秘密)用於HUBSPOT_PORTAL_ID
和HUBSPOT_PERSONAL_ACCESS_KEY
在 .github/workflows/deploy.yml
文件中更新您將在設計管理器中部署到的目錄的名稱(當前默認的 dest_dir
是 cms-theme-boilerplate
)
通過推送到你的分叉存儲庫的“主”分支,將更改部署到你的設計管理器
請參考我們的 HubSpot CMS 部署 GitHub 操作頁面 和_[使用 GitHub 操作文章設置與 GitHub 存儲庫的持續集成](https:// /designers.hubspot.com/tutorials/github-integration)_ 了解更多信息。
## 時尚指南
有關 HubSpot CMS Boilerplate 推薦的最佳實踐和代碼格式的詳細信息,請參考我們的 樣式指南。
如果您有興趣為 HubSpot CMS 樣板做出貢獻,請閱讀 CONTRIBUTING.md 和 STYLEGUIDE.md 了解如何報告問題、提出功能請求或提出拉取請求。
以前的版本及其文檔可用於 下載。為了提供對未來版本的透明度,我們創建了一個項目板,記錄我們為每個 [即將到來的主要和次要版本](https://github.com/HubSpot/cms-theme-boilerplate/projects)做準備的計劃。
## 社區
您可以在 [HubSpot Developer Slack] (https://designers.hubspot.com/slack) 的 #hs-cms-boilerplate 頻道中了解 HubSpot CMS 樣板的更新和討論。
## 執照
該代碼可在 Apache 許可證,版本 2.0 下獲得