From 78ec905f19f537199d82d20eb16c7132b023034e Mon Sep 17 00:00:00 2001 From: parsiya Date: Sun, 2 Sep 2018 17:46:12 -0400 Subject: Edit README --- README.md | 168 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 85 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index 054e9bf..322b022 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # Hugo-Octopress Hugo-Octopress is a port of the classic [Octopress][octopress-link] theme to [Hugo][hugo-link]. -For a demo website using the vanilla theme please visit [http://hugo-octopress-test.s3-website-us-east-1.amazonaws.com/](http://hugo-octopress-test.s3-website-us-east-1.amazonaws.com/). +Live demo using the unmodified theme: -My personal website runs a modified version of the theme (mainly modified index): [https://parsiya.net](https://parsiya.net). +* [http://hugo-octopress-test.s3-website-us-east-1.amazonaws.com/](http://hugo-octopress-test.s3-website-us-east-1.amazonaws.com/). +* Source: [https://github.com/parsiya/Hugo-Octopress-Test](https://github.com/parsiya/Hugo-Octopress-Test). + +My personal website runs a modified version (modified index): + +* [https://parsiya.net](https://parsiya.net). +* Source: [https://github.com/parsiya/parsiya.net](https://github.com/parsiya/parsiya.net) ## Contents - [Config file parameters](#config) @@ -55,15 +61,9 @@ paginate = 6 # Configures post URLs post = "/blog/:year-:month-:day-:title/" -# Make tags and categories work -# As of Hugo v0.33 these are not needed anymore -# [indexes] -# tag = "tags" -# category = "categories" - [params] - # If false, all of blog post will appear on front page (and in pagination) + # If false, all contents of posts will appear on the front page and in pagination truncate = true # Author's name (appears in meta tags and under posts) @@ -75,8 +75,9 @@ post = "/blog/:year-:month-:day-:title/" # Search engine URL searchEngineURL = "https://www.google.com/search" - # Text of the "Continue Reading" label. → == right arrow, but it gets messed up in the string so it was added to index.html manually - continueReadingText = "Would you like to know more?" + # Text of the "Continue Reading" label. Supports markdown and inline HTML. + # For example, → == right arrow. + continueReadingText = "Would you like to know more? →" # Google analytics code - remove if you do not have/want Google Analytics - needs JavaScript googleAnalytics = "UA-XXXXX-X" @@ -96,7 +97,7 @@ post = "/blog/:year-:month-:day-:title/" # Website's default description defaultDescription = "" - # Populate this with your own search keywords - these will appear in meta tags + # Populate with your search keywords - these will appear in meta tags # defaultKeywords = ["keyword1" , "keyword2" , "keyword3" , "keyword4"] # Set to true to hide ReadingTime on posts @@ -108,43 +109,43 @@ post = "/blog/:year-:month-:day-:title/" # Remove or set to false to use local fonts remoteFonts = false - # Remove or set to false to use FontAwesome CDN, otherwise the theme uses ForkAwesome local fonts. + # Remove or set to false to use FontAwesome CDN, otherwise, the theme uses ForkAwesome local fonts. # fontAwesome = false ``` ## Code highlight -This theme use the built-in Chroma highlighter with the `solarized-dark` theme. To use the Chroma highlighter, you need to disable Pygments with `pygmentsUseClassic=false`. +This theme uses the built-in [Chroma](https://github.com/alecthomas/chroma) highlighter with the `solarized-dark` theme. See all supported styles at [https://xyproto.github.io/splash/docs/all.html](https://xyproto.github.io/splash/docs/all.html). -The following options control code highlighting: +Some options to control code highlighting: ``` toml # Highlight shortcode and code fences (```) will be treated similarly pygmentscodefences = true # Change highlight style here. -# For a full list see: https://xyproto.github.io/splash/docs/all.html +# Full list: https://xyproto.github.io/splash/docs/all.html pygmentsStyle = "solarized-dark" -# Other Chroma options can be added here (and in the highlight shortcode in the markdown file) -# See list of supported options: https://gohugo.io/content-management/syntax-highlighting/#options -# for example: pygmentsoptions = "linenos=true" +# Add other Chroma options here (override them in the highlight shortcode inside markdown) +# List of supported options: https://gohugo.io/content-management/syntax-highlighting/#options +# For example: pygmentsoptions = "linenos=true" ``` For more information see [Syntax Highlighting](https://gohugo.io/extras/highlighting/) in Hugo's documentation. ## Markdown options -Blackfriday is Hugo's markdown engine. For a list of options see [Configure Blackfriday rendering](https://gohugo.io/overview/configuration/#configure-blackfriday-rendering). Blackfriday options can be set as follows: +Blackfriday is Hugo's markdown engine. For a complete list of options see [Configure Blackfriday rendering](https://gohugo.io/getting-started/configuration/#configure-blackfriday-rendering). Blackfriday options can be set as follows: ``` toml [blackfriday] - hrefTargetBlank = true # open the external links in a new window + hrefTargetBlank = true # open external links in a new window fractions = false ``` ## CSS override -You can override the built-in CSS and use your own. Just put your own CSS files in the `static` directory of your website (the one in the theme directory also works but is not recommended for obvious reasons) and modify the `customCSS` parameter. The path should be relative to the `static` folder. These CSS files will be added through the `header` partial after the built-in CSS file. +You can override the built-in CSS and add your own. Put your CSS files in the `static` directory of your website. While storing them inside the `themes/Hugo-Octopress/static` directory works, it's not recommended (keep your website and theme as separated as possible to be able to switch themes easily). Then modify the `customCSS` parameter. The path should be relative to the `static` folder. These CSS files will be added through the `header` partial after the built-in CSS file. -For example, if your custom CSS files are `static/css/custom.css` and `static/css/custom2.css` then `customCSS` will look like this: +For example, if custom CSS files are `static/css/custom.css` and `static/css/custom2.css` then `customCSS` will look like this: ``` toml [params] @@ -152,11 +153,11 @@ For example, if your custom CSS files are `static/css/custom.css` and `static/cs ``` ## Navigation menu -Links in the navigation menu (everything other than Google search and RSS icon) can be configured here. Navigation menu is generated using the `layouts/partials/navigation.html` template. +Links in the navigation menu (everything other than Google search and RSS icon) can be customized. The navigation menu is generated using the `layouts/partials/navigation.html` partial. -By default navigation menu links will open in the same window. You can change this behavior by setting the `navigationNewWindow` parameter to true. Links to root ("/") will always open in the same window. Currently Hugo does not support adding custom attributes to menus. +By default, navigation menu links will open in the same window. You can change this behavior by setting the `navigationNewWindow` parameter to true. Links to root ("/") will always open in the same window. Currently, Hugo does not support adding custom attributes to menus. -Links are sorted according to weight from left to right. For example a link with weight of `-10` will be to the left of links with weights `0` or `10`. Links can be added to the config file like this: +Links are sorted according to weight from left to right. For example, a link with weight of `-10` will appear to the left of links with weights `0` or `10`. Links can be added to the config file: ``` toml [[menu.main]] @@ -179,7 +180,7 @@ Links are sorted according to weight from left to right. For example a link with navigationNewWindow = true ``` -Search engine can also be customized: +Search engine customization: ``` toml [params] @@ -187,22 +188,22 @@ Search engine can also be customized: ``` ## Sidebar -Sidebar has four parts. From top to bottom it has: +The sidebar has four section, from top to bottom: * Sidebar header and text (optional). -* Social network icons (optional): Icons and links to Github, Bitbucket and more. -* Sidebar menu (optional): Links in sidebar (I use them for internal category pages but you can have external links). -* Recent posts: Displays last X (default is 5) posts. +* Social network icons (optional): Icons and links to Github, Bitbucket, and more. +* Sidebar menu (optional): Links in sidebar. +* Recent posts: Displays last X posts (default is 5). -The sidebar is generated using the partial template at `layouts/partials/sidebar.html`. +The sidebar is generated using the partial at `layouts/partials/sidebar.html`. ### Sidebar text -Sidebar text has two parts and both can be configured. Both values are passed to `markdownify` so you can use markdown (e.g. add links or new lines). +The sidebar text has two parts and both can be configured. Both are passed to `markdownify` so you can use markdown (e.g. add links or new lines). -* Sidebar header appears first in an `

