Skip to content

Commit

Permalink
docs: update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
parksb committed May 20, 2022
1 parent bee84f3 commit a78598e
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@

Handmade Blog

[![build](https://img.shields.io/github/workflow/status/ParkSB/handmade-blog/Node%20CI/master?style=flat-square)](https://github.com/ParkSB/handmade-blog/actions?query=workflow%3A%22Node+CI%22) ![node](https://img.shields.io/badge/node-%3E%3D%2010.0-brightgreen?style=flat-square) [![demo](https://img.shields.io/netlify/3f01acb3-1107-470a-914f-90d100b87d85?label=demo&style=flat-square)](https://handmade-blog.netlify.com/) [![license](https://img.shields.io/github/license/ParkSB/handmade-blog?style=flat-square)](LICENSE)
[![build](https://img.shields.io/github/workflow/status/parksb/handmade-blog/Node%20CI/master?style=flat-square)](https://github.com/parksb/handmade-blog/actions?query=workflow%3A%22Node+CI%22) ![node](https://img.shields.io/badge/node-%3E%3D%2010.0-brightgreen?style=flat-square) [![demo](https://img.shields.io/netlify/3f01acb3-1107-470a-914f-90d100b87d85?label=demo&style=flat-square)](https://handmade-blog.netlify.com/) [![license](https://img.shields.io/github/license/parksb/handmade-blog?style=flat-square)](LICENSE)

</h1>
<strong>Read this document in another language:</strong> [:kr:](README-KO.md) [:indonesia:](README-ID.md) [:brazil:](README-PT-BR.md) [:it:](README-IT.md) [:malaysia:](README-MS.md) [:greece:](README-EL.md)

<strong>Read this document in another language:</strong> [:kr:](_docs/README-KO.md) [:indonesia:](_docs/README-ID.md) [:brazil:](_docs/README-PT-BR.md) [:it:](_docs/README-IT.md) [:malaysia:](_docs/README-MS.md) [:greece:](_docs/README-EL.md)
</div>

Handmade Blog is a lightweight static blog generator for people who want to start a blog quickly. It supports article type document for a blog post, work type document for portfolio, code highlights, [KaTeX](https://katex.org/) syntax, footnotes, and more.

## Demo: [Here](https://handmade-blog.netlify.com/)
## Demo: [Here](https://handmade-blog.vercel.app/)

![Article page preview](https://user-images.githubusercontent.com/6410412/74097056-be43d100-4b4a-11ea-806b-7bd263d7f623.png)

Expand All @@ -40,31 +40,39 @@ Handmade Blog is a lightweight static blog generator for people who want to star
$ npm install
```

4. Modify `config.json` file in `services` directory to set your blog title and subtitle.

```json
{
"blogTitle": "Betty Grof",
"blogSubtitle": "Oh My Glob",
"article": {
"tableOfContents": true
}
}
4. Customize a some texts such as title of the navigation(in `app/templates/navigations.ejs`), and run `npm run build`.

```html
<nav>
<a class="logo-link" href="/">
<h1>CUSTOMIZED BLOG TITLE</h1>
<span>customized blog subtitle</span>
</a>
<small>
<a id="about" class="info-link" href="/about.html">👀About</a> /
<a id="works" class="info-link" href="/works.html">🔥Works</a> /
<a id="articles" class="info-link" href="/articles.html">📚Articles</a>
</small>
</nav>
```
``` shell script
$ npm run build
```

5. Start a local server at `http://localhost:1234/`. `npm start` script opens the local server based on `server` directory.
5. Run `npm start` script to start a local server listening on `http://localhost:8080/`. The local server is based on `dist` directory.

```shell script
$ npm run build
$ npm start
```

![The website that is titled 'Betty Grof' at http://localhost:1234/](https://user-images.githubusercontent.com/6410412/93754683-155f6780-fc3d-11ea-99de-92c747c103f9.png)

6. Commit and push the changes in your working directory to the remote repository.

```shell script
$ git add ./services/config.json
$ git commit -m "Set the blog title and subtitle"
$ git add ./app/templates/navigations.ejs
$ git commit -m "Customize the blog title and subtitle"
$ git push origin master
```

Expand Down Expand Up @@ -97,10 +105,10 @@ Modify an ejs template to change the contents of the existing page. For example,
</main>
```

Then, run `npm run publish page` script to publish the modified landing page and preview changes on the local server using `npm start` script.
Then, run `npm run build` script to publish the modified landing page and preview changes on the local server using `npm start` script.

```shell script
$ npm run publish page
$ npm run build
$ npm start
```

Expand All @@ -115,14 +123,10 @@ If you're ready to deploy, run `npm run deploy` script. You can change not only
* `public` - HTML files generated by `publish` script. `server` and `dist` directory is based on this directory. Do not change the files under this directory directly.
* `article` - HTML files converted from `_articles` directory.
* `work` - HTML files converted from `_works` directory.
* `src` - Source code to be imported by HTML files.
* `css` - CSS files generated by `build` script.
* `scss`
* `ts`
* `static` - Any static files that aren't compiled by `build` script like `robots.txt`, `sitemap.xml`, or SEO files. `build` script copies all files under this directory to `dist` directory.
* `styles` - CSS source code to be imported by HTML files.
* `static` - Any static files that aren't compiled by `build` script like `robots.txt`, `sitemap.xml`, or SEO files. `build` script copies all files under this directory to `dist` directory.
* `templates` - EJS template files. `publish` script converts templates under this directory to HTML files.
* `dist` - Files compiled by `build` script. `deploy` script deploys a website to GitHub pages based on this directory. Do not change the files under this directory directly.
* `server` - Files compiled by `build` script. `start` script opens local server based on this directory. Do not change the files under this directory directly.
* `dist` - Files compiled by `build` script. `start` script opens local server based on this directory, and `deploy` script deploys a website to GitHub pages based on this directory. Do not change the files under this directory directly.
* `services` - Source code implementing `publish` script.
* `classes`
* `models`
Expand All @@ -137,7 +141,7 @@ If you're ready to deploy, run `npm run deploy` script. You can change not only

### `npm start`

Starts local development server at http://localhost:1234/.
Starts local development server listening on http://localhost:8080/.

### `npm run publish`

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit a78598e

Please sign in to comment.