mirror of
https://github.com/rottenwheel/hugo-rottenwheel.git
synced 2024-11-29 13:23:18 +00:00
docs: add README for project setup and usage
This commit is contained in:
parent
78f5d95484
commit
3829c90ff8
1 changed files with 68 additions and 0 deletions
68
README.md
Normal file
68
README.md
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
# rottenblog
|
||||||
|
|
||||||
|
This is the source code for [rottenblog](https://blog.rottenwheel.com/). It is a static site generated using [Hugo](https://gohugo.io/).
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- [Hugo](https://gohugo.io/getting-started/installing/) installed on your machine.
|
||||||
|
|
||||||
|
### Installation
|
||||||
|
|
||||||
|
1. Clone the repository:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/rottenwheel/hugo-rottenwheel.git
|
||||||
|
cd hugo-rottenwheel
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Run the Hugo server:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
hugo server
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Open your browser and visit `http://localhost:1313` to see the site.
|
||||||
|
|
||||||
|
### Deployment
|
||||||
|
|
||||||
|
If you use GitHub, this repository comes with a GitHub Actions workflow that automatically builds and deploys the site to the `pages` branch whenever you push changes to the `main` branch.
|
||||||
|
|
||||||
|
Otherwise, you can build the site manually:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
hugo --minify
|
||||||
|
```
|
||||||
|
|
||||||
|
The generated site will be in the `public/` directory.
|
||||||
|
|
||||||
|
## Adding a New Post
|
||||||
|
|
||||||
|
1. Create a new Markdown file in the `content/posts/` directory:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
hugo new posts/my-new-post.md
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Edit the new post file to add your content.
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
---
|
||||||
|
title: "My New Post"
|
||||||
|
date: 2024-07-15
|
||||||
|
---
|
||||||
|
|
||||||
|
# My New Post
|
||||||
|
|
||||||
|
This is the content of my new post.
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Save the file and refresh your browser to see the new post.
|
||||||
|
|
||||||
|
## Customizing the Homepage
|
||||||
|
|
||||||
|
The homepage content and layout can be customized by editing the `content/_index.md` file and the `layouts/index.html` template.
|
||||||
|
|
||||||
|
- `content/_index.md`: Contains the metadata for the homepage.
|
||||||
|
- `layouts/index.html`: Defines the HTML structure and layout for the homepage.
|
Loading…
Reference in a new issue