Giter Club home page Giter Club logo

allinone's Introduction

AllinOne

Hugo theme - AllinOne.

Demo

Here are some screen shots.

Carousel

List

Post

Features

  • Responsive full image carousel (Responsive text layout on it should be improved)
  • Suited for blogging and personal webpages with static profile image (avatar) and website image (faviconfile)
  • Smooth scroll && hierarchical TOC Scrollspy for content (h1~h4)
  • Syntax highlighting with highlightjs
  • Katex for Latex
  • Google Analytics
  • Font Awesome 3.1.0
  • Built-in Tags, Series and Categories && show recomendations of the section in the sidebar
  • Built-in pagination for sections
  • Previous/Next post button
  • Post card list with summary (with/without an intro picture) && Series card list in the sidebar

Most features are optional and can be individually enabled/disabled in your config.toml.

Table of Contents

Quick Start

From the root of your Hugo site, clone the theme into themes/AllinOne by running:

# Clone theme into the themes/AllinOne directory
$ git clone https://github.com/orianna-zzo/AllinOne.git themes/AllinOne

Usage

Configuration

Please see the sample config.toml. The theme is built on Hugo v0.46.

If you use this as a theme of your project website (not the root directory),make sure not to use a forward slash / in the beginning of a PATH in your config.toml, img in your post head and url in your data direcotory, because Hugo will turn it into a relative URL and the absURL function will have no effect.

Carousel Picture

Set two params in config.toml, slidesDirPath and slidesDirPathURL.

slidesDirPath sets the directory path for hugo server to search. slidesDirPathURL sets the rel url for the images.

Here are simple examples for quick start.

# if you want to use images in the theme (defult in the theme)
slidesDirPath    = "themes/AllinOne/static/img/header-slides"  
slidesDirPathURL = "img/header-slides"

# if you want to use images in static/img/header-slides
slidesDirPath  = "static/img/header-slides"  
slidesDirPathURL = "img/header-slides"

Post Intro Picture

List the image path in the YAML head of the post. For example:

---
date: "2018-08-13T00:14:19+08:00"
publishdate: "2018-08-13+08:00"
lastmod: "2018-08-13+08:00"
draft: false
title: "This is an example"
tags: ["css", "blog"]
series: ["Example"]
categories: ["Sci"]
img: "images/blog/2018-08/test5.jpg"
toc: true
summary: "This is an example of adding an intro picture to the post. "
---

Post Summary

There are three ways to add summary to each post.

  • Hugo-defined Summary Split

    By default, Hugo automatically takes the first 70 words of your content as its summary and stores it into the .Summary page variable for use. It is much easier with no additional work, but it might not the one you want.

    If Chinese/Japanese/Korean (CJK) languages are in the content, set hasCJKLanguage as true in the config.toml, so that Hugo could auto detect CJK languages to make .Summary and .WordCount behave correctly. See here

    The length of text to show in a .Summary could be set as summaryLength in config.toml. See here

  • User-defined Summary Split

    Alternatively, you may add the <!--more--> summary divider where you want to split the article. Content that comes before the summary divider will be used as that content’s summary and stored in the .Summary page variable with all HTML formatting intact. The only extra work is add the <!--more--> summary divider.

  • User-defined Summary

    You may want a specific summary for the post other than the front sentences of the content. In this case, you could but summary in the yaml head of the post with the param name summary.

Series Intro Picture

By default, the series recommendation card list in the sidebar use themes/AllinOne/static/img/default.png as intro picture. You can set name, img, and summary in data/series.toml. name of the series should be in lower capitals. If the series cannot be found in series.toml, default.png will be used.

Here is an example of data/series.toml:

[[series]]
name = "review repo"
img = "images/blog/2018-08/test3.jpg"
summary = "This is the place I write reviews"

[[series]]
name = "blog diary"
img = "images/blog/2018-08/test5.jpg"
summary = "How I build up my personal website"

License

Licensed under the MIT License. See the LICENSE file for more details.

Thanks

Thanks to the following projects I learned from:

  • Hugo theme cocoa
  • Material design for Bootstrap4 mdb

allinone's People

Contributors

orianna-zzo avatar

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

allinone's Issues

How can I change Font?

字体 Raleway 看起来参差不齐(尤其是数字)
我修改了 main.css but failed
what should I do?

Errors on initial build

Immediately after starting a new blogdown site with RStudio, using this theme as the base, I tried serving the site and got an unexpected error:

Warning: You are recommended to ignore certain files in config.toml: set the option ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
> blogdown::serve_site()
Rendering content/blog/2015-07-23-r-rmarkdown.Rmd
Building sites … WARN 2019/03/13 14:57:33 Data for key 'series' in path 'AllinOne\series.toml' is overridden by higher precedence data already in the data tree

                   | EN   
+------------------+-----+
  Pages            |  96  
  Paginator pages  |   3  
  Non-page files   |   1  
  Static files     | 144  
  Processed images |   0  
  Aliases          |   3  
  Sitemaps         |   1  
  Cleaned          |   0  

Total in 645 ms
Error in `row.names<-.data.frame`(`*tmp*`, value = value) : 
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ‘public/categories/????’, ‘public/tags/??’, ‘public/tags/???’, ‘public/tags/????’ 

