Coder Social home page Coder Social logo

alex-shpak / hugo-book Goto Github PK

View Code? Open in Web Editor NEW
3.2K 29.0 1.2K 7.54 MB

Hugo documentation theme as simple as plain book

Home Page: https://hugo-book-demo.netlify.app

License: MIT License

HTML 49.99% JavaScript 11.65% SCSS 38.36%
hugo hugo-theme documentation

hugo-book's Introduction

Hugo Book Theme

Hugo License: MIT Build with Hugo

Hugo documentation theme as simple as plain book

Screenshot

Features

  • Clean simple design
  • Light and Mobile-Friendly
  • Multi-language support
  • Customisable
  • Zero initial configuration
  • Handy shortcodes
  • Comments support
  • Simple blog and taxonomy
  • Primary features work without JavaScript
  • Dark Mode

Requirements

Installation

Install as git submodule

Navigate to your hugo project root and run:

git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book

Then run hugo (or set theme = "hugo-book"/theme: hugo-book in configuration file)

hugo server --minify --theme hugo-book

Install as hugo module

You can also add this theme as a Hugo module instead of a git submodule.

Start with initializing hugo modules, if not done yet:

hugo mod init github.com/repo/path

Navigate to your hugo project root and add [module] section to your hugo.toml:

[module]
[[module.imports]]
path = 'github.com/alex-shpak/hugo-book'

Then, to load/update the theme module and run hugo:

hugo mod get -u
hugo server --minify

Creating site from scratch

Below is an example on how to create a new site from scratch:

