|
1 | | -# The Minimal theme |
| 1 | +# Astro Starter Kit: Minimal |
2 | 2 |
|
3 | | -[](https://travis-ci.org/pages-themes/minimal) [](https://badge.fury.io/rb/jekyll-theme-minimal) |
4 | | - |
5 | | -*Minimal is a Jekyll theme for GitHub Pages. You can [preview the theme to see what it looks like](http://pages-themes.github.io/minimal), or even [use it today](#usage).* |
6 | | - |
7 | | - |
8 | | - |
9 | | -## Usage |
10 | | - |
11 | | -To use the Minimal theme: |
12 | | - |
13 | | -1. Add the following to your site's `_config.yml`: |
14 | | - |
15 | | - ```yml |
16 | | - theme: jekyll-theme-minimal |
17 | | - ``` |
18 | | -
|
19 | | -2. Optionally, if you'd like to preview your site on your computer, add the following to your site's `Gemfile`: |
20 | | - |
21 | | - ```ruby |
22 | | - gem "github-pages", group: :jekyll_plugins |
23 | | - ``` |
24 | | - |
25 | | - |
26 | | - |
27 | | -## Customizing |
28 | | - |
29 | | -### Configuration variables |
30 | | - |
31 | | -Minimal will respect the following variables, if set in your site's `_config.yml`: |
32 | | - |
33 | | -```yml |
34 | | -title: [The title of your site] |
35 | | -description: [A short description of your site's purpose] |
36 | | -``` |
37 | | - |
38 | | -Additionally, you may choose to set the following optional variables: |
39 | | - |
40 | | -```yml |
41 | | -logo: [Location of the logo] |
42 | | -show_downloads: ["true" or "false" to indicate whether to provide a download URL] |
43 | | -google_analytics: [Your Google Analytics tracking ID] |
| 3 | +```sh |
| 4 | +pnpm create astro@latest -- --template minimal |
44 | 5 | ``` |
45 | 6 |
|
46 | | -### Stylesheet |
47 | | - |
48 | | -If you'd like to add your own custom styles: |
| 7 | +> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun! |
49 | 8 |
|
50 | | -1. Create a file called `/assets/css/style.scss` in your site |
51 | | -2. Add the following content to the top of the file, exactly as shown: |
52 | | - ```scss |
53 | | - --- |
54 | | - --- |
| 9 | +## 🚀 Project Structure |
55 | 10 |
|
56 | | - @import "{{ site.theme }}"; |
57 | | - ``` |
58 | | -3. Add any custom CSS (or Sass, including imports) you'd like immediately after the `@import` line |
| 11 | +Inside of your Astro project, you'll see the following folders and files: |
59 | 12 |
|
60 | | -### Layouts |
61 | | - |
62 | | -If you'd like to change the theme's HTML layout: |
63 | | - |
64 | | -1. [Copy the original template](https://github.com/pages-themes/minimal/blob/master/_layouts/default.html) from the theme's repository<br />(*Pro-tip: click "raw" to make copying easier*) |
65 | | -2. Create a file called `/_layouts/default.html` in your site |
66 | | -3. Paste the default layout content copied in the first step |
67 | | -4. Customize the layout as you'd like |
68 | | - |
69 | | -## Roadmap |
70 | | - |
71 | | -See the [open issues](https://github.com/pages-themes/minimal/issues) for a list of proposed features (and known issues). |
72 | | - |
73 | | -## Project philosophy |
| 13 | +```text |
| 14 | +/ |
| 15 | +├── public/ |
| 16 | +├── src/ |
| 17 | +│ └── pages/ |
| 18 | +│ └── index.astro |
| 19 | +└── package.json |
| 20 | +``` |
74 | 21 |
|
75 | | -The Minimal theme is intended to make it quick and easy for GitHub Pages users to create their first (or 100th) website. The theme should meet the vast majority of users' needs out of the box, erring on the side of simplicity rather than flexibility, and provide users the opportunity to opt-in to additional complexity if they have specific needs or wish to further customize their experience (such as adding custom CSS or modifying the default layout). It should also look great, but that goes without saying. |
| 22 | +Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. |
76 | 23 |
|
77 | | -## Contributing |
| 24 | +There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. |
78 | 25 |
|
79 | | -Interested in contributing to Minimal? We'd love your help. Minimal is an open source project, built one contribution at a time by users like you. See [the CONTRIBUTING file](docs/CONTRIBUTING.md) for instructions on how to contribute. |
| 26 | +Any static assets, like images, can be placed in the `public/` directory. |
80 | 27 |
|
81 | | -### Previewing the theme locally |
| 28 | +## 🧞 Commands |
82 | 29 |
|
83 | | -If you'd like to preview the theme locally (for example, in the process of proposing a change): |
| 30 | +All commands are run from the root of the project, from a terminal: |
84 | 31 |
|
85 | | -1. Clone down the theme's repository (`git clone https://github.com/pages-themes/minimal`) |
86 | | -2. `cd` into the theme's directory |
87 | | -3. Run `script/bootstrap` to install the necessary dependencies |
88 | | -4. Run `bundle exec jekyll serve` to start the preview server |
89 | | -5. Visit [`localhost:4000`](http://localhost:4000) in your browser to preview the theme |
| 32 | +| Command | Action | |
| 33 | +| :------------------------ | :----------------------------------------------- | |
| 34 | +| `pnpm install` | Installs dependencies | |
| 35 | +| `pnpm dev` | Starts local dev server at `localhost:4321` | |
| 36 | +| `pnpm build` | Build your production site to `./dist/` | |
| 37 | +| `pnpm preview` | Preview your build locally, before deploying | |
| 38 | +| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` | |
| 39 | +| `pnpm astro -- --help` | Get help using the Astro CLI | |
90 | 40 |
|
91 | | -### Running tests |
| 41 | +## 👀 Want to learn more? |
92 | 42 |
|
93 | | -The theme contains a minimal test suite, to ensure a site with the theme would build successfully. To run the tests, simply run `script/cibuild`. You'll need to run `script/bootstrap` one before the test script will work. |
| 43 | +Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). |
0 commit comments