Skip to content

Commit

Permalink
fix: regression #114
Browse files Browse the repository at this point in the history
Signed-off-by: weru <[email protected]>
  • Loading branch information
doodlebunnyhops authored and onweru committed Jul 9, 2023
1 parent 087bbae commit cdf6b3d
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 122 deletions.
3 changes: 1 addition & 2 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ title = "Compose Docs"
enableRobotsTXT = true
# this example loads the theme as hugo module
# comment out line below, and uncomment the line after it if you prefer to load the theme normally
# theme = ["github.com/onweru/compose"] # edit this if you'ld rather use a fork of this repo
theme = ["github.com/rwstorer/hugo-theme-compose"] # change back to onweru after import
theme = ["github.com/onweru/compose"] # edit this if you'ld rather use a fork of this repo
# theme = "compose"
enableGitInfo = true

Expand Down
12 changes: 5 additions & 7 deletions exampleSite/config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# use the setting below to set multiple docs directories.
# docSections = ["docs", "tutorials"]



uniqueHomePage = true # change to false to add sidebar to homepage

blogDir = "blog" # can be posts, blog e.t.c
Expand All @@ -25,6 +23,10 @@ showLineNumbers = false

otherSearchableFields = ["Tags", "Categories", "CustomField"] # As they appear in frontmatter

# Defaults to true if not set
# Enable copyRight Footer Stamp. Takes in attribution
enableCopyright = false

# search
[search]
on = true
Expand All @@ -49,9 +51,5 @@ key = "da87401a458102ec6bbd6cc5e5cf8d95" # Search-Only API Key
# optional
# attribution. Feel free to delete this
[author]
name = "Bleh"
name = "Weru"
url = "https://neuralvibes.com/author/"