hugo new site mydocs; cd mydocs
git init
git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
cp -R themes/hugo-book/exampleSite/content.en/* ./content
hugo server --minify --theme hugo-book

Menu

File tree menu (default)

By default, the theme will render pages from the content/docs section as a menu in a tree structure.
You can set title and weight in the front matter of pages to adjust the order and titles in the menu.

Leaf bundle menu (Deprecated, to be removed in June 2022)

You can also use leaf bundle and the content of its index.md file as menu.
Given you have the following file structure:

├── content
│   ├── docs
│   │   ├── page-one.md
│   │   └── page-two.md
│   └── posts
│       ├── post-one.md
│       └── post-two.md

Create a file content/menu/index.md with the content:

+++
headless = true
+++

- [Book Example]({{< relref "/docs/" >}})
  - [Page One]({{< relref "/docs/page-one" >}})
  - [Page Two]({{< relref "/docs/page-two" >}})
- [Blog]({{< relref "/posts" >}})

And Enable it by setting BookMenuBundle: /menu in Site configuration.

Blog

A simple blog is supported in the section posts.
A blog is not the primary usecase of this theme, so it has only minimal features.

Configuration

Site Configuration

There are a few configuration options that you can add to your hugo.toml file.
You can also see the yaml example here.

# (Optional) Set Google Analytics if you use it to track your website.
# Always put it on the top of the configuration file, otherwise it won't work
googleAnalytics = "UA-XXXXXXXXX-X"

# (Optional) If you provide a Disqus shortname, comments will be enabled on
# all pages.
disqusShortname = "my-site"

# (Optional) Set this to true if you use capital letters in file names
disablePathToLower = true

# (Optional) Set this to true to enable 'Last Modified by' date and git author
#  information on 'doc' type pages.
enableGitInfo = true

# (Optional) Theme is intended for documentation use, therefore it doesn't render taxonomy.
# You can remove related files with config below
disableKinds = ['taxonomy', 'taxonomyTerm']

[params]
  # (Optional, default light) Sets color theme: light, dark or auto.
  # Theme 'auto' switches between dark and light modes based on browser/os preferences
  BookTheme = 'light'

  # (Optional, default true) Controls table of contents visibility on right side of pages.
  # Start and end levels can be controlled with markup.tableOfContents setting.
  # You can also specify this parameter per page in front matter.
  BookToC = true

  # (Optional, default none) Set the path to a logo for the book. If the logo is
  # /static/logo.png then the path would be 'logo.png'
  BookLogo = 'logo.png'

  # (Optional, default none) Set leaf bundle to render as side menu
  # When not specified file structure and weights will be used
  # Deprecated, to be removed in June 2022
  BookMenuBundle = '/menu'

  # (Optional, default docs) Specify section of content to render as menu
  # You can also set value to "*" to render all sections to menu
  BookSection = 'docs'

  # Set source repository location.
  # Used for 'Last Modified' and 'Edit this page' links.
  BookRepo = 'https://github.com/alex-shpak/hugo-book'

  # Specifies commit portion of the link to the page's last modified commit hash for 'doc' page
  # type.
  # Required if 'BookRepo' param is set.
  # Value used to construct a URL consisting of BookRepo/BookCommitPath/<commit-hash>
  # Github uses 'commit', Bitbucket uses 'commits'
  BookCommitPath = 'commit'

  # Enable 'Edit this page' links for 'doc' page type.
  # Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
  # Path must point to the site directory.
  BookEditPath = 'edit/master/exampleSite'

  # (Optional, default January 2, 2006) Configure the date format used on the pages
  # - In git information
  # - In blog posts
  BookDateFormat = 'Jan 2, 2006'

  # (Optional, default true) Enables search function with flexsearch,
  # Index is built on fly, therefore it might slowdown your website.
  # Configuration for indexing can be adjusted in i18n folder per language.
  BookSearch = true

  # (Optional, default true) Enables comments template on pages
  # By default partials/docs/comments.html includes Disqus template
  # See https://gohugo.io/content-management/comments/#configure-disqus
  # Can be overwritten by same param in page frontmatter
  BookComments = true

  # /!\ This is an experimental feature, might be removed or changed at any time
  # (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
  # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
  # Theme will print warning if page referenced in markdown does not exists.
  BookPortableLinks = true

  # /!\ This is an experimental feature, might be removed or changed at any time
  # (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
  BookServiceWorker = true

Multi-Language Support

Theme supports Hugo's multilingual mode, just follow configuration guide there. You can also tweak search indexing configuration per language in i18n folder.

Page Configuration

You can specify additional params in the front matter of individual pages:

# Set type to 'docs' if you want to render page outside of configured section or if you render section other than 'docs'
type = 'docs'

# Set page weight to re-arrange items in file-tree menu (if BookMenuBundle not set)
weight = 10

# (Optional) Set to 'true' to mark page as flat section in file-tree menu (if BookMenuBundle not set)
bookFlatSection = false

# (Optional) Set to hide nested sections or pages at that level. Works only with file-tree menu mode
bookCollapseSection = true

# (Optional) Set true to hide page or section from side menu (if BookMenuBundle not set)
bookHidden = false

# (Optional) Set 'false' to hide ToC from page
bookToC = true

# (Optional) If you have enabled BookComments for the site, you can disable it for specific pages.
bookComments = true

# (Optional) Set to 'false' to exclude page from search index.
bookSearchExclude = true

# (Optional) Set explicit href attribute for this page in a menu (if BookMenuBundle not set)
bookHref = ''

Partials

There are layout partials available for you to easily override components of the theme in layouts/partials/.

In addition to this, there are several empty partials you can override to easily add/inject code.

Empty Partial Placement
layouts/partials/docs/inject/head.html Before closing <head> tag
layouts/partials/docs/inject/body.html Before closing <body> tag
layouts/partials/docs/inject/footer.html After page footer content
layouts/partials/docs/inject/menu-before.html At the beginning of <nav> menu block
layouts/partials/docs/inject/menu-after.html At the end of <nav> menu block
layouts/partials/docs/inject/content-before.html Before page content
layouts/partials/docs/inject/content-after.html After page content
layouts/partials/docs/inject/toc-before.html At the beginning of table of contents block
layouts/partials/docs/inject/toc-after.html At the end of table of contents block

Extra Customisation

File Description
static/favicon.png Override default favicon
assets/_custom.scss Customise or override scss styles
assets/_variables.scss Override default SCSS variables
assets/_fonts.scss Replace default font with custom fonts (e.g. local files or remote like google fonts)
assets/mermaid.json Replace Mermaid initialization config

Plugins

There are a few features implemented as pluggable scss styles. Usually these are features that don't make it to the core but can still be useful.

Plugin Description
assets/plugins/_numbered.scss Makes headings in markdown numbered, e.g. 1.1, 1.2
assets/plugins/_scrollbars.scss Overrides scrollbar styles to look similar across platforms

To enable plugins, add @import "plugins/{name}"; to assets/_custom.scss in your website root.

Hugo Internal Templates

There are a few hugo templates inserted in <head>

To disable Open Graph inclusion you can create your own empty file \layouts\_internal\opengraph.html. In fact almost empty not quite empty because an empty file looks like absent for HUGO. For example:

<!-- -->

Shortcodes

By default, Goldmark trims unsafe outputs which might prevent some shortcodes from rendering. It is recommended to set markup.goldmark.renderer.unsafe=true if you encounter problems.

[markup.goldmark.renderer]
  unsafe = true

If you are using config.yaml or config.json, consult the configuration markup

Versioning

This theme follows a simple incremental versioning. e.g. v1, v2 and so on. There might be breaking changes between versions.

If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the master branch and update your website when needed.

Contributing

Contributions are welcome and I will review and consider pull requests.
Primary goals are:

  • Keep it simple.
  • Keep minimal (or zero) default configuration.
  • Avoid interference with user-defined layouts.
  • Avoid using JS if it can be solved by CSS.

Feel free to open issues if you find missing configuration or customisation options.

hugo-book's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hugo-book's Issues

When menu is too long, users won't be able to see items at the bottom.

I am trying to move my docusaurus book to hugo-book.
Actually, I found the layouts for the two look very similar.

However, while docusaurus handles a long menu very well.
Currently hugo-book does not seem to behave well in such situations.

Is it possible to improve upon this? Thanks.

Use this without theme

Is there anyway to use this theme for a particular "section" only and have a different theme for the rest of the site?

It would be awesome if instructions were added to readme despite it being an unorthodox case.

Is it possible to link nested docs?

Hey, I'm trying to organize the directory structure of my docs to follow the menu hierarchy:

---
headless: true
---

- [**About**]({{< relref "/docs/about/index.md" >}})
    - [Features]({{< relref "/docs/about/features.md" >}})
    ...

But this causes the following error:

Source changed "/Users/celicoo/go/src/github.com/celicoo/docli/docs/content/menu/index.md": CREATE
ERROR 2019/02/28 09:07:03 [en] REF_NOT_FOUND: Ref "/docs/about/features.md": "/Users/celicoo/go/src/github.com/celicoo/docli/docs/content/menu/index.md:6:18": page not found

Isn't this supported?

Unable to build the site using the theme

I am using yarn package manager to install hugo. I have installed the following hugo version
Hugo Static Site Generator v0.53-8FC339DC2529FF77E494A1C12CD1FF9FBCB880A4 darwin/amd64 BuildDate: 2018-12-24T08:24:44Z

However when I try to build the site, getting the following error
ERROR 2019/01/25 11:52:51 error: failed to transform resource: TOCSS: failed to transform "book.scss" (text/x-scss): this feature is not available in your current Hugo version

Kindly assist in this regard.

`ul a { display: block; }` causes strange layout for links in a list

If we have something like this in our content:

Here are some solutions:

*   You could go to [this site](https://example.org).
*   You could ....

The rendered content would become:

Here are some solutions:

I think this might not be desirable?

In addition, the bullet points have disappeared.

Menu on the left doesnot highlight the link if on the current Page

When I am on a page by clicking on the link on the menu, the clicked link is not shown highlighted. This happens if the BookMenuBundle option is set. The .Content is rendered within menu-bundle.html partial, which gives no control to style the clicked link. Kindly assist.

Introduce shortcodes

I think to introduce some shortcodes for documentation.
If you have some ideas please post here.

What I have now in mind:

  • Expandable panels
  • Multiple columns
  • Tabs
  • Button shorcode
  • Mermaid chart

Responsivness issues in mobile view

Hi,

I am really fond of your theme and try to build a site with it.

I found that text doesn't scale properly on my phone (720x1280 screen) with vertical view. It only works with horizontal view (screenshots attached). I can't make it smaller manually (although it works with bigger displays -- I checked the behavior on 1080x2160 screen where text didn't scale automatically but could be rescaled manually to fit the screen).

Is it "fixable"?

720x1280 vertical

720x1280 horizontal

normalize.min.css.map 404

Local server runs throw a 404 for a normalize.min.css.map file. Where is this error coming from? It's not grave in that it only pops up in the background on a local server (in the console) and doesn't appear on a live site.

I tried deleting line 2 in static/normalize.min.css in hugo-book but that did nothing. Again, this is not an error, I'm just curious.

Hugo Book + Bootstrap

I am keen in adding some more graphical tools to the content and found Bootstrap 4.3 could be great, I followed the installation notes and injected these 3 lines using the head injection mechanism.

Created a head.html on my website's layout/partials/docs/inject/head.html

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

And when i run the website the widgets I use work as desired, only problem is that the fonts and general proportions of the page amongst other things seem to be broken now.

My questions are;

  1. Is this the correct approach?
  2. Can I do this without breaking your design?
  3. Does this mean the normalize.min.css is not useless? How do I correct the new design to make it look like yours?

Thanks for the help, I hope I can contribute in the near future.
jb

git submodule install

hi - I am new to hugo (as in, first hour). I installed hugo on Ubuntu via the hugo.deb .

Hugo Static Site Generator v0.51 linux/amd64 BuildDate: 2018-11-07T10:10:13Z

so I go to "choose a theme" .. the README does not fit me. The one-line direction from hugo says
"Download a theme into the same-named folder". git submodule complains that the new project dir is not a git repo.

a README ought to cover the very, very beginner case well.. thanks!

BookSection: "*" should group by folder

When I configure the menu to "collect" both the book and the blog posts, these seem to appear on top of the menu and not only that, these are flat so the more blogposts, the more I push the menu down.

Can we use the folder containing them as a way to categorise?

thanks

add images

Hi,
is it possibile to add images inside pages? Markdown syntax seems not working.
I'm using netlify-github.

thanks for the good job.

Toc in mobile browsers

Hi and congrats for your really nice theme.

I am preparing a website and I noticed that when using the mobile theme, the table of content disappears.
Is there any way to show it, ex. in the beginning of the document or anywhere else?
Thank you in advance.
Mike

Documentation Improvements

Would be great if the docs could provide some info on customising the theme as well, from the ratio of the manu, fonts used, custom CSS, custom date formating and others.

Thanks.

Math formula support

I really love your work and try to build a note site based on this theme for my learning record. Have you planed to add math formula support into your great theme?
Or if you could give me some suggestions, I am glad to do it myself but cant find a way yet...
Sincere thanks.

Tables are not formatted nicely

Could you please review the formatting of tables so they look nice? at the moment the table frame is not rendered at all so it looks awful.

Name Surname
Jordi Bares
Pedro Almodovar

thanks in advance

Empty Open Page

Hi, after cloning the theme and running in local, I'm getting an empty open page.

Css

Can you provide unminified Css please

Suggestion, Add footer partial

It would be great to have a footer available as this is handy to me for debugging purposes, as in injecting a debug footer when required.

A structure a bit like this is what I mean... thanks

<!DOCTYPE html>
<html>
  {{- partial "head.html" . -}}
  <body>
    {{- partial "header.html" . -}}
    {{- block "main" . }}{{- end }}
    {{- partial "footer.html" . -}}
  </body>
</html>

Fix Indention in Code Block

There is a slight space or two indentions of the first line in multi-line code blocks. If you remove this line from _markdown.scss, it fixes it:

padding: 0 $padding-4;

Dark Theme

I've fallen in love with this theme and I'm requesting a dark theme. Apologies if this is not the right place to ask for it.

Configuration documentation is incorrect by BookMenuBundle

in README.md Written:

And Enable it by settings BookMenuBundle: /docs/menu in Site configuration

BookMenuBundle: /docs/menu # not working
BookMenuBundle: /menu # is ok

In addition, it is recommended that the configuration file be written in TOML syntax uniformly, otherwise the newcomer directly copies the configuration file and does not work.

.File.Dir and .File.Path on zero object

The terminal throws a pair of errors:

.File.Dir on zero object. Wrap it in if or with: {{ with .File }}{{ .Dir }}{{ end }}

and

.File.Path on zero object. Wrap it in if or with: {{ with .File }}{{ .Path }}{{ end }}

The former is probably from shared.html; about the latter I'm not quite sure. How would I resolve this?

scss not supported

Hi,

I just tried to setup your theme. I followed the get started instructions from gohugo page, added your theme as a git submodule and ended up with the following error message:

PS C:\Users\janik\Documents\knowledge_adnovum> hugo serve
...
ERROR 2018/11/30 14:40:21 error: failed to transform resource: TOCSS: failed to transform "book.scss" (text/x-scss): this feature is not available in your current Hugo version
Total in 19 ms
Error: Error building site: logged 1 error(s)
PS C:\Users\janik\Documents\knowledge_adnovum> hugo version
Hugo Static Site Generator v0.52 windows/amd64 BuildDate: 2018-11-28T14:07:10Z

Do I need to configure something to make scss conversion possible?

Add search bar

When the doc site grows bigger and bigger, it's hard for user to find wanted pages/docs/posts even in a hierarchy structured documentation. Therefore, a useful full text search bar is indeed needed.

Left menu foldable

Could we have foldable left menues? when you build a big structure it is rather exhausting to have so much visual noise.

Thanks in advance

Documentation on posts/ directory

it is not clear in the documentation that the posts/ directory must be named as such (as opposed to post/). This was not apparent when installing and led to multiple errors.

Automatically list pages when using menu bundle

I would like to have the side menu automatically list all pages under docs/ when using BookMenuBundle = "/menu". Right now it looks like I have to manually add each new page to content/menu/index.md. Is this possible?

I tried something like this but it doesn't work (I'm still a Hugo noob and learned that templates don't work in Markdown):

- [**Home**]({{< relref "/" >}})
- **Docs**
  {{ range where .Site.Pages "Dir" "docs" }}
  - [{{ .Title }}]({{< relref .File.Path >}})
  {{ end }}
- [**Blog**]({{< relref "/posts" >}})

Lots of warning while serving exampleSite

I'm getting lots of errors while trying to test it out.

Steps to reproduce:

$> hugo new site quickstart
$> cd quickstart
$> git init
$> git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book
$> cd themes/hugo-book/exampleSite
$> hugo server --themesDir ../..

These are the warnings:

Building sites … WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: categories/category.terms.en.html.html, categories/terms.en.html.html, categories/list.en.html.html, categories/category.terms.html.html, categories/terms.html.html, categories/list.html.html, categories/category.terms.en.html, categories/terms.en.html, categories/list.en.html, categories/category.terms.html, categories/terms.html, categories/list.html, taxonomy/category.terms.en.html.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/category.terms.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/category.terms.en.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/category.terms.html, taxonomy/terms.html, taxonomy/list.html, category/category.terms.en.html.html, category/terms.en.html.html, category/list.en.html.html, category/category.terms.html.html, category/terms.html.html, category/list.html.html, category/category.terms.en.html, category/terms.en.html, category/list.en.html, category/category.terms.html, category/terms.html, category/list.html, _default/category.terms.en.html.html, _default/terms.en.html.html, _default/list.en.html.html, _default/category.terms.html.html, _default/terms.html.html, _default/list.html.html, _default/category.terms.en.html, _default/terms.en.html, _default/list.en.html, _default/category.terms.html, _default/terms.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: categories/category.en.html.html, categories/taxonomy.en.html.html, categories/list.en.html.html, categories/category.html.html, categories/taxonomy.html.html, categories/list.html.html, categories/category.en.html, categories/taxonomy.en.html, categories/list.en.html, categories/category.html, categories/taxonomy.html, categories/list.html, taxonomy/category.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/category.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/category.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/category.html, taxonomy/taxonomy.html, taxonomy/list.html, category/category.en.html.html, category/taxonomy.en.html.html, category/list.en.html.html, category/category.html.html, category/taxonomy.html.html, category/list.html.html, category/category.en.html, category/taxonomy.en.html, category/list.en.html, category/category.html, category/taxonomy.html, category/list.html, _default/category.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/category.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/category.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/category.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: categories/category.en.html.html, categories/taxonomy.en.html.html, categories/list.en.html.html, categories/category.html.html, categories/taxonomy.html.html, categories/list.html.html, categories/category.en.html, categories/taxonomy.en.html, categories/list.en.html, categories/category.html, categories/taxonomy.html, categories/list.html, taxonomy/category.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/category.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/category.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/category.html, taxonomy/taxonomy.html, taxonomy/list.html, category/category.en.html.html, category/taxonomy.en.html.html, category/list.en.html.html, category/category.html.html, category/taxonomy.html.html, category/list.html.html, category/category.en.html, category/taxonomy.en.html, category/list.en.html, category/category.html, category/taxonomy.html, category/list.html, _default/category.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/category.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/category.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/category.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.terms.en.html.html, tags/terms.en.html.html, tags/list.en.html.html, tags/tag.terms.html.html, tags/terms.html.html, tags/list.html.html, tags/tag.terms.en.html, tags/terms.en.html, tags/list.en.html, tags/tag.terms.html, tags/terms.html, tags/list.html, taxonomy/tag.terms.en.html.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.terms.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/tag.terms.en.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/tag.terms.html, taxonomy/terms.html, taxonomy/list.html, tag/tag.terms.en.html.html, tag/terms.en.html.html, tag/list.en.html.html, tag/tag.terms.html.html, tag/terms.html.html, tag/list.html.html, tag/tag.terms.en.html, tag/terms.en.html, tag/list.en.html, tag/tag.terms.html, tag/terms.html, tag/list.html, _default/tag.terms.en.html.html, _default/terms.en.html.html, _default/list.en.html.html, _default/tag.terms.html.html, _default/terms.html.html, _default/list.html.html, _default/tag.terms.en.html, _default/terms.en.html, _default/list.en.html, _default/tag.terms.html, _default/terms.html, _default/list.html
WARN 2018/12/27 16:48:48 Found no layout for "taxonomy", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/tag.en.html.html, tags/taxonomy.en.html.html, tags/list.en.html.html, tags/tag.html.html, tags/taxonomy.html.html, tags/list.html.html, tags/tag.en.html, tags/taxonomy.en.html, tags/list.en.html, tags/tag.html, tags/taxonomy.html, tags/list.html, taxonomy/tag.en.html.html, taxonomy/taxonomy.en.html.html, taxonomy/list.en.html.html, taxonomy/tag.html.html, taxonomy/taxonomy.html.html, taxonomy/list.html.html, taxonomy/tag.en.html, taxonomy/taxonomy.en.html, taxonomy/list.en.html, taxonomy/tag.html, taxonomy/taxonomy.html, taxonomy/list.html, tag/tag.en.html.html, tag/taxonomy.en.html.html, tag/list.en.html.html, tag/tag.html.html, tag/taxonomy.html.html, tag/list.html.html, tag/tag.en.html, tag/taxonomy.en.html, tag/list.en.html, tag/tag.html, tag/taxonomy.html, tag/list.html, _default/tag.en.html.html, _default/taxonomy.en.html.html, _default/list.en.html.html, _default/tag.html.html, _default/taxonomy.html.html, _default/list.html.html, _default/tag.en.html, _default/taxonomy.en.html, _default/list.en.html, _default/tag.html, _default/taxonomy.html, _default/list.html

Running on a macOS with a Hugo installed from Homebrew. Concretely i'm using the version Hugo Static Site Generator v0.53/extended darwin/amd64

about homepage

sir, I like your theme very, and forked it, but where is the homepage,why the homepage is readme?
thanks!

Fonts not found?

Am trying out the theme on linux/firefox and am having a font issue. Is there anyway to make sure that Oxygen is used? Or is there any way to specify a different font?

Sorry if this is too simple to fix. Any help appreciated.

Otherwise the theme seems excellent.

Multi-level submenus

Is there any way to make subcategories in a category? Currently, I am using BookMenuBundle like below.
/content/menu/index.md

  • Math
    • Calculus
      • [Basics]({{< ref "/docs/math/calculus/basics.md" >}})
      • [Advanced]({{< ref "/docs/math/calculus/advanced.md" >}})
    • Statistics
      • [Basics]({{< ref "/docs/math/statistics/basics.md" >}})
  • Machine Learning
    • Projects
      • [Keyword Extraction]({{< ref "/docs/ml/keywordextraction.md" >}})
    • Theories
      • [Decision Theory]({{< ref "/docs/ml/monk/01_decision_theory.md" >}})
  • Deep Learning
    • [Backprop]({{< ref "/docs/deeplearning/backprop.md" >}})
  • Linux

"Projects" and "Theories" are child categories of "Machine Learning" category.
I want to show this hierarchical structure of menu in the sidebar. It would be really nice if categories are expandable/collapsible by clicking.

hugo server --theme hugo-book or hugo server -D gives this and shows no pages:

Building sites … WARN 2019/02/13 12:41:18 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: categories/terms.en.html.html, categories/list.en.html.html, categories/terms.html.html, categories/list.html.html, categories/terms.en.html, categories/list.en.html, categories/terms.html, categories/list.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/terms.html, taxonomy/list.html, _default/terms.en.html.html, _default/list.en.html.html, _default/terms.html.html, _default/list.html.html, _default/terms.en.html, _default/list.en.html, _default/terms.html, _default/list.html
WARN 2019/02/13 12:41:18 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/terms.en.html.html, tags/list.en.html.html, tags/terms.html.html, tags/list.html.html, tags/terms.en.html, tags/list.en.html, tags/terms.html, tags/list.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/terms.html, taxonomy/list.html, _default/terms.en.html.html, _default/list.en.html.html, _default/terms.html.html, _default/list.html.html, _default/terms.en.html, _default/list.en.html, _default/terms.html, _default/list.html
WARN 2019/02/13 12:41:18 Found no layout for "home", language "en", output format "HTML": create a template below /layouts with one of these filenames: index.en.html.html, home.en.html.html, list.en.html.html, index.html.html, home.html.html, list.html.html, index.en.html, home.en.html, list.en.html, index.html, home.html, list.html, _default/index.en.html.html, _default/home.en.html.html, _default/list.en.html.html, _default/index.html.html, _default/home.html.html, _default/list.html.html, _default/index.en.html, _default/home.en.html, _default/list.en.html, _default/index.html, _default/home.html, _default/list.html

Missing files in layouts error while using theme

I was trying to use this theme just for testing and playing with hugo but i seem to be getting an error using the theme with the defaults.
I did the following

hugo new site my-site
cd my-site
git init
git submodule add https://github.com/alex-shpak/hugo-book themes/book
hugo server --theme book

And i got the following error

Building sites … WARN 2019/01/21 13:23:53 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: categories/terms.en.html.html, categories/list.en.html.html, categories/terms.html.html, categories/list.html.html, categories/terms.en.html, categories/list.en.html, categories/terms.html, categories/list.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/terms.html, taxonomy/list.html, _default/terms.en.html.html, _default/list.en.html.html, _default/terms.html.html, _default/list.html.html, _default/terms.en.html, _default/list.en.html, _default/terms.html, _default/list.html
WARN 2019/01/21 13:23:53 Found no layout for "home", language "en", output format "HTML": create a template below /layouts with one of these filenames: index.en.html.html, home.en.html.html, list.en.html.html, index.html.html, home.html.html, list.html.html, index.en.html, home.en.html, list.en.html, index.html, home.html, list.html, _default/index.en.html.html, _default/home.en.html.html, _default/list.en.html.html, _default/index.html.html, _default/home.html.html, _default/list.html.html, _default/index.en.html, _default/home.en.html, _default/list.en.html, _default/index.html, _default/home.html, _default/list.html
WARN 2019/01/21 13:23:53 Found no layout for "taxonomyTerm", language "en", output format "HTML": create a template below /layouts with one of these filenames: tags/terms.en.html.html, tags/list.en.html.html, tags/terms.html.html, tags/list.html.html, tags/terms.en.html, tags/list.en.html, tags/terms.html, tags/list.html, taxonomy/terms.en.html.html, taxonomy/list.en.html.html, taxonomy/terms.html.html, taxonomy/list.html.html, taxonomy/terms.en.html, taxonomy/list.en.html, taxonomy/terms.html, taxonomy/list.html, _default/terms.en.html.html, _default/list.en.html.html, _default/terms.html.html, _default/list.html.html, _default/terms.en.html, _default/list.en.html, _default/terms.html, _default/list.html
ERROR 2019/01/21 13:23:53 error: failed to transform resource: TOCSS: failed to transform "book.scss" (text/x-scss): this feature is not available in your current Hugo version
Total in 2 ms
Error: Error building site: logged 1 error(s)

Please allow relative links

I would like to serve this site from a non-root directory (kind of like example.com/hugo-book/), but when I do, it has formatting issues:

image

compared to this:

image

Menu on the left realigns after click on menu item.

Hi,

If I click on menu item on the left, the entire page refreshes and the menu is scrolled to the top. It doesnot maintain the position of where it was clicked initially. This leads to a bad UX, where the user has to scroll again all the way down on the menu to go back the previous position. Kindly fix the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.