GithubHelp home page GithubHelp logo

dermolly / hugo-material-docs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from digitalcraftsman/hugo-material-docs

3.0 2.0 2.0 6.05 MB

Port of Martin Donath's mkdocs-material theme to Hugo

Home Page: http://themes.gohugo.io/theme/material-docs/

License: MIT License

HTML 0.53% JavaScript 95.08% CSS 4.36% Yacc 0.03%

hugo-material-docs's Introduction

Notice:

If you update to this version, you'll need to do the following:

  1. rename all 'index.md' to '_index.md'.
  2. rename all 'index.html' to '_index.html'.
  3. set the layout to 'single' in the header sections.

Material Docs

A material design theme for Hugo.

Screenshot

Add as submodule

Add to an existing repo as a submodule navigate to your themes directory and run:

git submodule add -- https://github.com/jshook/hugo-material-docs.git ./hugo-material-docs

When your repo gets cloned the user must run:

git submodule update --init
git submodule sync

Quick start

Install with git:

git clone https://github.com/digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs

Next, take a look in the exampleSite folder at. This directory contains an example config file and the content for the demo. It serves as an example setup for your documentation.

Copy at least the config.toml in the root directory of your website. Overwrite the existing config file if necessary.

Hugo includes a development server, so you can view your changes as you go - very handy. Spin it up with the following command:

hugo server

Now you can go to localhost:1313 and the Material theme should be visible. For detailed installation instructions visit the demo.

Noteworthy changes of this theme are listed in the changelog.

Acknowledgements

A big thank you to Martin Donath. He created the original Material theme for Hugo's companion MkDocs. This port wouldn't be possible without him.

Furthermore, thanks to Steve Francia for creating Hugo and the awesome community around the project.

Features

Download-Links / Stars (GitHub)

One of the main features of this template is showing a link to the GitHub repo and a download button / star count for the repo on the left. You can also activate a custom download url, if this works better for you.

Warning

Only GitHub-Download or Custom-Download URL can be used! Either set use_github_download to true or provide a url in custom_download_url

GitHub-Star Count

use_github_star = "true"
repo_url = "https://github.com/gohugoio/hugo"

GitHub-Download URL

use_github_download = "true"
repo_url = "https://github.com/gohugoio/hugo"

Custom-Download URL

custom_download_url = "https://gohugo.io/getting-started/installing"

Build Date

If you want to add a build date to each page, simply specify the variable build_date_format in your config.
How to format date in hugo

Font Selection

If you don't want to use the standard font "Roboto (Mono)", you can select fonts from google:

[params]
[params.font]
  code = "Noto Serif"
  text = "Noto Sans"

(insert that code in config.toml)

Buttons

Use buttons with icons in your text text:

{{% button href="/test" icon="fab fa-github" icon-position="right" %}}text and icon after text{{% /button %}}

Social Links

We added support for matrix, irc and mailing list links:

[social]
    matrix = "<link to matrix channel, accessable via webpage (like matrix.org provides)>"
    irc = "<url that would follow after 'irc://'>"
    mailinglist = "<link to subscription interface>"

Spoiler

Put a spoiler in your page:

{{< spoiler "Button Text Here" >}}
Your spoiler text her
{{< /spoiler >}}

or with a seperate hide button text:

{{< spoiler "show spoiler" "hide spoiler" >}}
Your spoiler text her
{{< /spoiler >}}

License

The theme is released under the MIT license. Read the license for more information.

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.