From a1e8f21f5761d1892a80f6a0993782e5dd500045 Mon Sep 17 00:00:00 2001 From: Rise <8315221+AmazingRise@users.noreply.github.com> Date: Mon, 2 Mar 2020 22:40:45 +0800 Subject: Updated Customization (markdown) --- Customization.md | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/Customization.md b/Customization.md index 46a8c1a..89c634c 100644 --- a/Customization.md +++ b/Customization.md @@ -2,25 +2,44 @@ (From *theme*'s root directory) Go to `assets/scss/journal.scss`. And modify the color value in the first line. -``` +```scss $color-accent: #1976d2; ``` Then re-generate the website. You can see the new color scheme now. +## Change default font scheme + +Edit `/assets/scss/journal.scss`. +Then you can find font scheme in the first page: +```scss +$default-font-list: "Lora", "Noto Serif SC", serif; +$mono-font-list: "Fira Mono", "Cousine", Monaco, Menlo, "Source Code Pro", + monospace; +$sans-preferred-font-list: "Montserrat", "Roboto", "Source Sans Pro", + "Helvetica", $default-font-list; +``` + +Notice: Fonts' name is referred from Google Fonts. + ## Customize sidebar The items in the sidebar should be added manully. Here is an example of appeding "Categories" and "Tags" to the sidebar: -``` +```toml [[menu.main]] url = "/categories" name = "Categories" -weight = 2 +weight = 3 [[menu.main]] url = "/tags" name = "Tags" +weight = 2 + +[[menu.main]] +url = "/posts" +name = "Archive" weight = 1 ``` Note: `weight` is the priority of each item. **The lowest the weight is, the higher the priority is.** @@ -43,11 +62,11 @@ Now, this theme support these comment service: Edit your `config.toml` in the hugo website's root directory. Add the following line to the section `[params]` -``` +```toml enableGitalk = true ``` Then add following lines behind: -``` +```toml [params.gitalk] owner = "user" repo = "repo name" @@ -64,7 +83,7 @@ But due to my network environment, I haven't had it tested. To add a disqus comment service, please add a line to `config.toml` in the root directory: -``` +```toml disqusShortname = "Your disqus short name." ``` @@ -73,7 +92,7 @@ disqusShortname = "Your disqus short name." Edit your `config.toml` in the hugo website's root directory. Add the following line to the section `[params]` -``` +```toml livereId = "xxxx" ``` @@ -83,11 +102,11 @@ livereId = "xxxx" Edit your `config.toml` in the hugo website's root directory. Add the following line to the section `[params]` -``` +```toml enableValine = true ``` Then add following lines behind: -``` +```toml [params.valine] appId = "Your app ID of leancloud" appKey = "Your app key of leancloud" @@ -107,7 +126,7 @@ If I'm free then, I will add it. :P ### Disabling #### Disable the comment area in one post If you wanna to disable the comment area in a specific post, please add a line in the metadata area of the post: -``` +```toml comment : false ``` A more detailed description of the posts' meta data is [here](https://github.com/AmazingRise/hugo-theme-diary/wiki/Post's-meta-data). @@ -121,7 +140,7 @@ The comment area will not be shown. Please add this line to your site's "config.toml": -``` +```toml googleAnalytics = "UA-123-45" ``` @@ -131,7 +150,7 @@ UA-123-45 is your Google Analytics code. Please modify it to your own Analytics Please add this line to your site's "config.toml": -``` +```toml googleSiteVerification = "xxxx-xxxx" ``` -- cgit v1.2.3