start error

hugo serve --theme=Allinone --buildDrafts

Building sites … ERROR 2018/11/22 22:50:36 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
ERROR 2018/11/22 22:50:36 render of "taxonomyTerm" failed: execute of template failed: template: _default/terms.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
ERROR 2018/11/22 22:50:36 render of "home" failed: execute of template failed: template: index.html:3:6: executing "header" at <partial "homepage-he...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/homepage-header.html:1:22": execute of template failed: template: partials/homepage-header.html:1:22: executing "partials/homepage-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil
Total in 38 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:11:9: executing "header" at <partial "page-header...>: error calling partial: "/Users/ferried/Projects/blog/themes/Allinone/layouts/partials/page-header.html:1:22": execute of template failed: template: partials/page-header.html:1:22: executing "partials/page-header.html" at <len .Site.Params.sli...>: error calling len: len of untyped nil

blog-preview problem of windows

$ hugo server --theme=AllinOne --buildDrafts                                        Building sites … ERROR 2019/02/14 10:26:36 render of "taxonomyTerm" failed: "D:\    blog\themes\AllinOne\layouts\_default\terms.html:1:22": execute of template fail    ed: template: _default\terms.html:11:9: executing "header" at     der...>: error calling partial: "D:\blog\themes\AllinOne\layouts\partials\page-h    eader.html:1:22": execute of template failed: template: partials/page-header.htm    l:1:22: executing "partials/page-header.html" at : erro    r calling len: len of untyped nil                                                   ERROR 2019/02/14 10:26:36 render of "home" failed: execute of template failed: t    emplate: index.html:3:6: executing "header" at : error     calling partial: "D:\blog\themes\AllinOne\layouts\partials\homepage-header.html:    1:22": execute of template failed: template: partials/homepage-header.html:1:22:     executing "partials/homepage-header.html" at : error c    alling len: len of untyped nil                                                      Total in 835 ms                                                                     Error: Error building site: failed to render pages: render of "taxonomyTerm" fai    led: "D:\blog\themes\AllinOne\layouts\_default\terms.html:1:22": execute of temp    late failed: template: _default\terms.html:11:9: executing "header" at     "page-header...>: error calling partial: "D:\blog\themes\AllinOne\layouts\partia    ls\page-header.html:1:22": execute of template failed: template: partials/page-h    eader.html:1:22: executing "partials/page-header.html" at     ..>: error calling len: len of untyped nil

add subscribe to newsletter form

A section where people can register to a newsletter would be nice to have here as well :)

For example, can be integration with MailChimp

`pygmentsUseClasses = true` not generating classes

Hello!

I am using hugo v0.49.2/extended linux/amd64 with AllinOne theme.

I have set pygmentsUseClasses = true in config.toml[0]
But I still can't see any CSS classes in the generated source code of https://rootkea.gitlab.io/blog/2018-03/style-guide/

I expected CSS classes to get generated for the code block under "Monospace / Preformatted" section. Also, if I choose another theme e.g. kiera I can perfectly see classes like chroma, nb, c1 etc. inserted in the said code block.

Am I missing something?

Thanks!

[0] https://gitlab.com/rootkea/rootkea.gitlab.io/blob/master/config.toml

Disable dynamic carousel?

Thanks, this is a great theme.

Is there a way to disable the dynamic image change on every page? I would like to change the background image manually by clicking on the arrows.

如何将KaTeX"\\("改为"$"

我在 auto-render.js 中发现如下注释

  optionsCopy.delimiters = optionsCopy.delimiters || [{
    left: "$$",
    right: "$$",
    display: true
  }, {
    left: "\\(",
    right: "\\)",
    display: false
  }, // LaTeX uses $…$, but it ruins the display of normal `$` in text:
  // {left: "$", right: "$", display: false},
  //  \[…\] must come last in this array. Otherwise, renderMathInElement
  //  will search for \[ before it searches for $$ or  \(
  // That makes it susceptible to finding a \\[0.3em] row delimiter and
  // treating it as if it were the start of a KaTeX math zone.

这是否说明不可更改?

Add Archives

Thank you for your nice work!

Here's one suggestion:

It's better to add archives like this:
image

Visitors can check articles by date, besides tags.

自适应有一些问题

这个项目美术感非常好. 可惜一些布局没有做自适应的优化, 在移动版下有很多问题:

  • 卡片容器在小屏幕下margin 不缩小, 导致内容挤压
  • 内容页都有版头, 似乎必要性不强
  • 有头像的内容页版头, 头像仍然会右对齐

稍微有点美中不足. 我先试着在folk里解决一下

Having troubles getting Latex rendered correctly

Hi Zi'ou, thank you for this template. As the title says I'm experiencing some troubles with Latex/Katex on your site:

I'm using VSCode + Markdown plugin to instantly preview and render my .md files (with latex inside). This is how the edit looks on my local machine:

2019-05-05-1557048833_screenshot_1920x1080

And this is how it gets rendered on the local Hugo server I host to visualize the post I'm editing:

2019-05-05-1557049016_screenshot_1920x1080

Can you give me an hint on what I am getting wrong? Thanks!

部署

请问能将部署的操作再详细的阐述一遍么

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.