Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make theme work as hugo module #111

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sudo: false

install:
- mkdir tools
- wget -q "https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz" -O "tools/hugo.tar.gz"
- wget -q "https://github.com/gohugoio/hugo/releases/download/v0.115.4/hugo_extended_0.115.4_Linux-64bit.tar.gz" -O "tools/hugo.tar.gz"
- tar -xzf tools/hugo.tar.gz -C tools

script:
Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Creative portfolio theme for hugo

[![Build Status](https://travis-ci.org/kishaningithub/hugo-creative-portfolio-theme.svg?branch=master)](https://travis-ci.org/kishaningithub/hugo-creative-portfolio-theme)
[![Join the chat at https://gitter.im/hugo-creative-portfolio-theme/Lobby](https://badges.gitter.im/hugo-creative-portfolio-theme/Lobby.svg)](https://gitter.im/hugo-creative-portfolio-theme/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Buy me a coffee](https://img.shields.io/badge/☕-Buy%20me%20a%20coffee-blue.svg)](https://www.paypal.me/kishansh/5)

Expand All @@ -12,6 +11,8 @@ This Hugo theme was ported from [Bootstrapious](https://bootstrapious.com/p/crea

## Installation

### Use theme component locally as git clone

Go to the directory where you have your Hugo site and run:

```bash
Expand All @@ -21,7 +22,26 @@ git clone https://github.com/kishaningithub/hugo-creative-portfolio-theme.git
rm -rf hugo-creative-portfolio-theme/.git
```

For more information read the official [setup guide](https://gohugo.io/overview/installing/) of Hugo.
For more information read the official documentation on [theme components](https://gohugo.io/hugo-modules/theme-components/).

### Use theme as hugo module

In the root directory of your project, initialise your project as hugo module and add the `hugo-creative-portfolio-theme` theme as dependency:

```bash
hugo mod init github.com/me/my-new-site
hugo mod get github.com/kishaningithub/hugo-creative-portfolio-theme
```

In your `hugo.toml` / `config.toml`, add these lines to add the theme:

```bash
[module]
[[module.imports]]
path = "github.com/google/docsy/dependencies"
```

For more information read the official documentation on [hugo modules](https://gohugo.io/hugo-modules/use-modules/) of Hugo.

## Configuration

Expand Down Expand Up @@ -101,4 +121,4 @@ This port is released under the MIT License. Check the [original theme license](

## Thanks

Thanks to [Steve Francia](https://github.com/spf13) for creating Hugo and the awesome community around the project. And also thanks to [Bootstrapious](http://bootstrapious.com/) for creating this awesome theme.
Thanks to [Steve Francia](https://github.com/spf13) for creating Hugo and the awesome community around the project. And also thanks to [Bootstrapious](https://bootstrapious.com/) for creating this awesome theme.
3 changes: 3 additions & 0 deletions exampleSite/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.hugo_build.lock
themes/
public/
9 changes: 8 additions & 1 deletion exampleSite/config.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
baseurl = "https://example.org/"
title = "Creative portfolio"
theme = "hugo-creative-portfolio-theme"
languageCode = "en-us"
# Enable comments by entering your Disqus shortname
disqusShortname = ""
# Enable Google Analytics by entering your tracking code
googleAnalytics = ""

# Run theme as local git clone
theme = "github.com/kishaningithub/hugo-creative-portfolio-theme"
# Or, if you want to run theme as hugo module
# [module]
# [[module.imports]]
# path = "github.com/google/docsy"


[params]
# Style options: default (pink), blue, green, pink, red, sea, violet
# Use custom.css for your custom styling
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/kishaningithub/hugo-creative-portfolio-theme

go 1.20
deining marked this conversation as resolved.
Show resolved Hide resolved