Skip to content

hugo-fixit/component-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

{component-xxx}

👉 English README | 简体中文说明

TODO description here if needed

Demo

TODO demo here if needed

Requirements

  • FixIt v0.3.12 or later.

Install Component

The installation method is the same as installing a theme. There are several ways to install, choose one, Here are two mainstream ways.

Install as Hugo Module

First make sure that your project itself is a Hugo module.

Then add this theme component to your hugo.toml configuration file:

[module]
  [[module.imports]]
    path = "github.com/hugo-fixit/FixIt"
  [[module.imports]]
    path = "github.com/hugo-fixit/{component-xxx}"

On the first start of Hugo it will download the required files.

To update to the latest version of the module run:

hugo mod get -u
hugo mod tidy

Install as Git Submodule

Clone FixIt and this git repository into your theme folder and add it as submodules of your website directory.

git submodule add https://github.com/hugo-fixit/FixIt.git themes/FixIt
git submodule add https://github.com/hugo-fixit/{component-xxx}.git themes/{component-xxx}

Next edit hugo.toml of your project and add this theme component to your themes:

theme = ["FixIt", "{component-xxx}"]

Configuration

In order to Inject the partial {component-xxx}.html into the custom-assets through the custom block opened by the FixIt theme in the layouts/partials/custom.html file, you need to fill in the following necessary configurations:

[params]
  [params.customPartials]
    head = []
    profile = []
    aside = []
    comment = []
    footer = []
    widgets = []
    assets = [
      "inject/{component-xxx}.html",
    ]
    postFooterBefore = []
    postFooterAfter = []

TODO configuration here if needed ...

Use Shortcode

Here is an example of usage:

{{< shortcode-xxx >}}

References

About

Create a new Hugo theme component (skeleton)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published