# Defaults to true if not set
# Enable copyRight Footer Stamp. Takes in attribution
enableCopyright = true
14 changes: 7 additions & 7 deletions exampleSite/content/docs/compose/shortcodes-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ draft: true
```sh
{{</* block "grid-2" */>}}
{{</* column */>}}
#### Coumn 1
#### Coumn 1

Lorem ipsum dolor sit amet,
Lorem ipsum dolor sit amet,
...

{{</* button "https://github.com/onweru/compose" "Download Theme" */>}}
Expand All @@ -27,11 +27,11 @@ Lorem ipsum dolor sit amet,

{{< block "grid-2" >}}
{{< column >}}
#### Coumn 1
#### Coumn 1

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et

dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Expand All @@ -44,9 +44,9 @@ Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
#### Coumn 2


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et

> dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
> dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Expand Down
7 changes: 2 additions & 5 deletions exampleSite/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
module compose-exampleSite

go 1.15
go 1.19

require (
github.com/onweru/compose v0.0.0-20230709140616-b352d2c11cd8 // indirect
github.com/rwstorer/hugo-theme-compose v0.0.0-20230705005233-e37ac6973101 // indirect
)
require github.com/onweru/compose v0.0.0-20230709163331-af3e133abf10 // indirect
40 changes: 2 additions & 38 deletions exampleSite/go.sum
Original file line number Diff line number Diff line change
@@ -1,38 +1,2 @@
github.com/onweru/compose v0.0.0-20230227161459-202a5a6f8622 h1:7X9jqnJv8pMmoeOvh9nbz9AiG9a8yAhbpZOmhuirgcs=
github.com/onweru/compose v0.0.0-20230227161459-202a5a6f8622/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230227162209-f2a7a2cf4e89 h1:EeqMUW5Hq0DSVsHiYVuxcoDSsa5OmVrIGkAA63bdBG0=
github.com/onweru/compose v0.0.0-20230227162209-f2a7a2cf4e89/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230227162511-e82578acece8 h1:lPXtfSI10o/exi3EIgPV5bDVEiIUgX+ywlw/lhSpOSQ=
github.com/onweru/compose v0.0.0-20230227162511-e82578acece8/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230228151044-bf9588061a3f h1:U1TNuLgxtmNjIA3bZ4yIU1pM/8+2bBYZ/2QW4QF49J8=
github.com/onweru/compose v0.0.0-20230228151044-bf9588061a3f/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230228152327-64b50b6403d8 h1:+/zK9SJLb5bCvJi6joHp5JFDQB20NMuIpah9bJqAEII=
github.com/onweru/compose v0.0.0-20230228152327-64b50b6403d8/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230228154211-8ae26d6bdbe7 h1:yoOchdcUGh9Zd4c+SE+Wet5jlC49l0VES9hQDpYkPsc=
github.com/onweru/compose v0.0.0-20230228154211-8ae26d6bdbe7/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230306071927-959873b3cd69 h1:29tpMB7/U5T5v52dmR3eWQB5RMfbUfTjVA9JDvklNf4=
github.com/onweru/compose v0.0.0-20230306071927-959873b3cd69/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230413170332-450840b51131 h1:pM1PAn23bLu548QLJszrSoWTcH4BNqDNGOExwDBkja4=
github.com/onweru/compose v0.0.0-20230413170332-450840b51131/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230414073344-00dd32520269 h1:xcbWZyaAJvhl1kdVbManDNON6vV5ubKd8MLbITefXsE=
github.com/onweru/compose v0.0.0-20230414073344-00dd32520269/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230414074935-5076669b8dfd h1:y5cYmj0jQANca/68yb2gvD9/y2recQB+00eYBWudp/A=
github.com/onweru/compose v0.0.0-20230414074935-5076669b8dfd/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230503185436-583134782ffd h1:NgERmiXBPKwxNO7GESu0pqaAWw1x6dMYXbnh0VG6/K0=
github.com/onweru/compose v0.0.0-20230503185436-583134782ffd/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230521083123-a87b8344748a h1:rfIBFlb5LhVw4s7BH64r2mdeGXZa71Sb0PM0RP3+nq0=
github.com/onweru/compose v0.0.0-20230521083123-a87b8344748a/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230522091510-8c87eb9549cf h1:6pEaX2iwqBolJAUa2jT6gSCSz6xUhMf+BXTq+plMMJo=
github.com/onweru/compose v0.0.0-20230522091510-8c87eb9549cf/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230522093958-40f93a906ddc h1:Uyve0EvHruYiHVTcrU7vew8znzd1h2tnJ3KrnUwqQiQ=
github.com/onweru/compose v0.0.0-20230522093958-40f93a906ddc/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230530114506-a2ddf2b32939 h1:XVZlCIf6BUmHReHKp5bt/e4+Vy5NCypqiju/LEcCz4Y=
github.com/onweru/compose v0.0.0-20230530114506-a2ddf2b32939/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230615081942-67dad4f6ef90 h1:YtZ28Fg638nbpKbvwEB16c3LBIdDxEAi8E0eWmo+Dw0=
github.com/onweru/compose v0.0.0-20230615081942-67dad4f6ef90/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230709124724-5ebe0b0b8d16 h1:cMfQ9aU/j2yJYbzuytHa3TAnFryZmQtp08nDCxUnnNk=
github.com/onweru/compose v0.0.0-20230709124724-5ebe0b0b8d16/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/onweru/compose v0.0.0-20230709140616-b352d2c11cd8 h1:6D3uUi+TB00CDWbDCmWpJVjzYAy8KcCZ4a7Is36BrzI=
github.com/onweru/compose v0.0.0-20230709140616-b352d2c11cd8/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
github.com/rwstorer/hugo-theme-compose v0.0.0-20230705005233-e37ac6973101 h1:LdUnwLgzORSs86EpkgioaHoSCNOLVZpqBBBiNECa7Ts=
github.com/rwstorer/hugo-theme-compose v0.0.0-20230705005233-e37ac6973101/go.mod h1:7TS3BoBV/IcLPRT2r7LyTyOqzsS5P5sXKlNpGgxdK/s=
github.com/onweru/compose v0.0.0-20230709163331-af3e133abf10 h1:6+OU3YpznL1bAy1s4B9KhEteRN+qo5T9vgYTWuGHpLw=
github.com/onweru/compose v0.0.0-20230709163331-af3e133abf10/go.mod h1:tf1kQIBUcwJ/3mRFU5eiMrMvsDScVTK2IEFsZE3hZOc=
8 changes: 4 additions & 4 deletions exampleSite/netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ publish = "public"
command = "hugo --gc --minify --baseURL https://docs.neuralvibes.com/"

[context.production.environment]
HUGO_VERSION = "0.111.2"
HUGO_VERSION = "0.115.2"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

[context.split1]
command = "hugo --gc --minify --enableGitInfo"

[context.split1.environment]
HUGO_VERSION = "0.111.2"
HUGO_VERSION = "0.115.2"
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.111.2"
HUGO_VERSION = "0.115.2"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.111.2"
HUGO_VERSION = "0.115.2"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"css/styles.67657b69c2ad5534c32b28f572591ea57dbeb96033736610b69bed940f8efacabbb6a834dcd5ec45cc07f6e60abe96df523378b23ebdd15ac5ec4c8f21fbadfd.css","MediaType":"text/css","Data":{"Integrity":"sha512-Z2V7acKtVTTDKyj1clkepX2+uWAzc2YQtpvtlA+O+sq7tqg03NXsRcwH9uYKvpbfUjN4sj690VrF7EyPIfut/Q=="}}
{"Target":"css/styles.7c338b3650604ab08087be5f37f7007bb3d844978b2a7d14cc1a8e6c54eebbdde0420263e7269856f8d8d55432177de6a1d0329aad61b94be20dab481e8d06fe.css","MediaType":"text/css","Data":{"Integrity":"sha512-fDOLNlBgSrCAh75fN/cAe7PYRJeLKn0UzBqObFTuu93gQgJj5yaYVvjY1VQyF33modAymq1huUviDatIHo0G/g=="}}
60 changes: 20 additions & 40 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,35 @@
<header class="nav_header">
{{- partial "nav" . }}
</header>
{{ if or (eq .Section site.Params.blogDir) (eq .Type "search" ) }}
{{ if or (eq .Section $config.blogDir) (eq .Type "search" ) }}
{{- block "main" . }}{{ end }}
{{ else }}
<div class="main wrap pt-4">
{{ $docSections := site.Params.docSections }}
{{ $docSections := $config.docSections }}
{{- with $docSections }}{{- else }}
{{- $docSections = "docs" }}
{{- end }}
{{ $uniqueHomepage := .IsHome }}
{{ if site.Params.uniqueHomepage }}
{{ if $config.uniqueHomepage }}
{{ if .IsHome }}
{{ $uniqueHomepage = true }}
{{ end }}
<head>
{{- partial "head" . }}
</head>
<body class="page-{{ .Kind }}" id="pagetop">
<header class="nav_header">
{{- partial "nav" . }}
</header>
{{ if or (eq .Section site.Params.blogDir) (eq .Type "search" ) }}
{{- block "main" . }}{{ end }}
{{ else }}
<div class="main wrap pt-4">
{{ $docSections := site.Params.docSections }}
{{- with $docSections }}{{- else }}
{{- $docSections = "docs" }}
{{- end }}
{{ $uniqueHomepage := .IsHome }}
{{ if site.Params.uniqueHomepage }}
{{ if .IsHome }}
{{ $uniqueHomepage = true }}
{{ end }}
{{ else }}
{{ $uniqueHomepage = false }}
{{ end }}
{{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
{{- partial "document" . }}
{{- else }}
<div class="content">
{{- block "main" . }}{{ end }}
</div>
{{- end -}}
</div>
{{ $uniqueHomepage = false }}
{{ end }}
{{- partial "scripts/translations" . -}}
{{- partialCached "footer" . -}}
{{- partialCached "sprites" . -}}
{{- partial "scripts/bundle" . -}}
{{- partial "scripts/mermaid" . -}}
</body>
</html>
{{- if and (in $docSections .Section) (ne $uniqueHomepage true) }}
{{- partial "document" . }}
{{- else }}
<div class="content">
{{- block "main" . }}{{ end }}
</div>
{{- end -}}
</div>
{{ end }}
{{- partial "scripts/translations" . -}}
{{- partialCached "footer" . -}}
{{- partialCached "sprites" . -}}
{{- partial "scripts/bundle" . -}}
{{- partial "scripts/mermaid" . -}}
</body>
</html>
7 changes: 0 additions & 7 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,5 @@ <h1 class="post_title">{{ .Title }}</h1>
</div>
</div>
</div>
<!-- <a href="{{ $.Site.BaseURL }}" class="post_nav">
<span class="post_next">The Latest
<svg class="icon icon_scale">
<use xlink:href="#double-arrow"></use>
</svg>
</span>
</a> -->
</div>
{{ end }}
19 changes: 9 additions & 10 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
{{- $config := site.Params }}
{{- $author := $config.author }}
{{- if ne $config.enableCopyright false }}
<footer class="pt-2 pb-2">
<div class="wrap">
<p>&copy; <span class="year">{{ now.Year }}</span>{{ with $author }} <a href ="{{ absLangURL .url }}" target="_blank" rel="noopener">{{ .name }}</a>{{ end }}</p>
<p>
&copy; <span class="year">{{ now.Year }}</span>
{{- if $config.enableCopyright }}
{{ with $author }}
&nsbp;<a href="{{ absLangURL .url }}" target="_blank" rel="noopener">{{ .name }}</a>
{{ end }}
{{ end }}
</p>
<a href="#pagetop" id="toTop" title={{ T "to_top" }}></a>
</div>
</footer>
{{ else }}
<footer class="pt-2 pb-2">
<div class="wrap">
<a href="#pagetop" id="toTop" title={{ T "to_top" }}></a>
</div>
</footer>
{{- end }}
</footer>

0 comments on commit cdf6b3d

Please sign in to comment.