docuapi icon indicating copy to clipboard operation
docuapi copied to clipboard

How does one install/update this theme?

Open ghost opened this issue 4 years ago • 5 comments

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.

ghost avatar Oct 21 '21 14:10 ghost

For me it looks like V2 is in a private repo, i can not open it.

urbanswelt avatar Nov 06 '21 17:11 urbanswelt

Ok after a little bit ... new things here:

  1. create a new site hugo new site quickstart

  2. download the master project here from github

  3. copy the whole folder after unzip for sure to quickstart/themes

  4. rename docuapi-master to docuapi

  5. copy everything from the themes/docuapi/exampleSite Folder to the root of quickstart

  6. change config.toml line 2 to this --> themesdir = "themes/"

  7. start server inside your quickstart folder with hugo server Thank you very much for lost 2 hours of my live ;-)

Thank you very much for this Theme @bep !

urbanswelt avatar Nov 06 '21 19:11 urbanswelt

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

peddamat avatar Feb 28 '23 00:02 peddamat

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

peddamat avatar Feb 28 '23 00:02 peddamat

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

tyler71 avatar Aug 10 '23 16:08 tyler71