Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
juanandres-montero authored Mar 27, 2024
0 parents commit 7ab8cb8
Show file tree
Hide file tree
Showing 63 changed files with 8,358 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: eliancodes
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: Create a report to help improve Brutal
title: ''
labels: bug
assignees: ElianCodes

---

**Describe the bug**

<!-- A clear and concise description of what the bug is. -->

**Minimal example**
Link to minimal example: <!-- eg: StackBlitz -->

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Additional context**

Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea to Brutal
title: ''
labels: enhancement
assignees: ElianCodes

---

**Is your feature request related to a problem? Please describe.**

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**

A clear and concise description of what you want to happen.

**Additional context**

Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Changes

- What does this change?
- Be short and concise. Bullet points can help!
- Before/after screenshots can help as well.

## Docs

<!-- DON'T DELETE THIS SECTION! If no docs added, explain why.-->
<!-- Is this a visible change? You probably need to update the README.md -->
41 changes: 41 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: nightly

on:
schedule:
- cron: '0 0 * * *'

jobs:
upgrade:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: '--max_old_space_size=4096'
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Upgrade Astro
run: pnpm dlx @astrojs/upgrade --yes

- name: PR Changes
uses: peter-evans/create-pull-request@v4
with:
branch: ci/update-astro
commit-message: 'ci: update Astro'
assignees: eliancodes
title: 'ci: update Astro'
body: Update Astro and packages to latest version
labels: ci
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.astro
node_modules
dist
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.2.0](https://github.com/ElianCodes/brutal/compare/v1.1.0...v1.2.0) (2023-09-01)


### Features

* add styled scrollbar ([b3b2cf4](https://github.com/ElianCodes/brutal/commit/b3b2cf4c9a7a865d06e9a3450472e834c2b9c01b))

## [1.1.0](https://github.com/ElianCodes/brutal/compare/v1.0.1...v1.1.0) (2023-08-31)


### Features

* enable view transitions ([2d39dab](https://github.com/ElianCodes/brutal/commit/2d39dab6a42dda71773666b2eade813e46334b22))

### [1.0.1](https://github.com/ElianCodes/brutal/compare/v1.0.0...v1.0.1) (2023-08-31)

### [0.2.1](https://github.com/ElianCodes/brutal/compare/v0.2.0...v0.2.1) (2023-08-09)


### Bug Fixes

* solve OG image generation ([bdcfe8c](https://github.com/ElianCodes/brutal/commit/bdcfe8c11c99ffe144235284de6a1c06dc481dab))

## 0.2.0 (2023-08-09)


### ⚠ BREAKING CHANGES

* switch to Astro Assets

### Features

* serve fonts from local directory ([d6592c9](https://github.com/ElianCodes/brutal/commit/d6592c916a223847d15fe4464d05ff9349964304))
* switch to Astro Assets ([7a5b8d4](https://github.com/ElianCodes/brutal/commit/7a5b8d459dda6156e714b9b0419414b4675c18eb))
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Elian Van Cutsem

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
117 changes: 117 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Brutal - The neobrutalist Astro theme

Brutal is a minimal neobrutalist theme for [Astro](https://astro.build/). It's based on Neobrutalist Web Design, a movement that aims to create websites with a minimalistic and functional design. It has some integrations like Image Optimization, RSS, Sitemap, ready to get your SEO done right.

The theme has no JavaScript integration out of the box, but can always be added of course.

This template is based on [my own personal website](<https://www.elian.codes/>), with some more generic things added.

## Usage

You can bootstrap a new Astro project using Brutal with the following command:

```bash
# npm 6.x
npx create astro@latest --template eliancodes/brutal

# npm 7+
npx create astro@latest -- --template eliancodes/brutal

# pnpm
pnpm dlx create-astro --template eliancodes/brutal

# yarn
yarn create astro --template eliancodes/brutal
```

### Commands

All commands are run from the root of the project, from a terminal:

(Here I use PNPM, no problem if you use NPM or Yarn)

| Command | Action |
| :------------------ | :------------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm dev` | Starts local dev server at `localhost:3000` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview` | Preview your build locally, before deploying |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro preview` |
| `pnpm astro --help` | Get help using the Astro CLI |

## Integrations

### UnoCSS

In this theme, I'm using [UnoCSS](https://uno.antfu.me/) to generate the CSS. It's a utility-first CSS framework that uses a single class to style elements. It's very easy to use and has a lot of features. It's setup to be completely compatible with TailwindCSS, with the advantage of being able to use PureCSS icons. You can always switch out UnoCSS for TailwindCSS if you want to, without breaking the general styles.

### Sitemap

To generate the sitemap, you don't need to do anything. It's automatically generated when you build your site. You'll just need to switch out the `site` on `astro.config.mjs` to your own.

```js title="astro.config.mjs"
import { defineConfig } from 'astro/config';

export default defineConfig({
site: 'https://example.com',
});
```

### RSS

The RSS feed is automatically generated from the Markdown files in the `src/content/blog` folder. You can ofcourse completely change this to your own needs.

The RSS will output to `https://example.com/feed.xml` by default. You can change this, by renaming `src/pages/feed.xml.js`.

### Image

## Components

### `components/blog/`

This directory contains all components for the blog.

### `components/errors/`

This directory contains all error components.

#### `components/errors/404.astro`

This component is used when a page is not found.

### `components/generic/`

This directory contains all generic components, reused over multiple pages.

### `components/home/`

This directory contains all components for the home page.

### `components/layout/`

This directory contains all layout components. For instance, the header and footer and `<head>` section.

### Colors

The theme has a few colors that you can use in the included components.

- red
- blue
- green
- yellow
- pink
- purple
- orange
- teal
- cyan
- lime
- emerald
- fuchsia
- violet
- rose
- sky
- amber

More colors can be added in `astro.config.mjs` in the `colors` array.

If you need more from this theme, don't hesitate to open an issue or reach out to me!
20 changes: 20 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { defineConfig } from 'astro/config';
import sitemap from '@astrojs/sitemap';
import UnoCSS from 'unocss/astro';

export default defineConfig({
// used to generate images
site:
process.env.VERCEL_ENV === 'production'
? 'https://brutal.elian.codes/'
: process.env.VERCEL_URL
? `https://${process.env.VERCEL_URL}/`
: 'https://localhost:3000/',
trailingSlash: 'ignore',
integrations: [sitemap(), UnoCSS({ injectReset: true })],
vite: {
optimizeDeps: {
exclude: ['@resvg/resvg-js'],
},
},
});
44 changes: 44 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "brutal",
"version": "1.2.0",
"private": false,
"type": "module",
"packageManager": "pnpm@8.6.0",
"author": {
"name": "Elian Van Cutsem",
"email": "hello@elian.codes",
"url": "https://www.elian.codes/"
},
"homepage": "https://brutal.elian.codes",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/rss": "^4.0.5",
"@astrojs/sitemap": "^3.1.1",
"@eliancodes/brutal-ui": "^0.2.3",
"@unocss/astro": "^0.57.7",
"astro": "^4.5.9",
"astro-font": "^0.0.72",
"satori": "^0.5.0",
"satori-html": "^0.3.2"
},
"devDependencies": {
"@iconify-json/logos": "^1.1.41",
"@iconify-json/uil": "^1.1.8",
"@resvg/resvg-js": "^2.6.0",
"@typescript-eslint/parser": "^6.15.0",
"@unocss/reset": "^0.57.7",
"eslint": "^8.56.0",
"eslint-plugin-astro": "^0.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"prettier": "^3.1.1",
"prettier-plugin-astro": "^0.12.2",
"sharp": "^0.32.6",
"unocss": "^0.57.7"
}
}
Loading

0 comments on commit 7ab8cb8

Please sign in to comment.