How does one install/update this theme?
I’ve inherited a Hugo project at work that uses the DocuAPI theme. I want to update it, but I don’t know how and I can’t find any instructions on either the Hugo documentation or in this repository on how to do it.
So, how does one install or update this theme?
In the project, I find a themes/DocuAPI directory that looks like it is a different (read: much older) version of the same files contained within this repository at the root level (i.e. there are archetypes and assets directories, etc.). However, just downloading a copy of this repository’s contents and replacing the directory in the project just breaks the project build (with Error: module "github.com/slatedocs/slate" not found; either add it as a Hugo Module or store it in "/src/themes".: module does not exist) and it’s not clear what the issue really is. It sounds like a dependency issue, but since there are no instructions on how to install dependencies, I turn in circles.
Furthermore, I can’t find any information as to which version of the theme I’m using in the project right now. That prevents me from looking at the release log and updating in small steps in order to take care of any breaking changes that might’ve happened along the way.
For me it looks like V2 is in a private repo, i can not open it.
Ok after a little bit ... new things here:
-
create a new site
hugo new site quickstart -
download the master project here from github
-
copy the whole folder after unzip for sure to quickstart/themes
-
rename docuapi-master to docuapi
-
copy everything from the themes/docuapi/exampleSite Folder to the root of quickstart
-
change config.toml line 2 to this --> themesdir = "themes/"
-
start server inside your quickstart folder with
hugo serverThank you very much for lost 2 hours of my live ;-)
Thank you very much for this Theme @bep !
Thank you for posting this.
I followed the instructions, exactly, and got the error below.
I did have to add a themesdir = "themes/" line to config.toml, as I couldn't find an existing string in the file.
D:\me\Desktop\quickstart>hugo server
go: github.com/bep/docuapi/[email protected] (replaced by ../): reading ..\go.mod: open D:\me\Desktop\go.mod: The system cannot find the file specified.
Error: failed to download modules: failed to execute 'go [mod download]': failed to execute binary "go" with args [mod download]: go: github.com/bep/docuapi/[email protected] (replaced by ../): reading ..\go.mod: open D:\me\Desktop\go.mod: The system cannot find the file specified.
*errors.errorString
Ok, I was able to get the demo site up and running by simply:
git clone https://github.com/bep/docuapi.git
cd docuapi/exampleSite
hugo serve
hugo new site quickstart
cd quickstart
hugo mod init github.com/author/project
Edit hugo config, then:
hugo mod get
hugo serve
Resources:
- https://gohugo.io/hugo-modules/configuration/#module-configuration-imports
- https://gohugo.io/hugo-modules/use-modules/#use-a-module-for-a-theme