|
| 1 | +# Hextra Starter Template |
| 2 | + |
| 3 | +[](https://github.com/imfing/hextra-starter-template/actions/workflows/pages.yaml) |
| 4 | +[](https://app.netlify.com/sites/hextra-starter-template/deploys) |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +🐣 Minimal template for getting started with [Hextra](https://github.com/imfing/hextra) |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +[🌐 Demo ↗](https://imfing.github.io/hextra-starter-template/) |
| 13 | + |
| 14 | +## Quick Start |
| 15 | + |
| 16 | +Use this template to create your own repository: |
| 17 | + |
| 18 | +<img src="https://docs.github.com/assets/cb-77734/mw-1440/images/help/repository/use-this-template-button.webp" width=400 /> |
| 19 | + |
| 20 | +You can also quickly start developing using the following online development environment: |
| 21 | + |
| 22 | +- [GitHub Codespaces](https://github.com/codespaces) |
| 23 | + |
| 24 | + [](https://codespaces.new/imfing/hextra-starter-template) |
| 25 | + |
| 26 | + Create a new codespace and follow the [Local Development](#local-development) to launch the preview |
| 27 | + |
| 28 | +- [Gitpod](https://gitpod.io) |
| 29 | + |
| 30 | + [](https://gitpod.io/#https://github.com/imfing/hextra-starter-template) |
| 31 | + |
| 32 | + |
| 33 | +## Deployment |
| 34 | + |
| 35 | +### GitHub Pages |
| 36 | + |
| 37 | +A GitHub Actions workflow is provided in [`.github/workflows/pages.yaml`](./.github/workflows/pages.yaml) to [publish to GitHub Pages](https://github.blog/changelog/2022-07-27-github-pages-custom-github-actions-workflows-beta/) for free. |
| 38 | + |
| 39 | +For details, see [Publishing with a custom GitHub Actions workflow](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). |
| 40 | + |
| 41 | +Note: in the settings, make sure to set the Pages deployment source to **GitHub Actions**: |
| 42 | + |
| 43 | +<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/99676430-884e-42ab-b901-f6534a0d6eee" width=600 /> |
| 44 | + |
| 45 | +[Run the workflow manually](https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow) if it's not triggered automatically. |
| 46 | + |
| 47 | +### Netlify |
| 48 | + |
| 49 | +[](https://app.netlify.com/start/deploy?repository=https://github.com/imfing/hextra-starter-template) |
| 50 | + |
| 51 | +### Vercel |
| 52 | + |
| 53 | +[](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fimfing%2Fhextra-starter-template&env=HUGO_VERSION) |
| 54 | + |
| 55 | +Override the configuration: |
| 56 | + |
| 57 | +<img src="https://github.com/imfing/hextra-starter-template/assets/5097752/e2e3cecd-c884-47ec-b064-14f896fee08d" width=600 /> |
| 58 | + |
| 59 | +## Local Development |
| 60 | + |
| 61 | +Pre-requisites: [Hugo](https://gohugo.io/getting-started/installing/), [Go](https://golang.org/doc/install) and [Git](https://git-scm.com) |
| 62 | + |
| 63 | +```shell |
| 64 | +# Clone the repo |
| 65 | +git clone https://github.com/imfing/hextra-starter-template.git |
| 66 | + |
| 67 | +# Change directory |
| 68 | +cd hextra-starter-template |
| 69 | + |
| 70 | +# Start the server |
| 71 | +hugo mod tidy |
| 72 | +hugo server --logLevel debug --disableFastRender -p 1313 |
| 73 | +``` |
| 74 | + |
| 75 | +### Update theme |
| 76 | + |
| 77 | +```shell |
| 78 | +hugo mod get -u |
| 79 | +hugo mod tidy |
| 80 | +``` |
| 81 | + |
| 82 | +See [Update modules](https://gohugo.io/hugo-modules/use-modules/#update-modules) for more details. |
| 83 | + |
0 commit comments