GithubHelp home page GithubHelp logo

aral / hugo-theme-docdock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vjeantet/hugo-theme-docdock

1.0 1.0 0.0 9.91 MB

Declination of @matcornic Learn theme to Hugo

Home Page: http://docdock.netlify.com/

License: MIT License

HTML 15.66% CSS 44.85% JavaScript 39.49%

hugo-theme-docdock's Introduction

Hugo docDock Theme

This repository contains a theme for Hugo, based on great Matcornic Learn theme.

Visit the theme documentation to see what is going on. It is actually built with this theme.

Main features

  • Search
  • Unlimited menu levels
  • RevealJS presentation from markdown (embededed or fullscreen page)
  • Attachments files
  • List child pages
  • Include segment of content from one page in another (Excerpt)
  • Automatic next/prev buttons to navigate through menu entries
  • Mermaid diagram
  • Icons, Buttons, Alerts, Panels, Tip/Note/Info/Warning boxes
  • Image resizing, shadow...
  • Customizable look and feel

Overview

Installation

Check that your Hugo version is minimum 0.30 with hugo version. We assume that all changes to Hugo content and customizations are going to be tracked by git (GitHub, Bitbucket etc.). Develop locally, build on remote system.

To start real work:

  1. Initialize Hugo
  2. Install DocDock theme
  3. Configure DocDock and Hugo

Prepare empty Hugo site

Create empty directory, which will be root of your Hugo project. Navigate there and let Hugo to create minimal required directory structure:

$ hugo new site .

AFTER that, initialize this as git directory where to track further changes

$ git init

Next, there are at least three ways to install DocDock (first recommended):

  1. As git submodule
  2. As git clone
  3. As direct copy (from ZIP)

Navigate to your themes folder in your Hugo site and use perform one of following scenarios.

1. Install DocDock as git submodule

DocDock will be added like a dependency repo to original project. When using CI tools like Netlify, Jenkins etc., submodule method is required, or you will get theme not found issues. Same applies when building site on remote server trough SSH.

If submodule is no-go, use 3rd option.

On your root of Hugo execute:

$ git submodule add https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock

Next initialize submodule for parent git repo:

$ git submodule init
$ git submodule update

Now you are ready to add content and customize looks. Do not change any file inside theme directory.

If you want to freeze changes to DocDock theme itself and use still submodules, fork private copy of DocDock and use that as submodule. When you are ready to update theme, just pull changes from origin to your private fork.

2. Install DocDock simply as git clone

This method results that files are checked out locally, but won't be visible from parent git repo. Probably you will build site locally with hugo command and use result from public/ on your own.

$ git clone https://github.com/vjeantet/hugo-theme-docdock.git themes/docdock

3. Install DocDock from ZIP

All files from theme will be tracked inside parent repo, to update it, have to override files in theme. Download following zip and extract inside themes/.

https://github.com/vjeantet/hugo-theme-docdock/archive/master.zip

Name of theme in next step will be hugo-theme-docdock-master, can rename as you wish.

Configure

Import sample config from sample site to Hugo root.

$ cp themes/docdock/exampleSite/config.toml .

Change following config.toml line as needed, depending on method above:

theme = "<hugo-theme-docdock-dir-name>"

Comment out following line, so default themes/ will be used:

# themesdir = "../.."

(Bonus)

Create empty file .gitkeep inside public/ and add following to .gitignore. This way it will keep repo smaller and won't bring build result files and errors to remote checkout places:

/public/*
!/public/.gitkeep

Preview site

$ hugo server

to browse site on http://localhost:1313

Usage

hugo-theme-docdock's People

Contributors

adamlamar avatar aral avatar byzheng avatar enigmacurry avatar erikjasiak avatar farmergreg avatar fmuro avatar giuliov avatar gwleclerc avatar johnblood avatar jose-oc avatar kamilchm avatar karlmacklin avatar lierdakil avatar matcornic avatar petzi53 avatar pilskalns avatar remi31000 avatar ripienaar avatar shazic avatar siamkreative avatar tarpdalton avatar tonivj5 avatar uweschaefer avatar vielmetti avatar viertaxa avatar vjeantet avatar w-floyd avatar xipas avatar zivbk1 avatar

Stargazers

 avatar

Watchers

 avatar

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.