` tag. It can be configured through the `sidebarHeader` parameter. -* Sidebar text appears under the header and can be configured by modifying `sidebarText`. +* Sidebar header appears first in an `

` tag. It can be configured with `sidebarHeader`. +* Sidebar text appears under the header and is in `sidebarText`. -New lines can be added with `
` or in markdown format (two spaces at the end of line or one empty line in between). When adding two new lines, remember to remove the indentation at the start of the new line otherwise the it will be treated as a codeblock. +Add new lines with `
` or using markdown (two spaces at the end of a line or one empty line in between two paragraphs). When adding two spaces, remember to remove the indentation at the start of the new line otherwise the it will be treated as a codeblock. ``` toml sidebarHeader = "Sidebar Header" @@ -212,7 +213,7 @@ sidebarText = """Here's a [link to google](https://www.google.com) Second line
Third line -This line has two spaces in the end to create a new line using markdown +This line has two spaces in the end to create a new line using markdown[two spaces here] Forth line """ ``` @@ -224,22 +225,23 @@ Sidebar social network icons are configured as follows: [params] github = "https://github.com/parsiya/" bitbucket = "https://bitbucket.org/parsiya/" - gitlab = "" + gitlab = "https://gitlab.com/parsiya" twitter = "https://twitter.com/cryptogangsta/" keybase = "https://keybase.io/parsiya/" + linkedin = "https://www.linkedin.com/in/parsiya/" stackoverflow = "" - linkedin = "" googleplus = "" youtube = "" facebook = "" instagram = "" + bitcoin = "" ``` -Icon sequence can be configured in `layouts/partials/sidebar.html` (look for `