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 docsy example site use docsy theme as hugo module #156

Merged
merged 2 commits into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 17 additions & 5 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ enableMissingTranslationPlaceholders = true

enableRobotsTXT = true

# Hugo allows theme composition (and inheritance). The precedence is from left to right.
theme = ["docsy"]

# Will give values to .Lastmod etc.
enableGitInfo = true

Expand Down Expand Up @@ -140,9 +137,9 @@ github_project_repo = "https://github.com/google/docsy"
# Specify a value here if your content directory is not in your repo's root directory
# github_subdir = ""

# Uncomment this if you have a newer GitHub repo with "main" as the default branch,
# Uncomment this if your GitHub repo does not have "main" as the default branch,
# or specify a new value if you want to reference another branch in your GitHub links
# github_branch= "main"
github_branch= "master"

# Google Custom Search Engine ID. Remove or comment out to disable search.
gcs_engine_id = "d72aa9b2712488cc3"
Expand Down Expand Up @@ -220,3 +217,18 @@ enable = false
url = "https://example.org/mail"
icon = "fa fa-envelope"
desc = "Discuss development issues around the project"

# hugo module configuration

[module]
# uncomment line below for temporary local development of module
# replacements = "github.com/google/docsy -> ../../docsy"
[module.hugoVersion]
extended = true
min = "0.75.0"
[[module.imports]]
path = "github.com/google/docsy"
disable = false
[[module.imports]]
path = "github.com/google/docsy/dependencies"
disable = false
10 changes: 10 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module github.com/google/docsy-example

go 1.13

require (
github.com/FortAwesome/Font-Awesome v0.0.0-20210804190922-7d3d774145ac // indirect
github.com/google/docsy v0.1.1-0.20220321183617-02df04c0f2d4 // indirect
github.com/google/docsy/dependencies v0.2.0-pre.0.20220321183617-02df04c0f2d4 // indirect
Comment on lines +7 to +8
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deining - can you help me understand the version IDs here?

  • Why v0.1.1-* for docsy and v0.2.0-pre.* for docsy/dependencies?
  • Shouldn't both of these be 0.2.0-pre?
  • Is the v prefix to the module ID necessary?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can still go ahead and merge this @LisaFC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deining - can you help me understand the version IDs here?

* Why `v0.1.1-*` for `docsy` and `v0.2.0-pre.*` for `docsy/dependencies`?

The same question for me.

* Shouldn't both of these be 0.2.0-pre?

Yes, it should!

* Is the `v` prefix to the module ID necessary?

The v is not from me, it was auto-generated: All I did: on the command line, I entered hugo mod get github.com/google/[email protected], and go auto-magically converted this into v0.1.1-0.20220321183617-02df04c0f2d4. I don't like this either, but I left it as is.

I assume go expects something like x.x.x and gets somehow confused by the ´-pre´ suffix. As soon as we have 0.2.0 out, this is hopefully more consistent.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that the discussion in google/docsy#954 explains why the v prefix might be needed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks sense. Thanks for the explanation ✨

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a related question: how does one normally encode the ID of a Go module? That is, if my Go module m is meant to be at version x.y.z, when in the module's source files would I write / encode the ID? Or is that handled separately?

github.com/twbs/bootstrap v4.6.1+incompatible // indirect
)
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20210804190922-7d3d774145ac h1:AjwgwoaDsNEA1Wtc8pgw/BqG7SEk9bKxXPjEPQQ42vY=
github.com/FortAwesome/Font-Awesome v0.0.0-20210804190922-7d3d774145ac/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.1.1-0.20220321183617-02df04c0f2d4 h1:+vc8wn8oOlLhjUOTvP6ljXuIi03HZWb9jWc4ZhVrO9g=
github.com/google/docsy v0.1.1-0.20220321183617-02df04c0f2d4/go.mod h1:yuKLZHMX5CKiLUH55+ePFJaYnoSwUVVffNareaOGQYo=
github.com/google/docsy/dependencies v0.2.0-pre/go.mod h1:oPdn05sNt61uT6K+LqNRhYq1jeqrsbbQMDXkPdPscmA=
github.com/google/docsy/dependencies v0.2.0-pre.0.20220321183617-02df04c0f2d4 h1:EKYx2OlWxo2HBhZ+dWzZbufBfh+qMKmz2K1lf1GJmto=
github.com/google/docsy/dependencies v0.2.0-pre.0.20220321183617-02df04c0f2d4/go.mod h1:oPdn05sNt61uT6K+LqNRhYq1jeqrsbbQMDXkPdPscmA=
github.com/twbs/bootstrap v4.6.1+incompatible h1:75PsBfPU1SS65ag0Z3Cq6JNXVAfUNfB0oCLHh9k9Fu8=
github.com/twbs/bootstrap v4.6.1+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
3 changes: 2 additions & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[build]
[build.environment]
HUGO_VERSION = "0.94.0"
HUGO_VERSION = "0.96.0"
GO_VERSION = "1.18"