Commit ff9b7fe8 authored by Yurizal Susanto's avatar Yurizal Susanto
Browse files

Update README

Update getting started and installation section
parent 7de2d3bb
Loading
Loading
Loading
Loading
+47 −21
Original line number Diff line number Diff line
@@ -20,15 +20,40 @@ Like I said, it's really minimal. Its doesn't even have grid or anything nice li

![Manis' Colorful scheme](https://raw.githubusercontent.com/yursan9/manis-hugo-theme/master/images/blue-red.png)

## Installation
## Get Started

To install Manis, you can clone this repository. The following command will clone Manis in your site's base directory.
If this is your first time using Hugo, and you want to use this theme. Follow the instruction below:

```
mkdir name_of_web
cd name_of_web
git clone https://github.com/yursan9/manis-hugo-theme themes/manis
cp theme/manis/exampleSite/config.toml config.toml
hugo new blog/_index.md
hugo new work/_index.md
```

Edit the `config.toml` according to your preference. Then edit `content/blog/_index.md` and `content/work/_index.md` by following [this section](#making-own-navigation-bar). (Look at the `exampleSite/content` for example.)

### Theme Only

To only install Manis, you can clone this repository. The following command will clone Manis in your site's base directory.

```
cd path/to/site/dir
git clone https://github.com/yursan9/manis-hugo-theme themes/manis
```

Ensure you have blog and work sections to make this theme works.

```
content/
├── blog
│   └── _index.md
└── work
    └── _index.md
```

## Configuration

For configuration example you can look at the `exampleSite/config.toml` (and copy that too!). I put some commentary to, hopefully, guide you at using this theme.
@@ -45,29 +70,30 @@ disqusShortname = "your-disqus-shortname"

### Making Own Navigation Bar

Top navigation bar in Manis is made automatically by making new `section/_index.md`. Example if you want to add/remove navigation items, you can do the following command:
Top navigation bar in Manis is made automatically by making new `section/_index.md`. Example if you want to add new `about` section, you can do the following command:

```
hugo new {Section Name}/_index.md
hugo new about/_index.md
```

And make sure the front matter is formatted like this:
Edit the file `content/about/_index.md` and make sure the front matter is formatted like this:

```
```toml
+++
title = "Get To Know Me"
menu = "main"
+++
```

`title` will be the string that is shown in navigation bar and the page's title (the title doesn't need to be the same as section's name). `menu = "main"` is the one who make Hugo know how identify it's need to add a new item in navigation bar.
`title` will be the string that is shown in navigation bar and the page's title (the title doesn't need to be the same as section's directory name). `menu = "main"` is the one who make Hugo know how identify it's need to add a new item in navigation bar.

## Other Language
### Other Language

Manis already translated to Bahasa Indonesia. But, if you want to translate this theme to your own language, look for the example in `i18n/en.yaml` and `i18n/in.yaml`.

And then you edit the site's `config.toml` like this.
```

```toml
defaultContentLanguage = "en"
[languages.{Your Language Code}]
  lang = "{Your Language Code}"