Update information to run the website project locally
This commit is contained in:
parent
b526578aec
commit
48153ebe6a
22
README.md
22
README.md
@ -2,26 +2,26 @@
|
|||||||
|
|
||||||
Source code of my hobby website, [Leilukin's Hub](https://leilukin.com/). Built with [Eleventy](https://www.11ty.dev/) and hosted on [Hostinger](https://www.hostinger.my/).
|
Source code of my hobby website, [Leilukin's Hub](https://leilukin.com/). Built with [Eleventy](https://www.11ty.dev/) and hosted on [Hostinger](https://www.hostinger.my/).
|
||||||
|
|
||||||
More technical information can be found on my site's [colophon page](https://leilukin.com/colophon).
|
More technical information about this website can be found on my site's [colophon page](https://leilukin.com/colophon).
|
||||||
|
|
||||||
## Run Locally
|
## Run Locally
|
||||||
Recommended JavaScript runtime: [Bun](https://bun.sh).
|
|
||||||
|
|
||||||
1. Clone this repository locally
|
It is recommended to use [Bun](https://bun.sh) as the JavaScript runtime for this project. If you want to use Node.js to run this project, for each terminal command and `package.json` script, replace `bun` with `npm` and `bunx` with `npx`.
|
||||||
|
|
||||||
|
1. Clone the project repository locally:
|
||||||
```
|
```
|
||||||
git clone https://git.32bit.cafe/Leilukin/leilukin-site.git
|
git clone https://git.32bit.cafe/Leilukin/leilukin-site.git
|
||||||
```
|
```
|
||||||
1. Install dependencies
|
1. Install dependencies:
|
||||||
```
|
```
|
||||||
bun install
|
bun install
|
||||||
```
|
```
|
||||||
1. Run the project
|
1. Run the project:
|
||||||
Option A: Run without the [Pagefind](https://pagefind.app/) search library.
|
|
||||||
```
|
|
||||||
bun start
|
|
||||||
```
|
|
||||||
Option B: Run with Pagefind.
|
|
||||||
```
|
```
|
||||||
bun start-pagefind
|
bun start-pagefind
|
||||||
```
|
```
|
||||||
1. Open http://localhost:8080/ in your browser
|
1. Open http://localhost:1414/ in your web browser.
|
||||||
|
|
||||||
|
The `bun start-pagefind` command runs both Eleventy to build the website and [Pagefind](https://pagefind.app/) to create the website's search index, then serves the website project output in a live server.
|
||||||
|
|
||||||
|
After the website's search index has been created and updated, when you want to run the project again, you can run the `bun start` command, then open `http://localhost:8080` in your web browser to view the website project output in a live server.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user