From 63f66e0a7593258866afcfb68867e13d5ede3d1b Mon Sep 17 00:00:00 2001 From: Rieko Tsunoda Date: Thu, 19 Dec 2019 20:47:52 +0900 Subject: [PATCH] Update README.md very few update --- README.md | 70 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 4277677..40c057e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # White Cabinet theme for Hugo +[[_TOC_]] White Cabinet theme can make sites with @@ -20,7 +21,7 @@ White Cabinet theme deal with not only PC but also Mobile without any extra code ## Installation 1. Install [Hugo](https://gohugo.io/) in your server/client. -1. Make web source directory (ex. `/foo/bar`) and clone our git repository +2. Make web source directory (ex. `/foo/bar`) and clone our git repository ``` $ mkdir -p /foo/bar/themes @@ -28,7 +29,7 @@ $ cd /foo/bar/themes $ git clone ---NEED TO CHECK--- ``` -1. If you test by our demo page, please type such as: +3. If you test by our demo page, please type such as: ``` $ cp white_cabinet_themes/demo-page/ /foo/bar/ @@ -42,34 +43,12 @@ Here in README is according to the demo pages. ## Edit `config.toml` You can customize the site at the `config.toml`. -1. At first, edit your server name +At first, edit your server name ```config.toml baseurl = (*_YOUR_SERVER_NAME_*) ``` -2. You can set the parameters in each lauguage code. -These are the example in the case of English. -各言語のページは自動的に作られます。baseurl/en/ -index.en.md, index.ja.md, .... - -```config.toml -[Languages] -[Languages.en] - title = "THE TITLE OF YOUR SITE" -[Languages.en.params] - subtitle = "THE SUBTITLE OF YOUR SITE" - ... -[[Languages.en.menu.main]] - ... -``` - - - ### Header At the header, following contents are stored: - title and subtitle @@ -83,10 +62,8 @@ At the header, following contents are stored: The site title can be changed by the parameter `title`. ```config.toml -[Languages] -[Languages.en] title = "SITE TITLE" -[Languages.en.params] +[Params] subtitle = "SITE SUBTITLE" ``` @@ -121,7 +98,7 @@ To add new header menu, add new parameter block `menu.header`. weight = 1 #Order of each menu ``` -To add banner link, add new parameter block `Params.exlink`. +To add external link with small banner, add new parameter block `Params.exlink`. ```config.toml [[Params.exlink]] @@ -129,6 +106,16 @@ To add banner link, add new parameter block `Params.exlink`. pass = "PATH TO IMAGES" ``` +The link switching languages is created by parameter block `Languages.**.params`. +```config.toml +[Languages.en] + weight = 1 #Order of header menu to switch language. +[Languages.en.params] + Language_name = "English" #Display name at header. +``` +See also **[Multilingual mode](### Multilingual mode)**. + + ### Main contents In White Cabinet theme, accordion menu is used as top menu. @@ -171,7 +158,7 @@ Ex. banners are automatically created for latest 10 posts in the directory `/pos ``` You can also create fixed banner. -See **[FRONT MATTER]()**. +See **[FRONT MATTER](## How to edit each page)**. Below the banners list, "Links" is prepared. @@ -179,7 +166,7 @@ This is determined by parameters `link` and `linkPath`. In the following case, the page created by `/foo/bar/content/link/index.en.md` is corresponded. ```config.toml -[Languages.en.params] +[Params] link = "DISPLAYED NAME" linkPath = "en/link" #Permenent link of "Links". ``` @@ -206,7 +193,26 @@ Embedded google maps are shown at the page `/access` ### taxsonomies To be updated. -## How to edit each page (About front matter) +### Multilingual mode +Multilingual mode is available. +See also **Multilingual Mode | HUGO(https://gohugo.io/content-management/multilingual/)** + +These are the example in the case of English. + +```config.toml +[Languages] +[Languages.en] + title = "THE TITLE OF YOUR SITE" +[Languages.en.params] + Language_name = "English" #For header menu + subtitle = "THE SUBTITLE OF YOUR SITE" + ... +[[Languages.en.menu.main]] + ... +``` + +## How to edit each page +(About front matter) -- GitLab