profile
viewpoint
Cameron Moore moorereason Abilene, Texas, USA

adnanh/webhook 5928

webhook is a lightweight incoming webhook server to run shell commands

moorereason/autopgsqlbackup 7

Automatic PostgreSQL Backup Script

moorereason/afero 0

A FileSystem Abstraction System for Go

moorereason/aws-lambda-go 0

Libraries, samples and tools to help Go developers develop AWS Lambda functions.

moorereason/blackfriday 0

Blackfriday: a markdown processor for Go

moorereason/caddy 0

Fast, cross-platform HTTP/2 web server with automatic HTTPS

moorereason/cast 0

safe and easy casting from one type to another in Go

moorereason/check 0

A set of utilities for checking Go sources

moorereason/checkmk 0

Checkmk - Best-in-class infrastructure & application monitoring

moorereason/chi 0

lightweight, idiomatic and composable router for building Go HTTP services

PR opened gohugoio/hugo

Proposal composite render mode

Currently, Hugo has 2 kinds of render destination memory or disk. During local development, I prefer renderToMemory to renderToDisk in order to enjoy Hugo's advantage. I mean fast rendering.

However, staticfiles-intensive site development with rendreToMemory consumes machine memory linearly. For example. 3GB static directory consumes 6GB memory on this setting. (yes, this is exceptionally huge example, though)

To resolve this situation, I would like to introduce another render target, composite, using afero's composite backend. This filesystem serves only dynamic contents (content and etc) from writable memory. On the other hand, static files are served directly from os filesystem without syncing to memory.

Contrary to its smallness of diff, it significantly reduces memory consumption. In addition, as far as I consider, it has any major disadvantages.

I attach simple benchmark results. In this benchmark, ~60MB file was copied to static direcotry per 10 sec up to ~1.2GB (total 200 sec).

memory.log composite.log

I think this we could even replace renderToMemory mode with composite mode as long as we confirm its compatibility. But this is prototyping. I am not so confident with Hugo's module system that I added composite as another rather than rewriting renderToMemory for now.

+123 -14

0 comment

4 changed files

pr created time in an hour

issue commentclbanning/mxj

SetValueForPath for MapSeq

I'll work on this. Am getting some strange results with Go v1.15 with demo program for you.

amckibben

comment created time in an hour

delete branch gohugoio/hugo

delete branch : dependabot/go_modules/github.com/google/go-cmp-0.5.3

delete time in 2 hours

push eventgohugoio/hugo

dependabot[bot]

commit sha 6f7633df7d2c06e32eac628f9c7809dfee75eeed

build(deps): bump github.com/google/go-cmp from 0.5.2 to 0.5.3 Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.2 to 0.5.3. - [Release notes](https://github.com/google/go-cmp/releases) - [Commits](https://github.com/google/go-cmp/compare/v0.5.2...v0.5.3) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 2 hours

PR merged gohugoio/hugo

build(deps): bump github.com/google/go-cmp from 0.5.2 to 0.5.3 dependencies

Bumps github.com/google/go-cmp from 0.5.2 to 0.5.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google/go-cmp/releases">github.com/google/go-cmp's releases</a>.</em></p> <blockquote> <h2>v0.5.3</h2> <p>Minor documentation changes:</p> <p>(<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/236">#236</a>) Fix license headers (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/205">#205</a>) Add an example for IgnoreFields (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/237">#237</a>) Fix Diff documentation</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google/go-cmp/commit/0a3ecd384c2ae80de757e4b62138949ab721f02e"><code>0a3ecd3</code></a> Fix Diff documentation (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/237">#237</a>)</li> <li><a href="https://github.com/google/go-cmp/commit/d3c8501c1f408298cf94082d6774e0a5b77c3ce0"><code>d3c8501</code></a> Revert "Adjust for reflect.Type.NumMethod change in Go1.16 (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/240">#240</a>)" (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/242">#242</a>)</li> <li><a href="https://github.com/google/go-cmp/commit/ab46b8bd0abd4c4557cc4709ad7ae12d47570603"><code>ab46b8b</code></a> Adjust for reflect.Type.NumMethod change in Go1.16 (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/240">#240</a>)</li> <li><a href="https://github.com/google/go-cmp/commit/566225a2554cf156c7af1006dc3a0940e1e02b09"><code>566225a</code></a> Add an example for IgnoreFields (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/205">#205</a>)</li> <li><a href="https://github.com/google/go-cmp/commit/d713870ac17fdb9ee5e2ee48ff6562dfb1c0157b"><code>d713870</code></a> Fix license headers (<a href="https://github-redirect.dependabot.com/google/go-cmp/issues/236">#236</a>)</li> <li>See full diff in <a href="https://github.com/google/go-cmp/compare/v0.5.2...v0.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+3 -1

0 comment

2 changed files

dependabot[bot]

pr closed time in 2 hours

push eventgohugoio/hugo

Christian Oliff

commit sha a546059a9c0b4541f6c9e292f2bb065c1b6115d9

examples: Remove unneeded meta tag from blog example ```html <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> ``` This was only needed for IE10 and lower (which are no longer supported) and chromeframe which was a Google plugin for IE8 and lower and was discontinued many years ago. So this meta tag can be safely removed.

view details

push time in 2 hours

PR merged gohugoio/hugo

remove unneeded meta tag from blog example
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

This was only needed for IE10 and lower (which are no longer supported) and chromeframe which was a Google plugin for IE8 and lower and was discontinued many years ago. So this meta tag can be safely removed.

+1 -2

1 comment

1 changed file

coliff

pr closed time in 2 hours

issue commentgohugoio/hugo

Template lookup order is kind of limiting

Ok, will check. I think the main problem I have is that if I want to specify the most specific templates using OUTPUT_TYPE I also have to provide a variation for each language since there is no default lookup for baseof with OUTPUT_TYPE but no language. I have worked around the problem by always specifying OUTPUT_TYPE on all my templates which then will override the particular _default types and they are early in the lookup order for each folder. Like post/layout.en.html.html. I am not quite sure if it makes sense to include non OUTPUT_TYPE lookups in the sequence, but that's very subjective. I didn't expect hugo to consider posts/layout.json before it would consider _default/layout.rss.json when the output type is rss but specifying all fields mostly works.

richtera

comment created time in 2 hours

PR closed gohugoio/hugo

Generate custom error pages

Render layouts/(4xx|5xx).html resolves #5066

+54 -16

4 comments

8 changed files

satotake

pr closed time in 2 hours

release pelletier/go-toml

latest

released time in 3 hours

pull request commentpelletier/go-toml

Fix ToMap for tables in nested mixed-type arrays

Thanks! Is there a case where this branch is taken?

	if tv, ok := v.(*tomlValue); ok {
		v = tv.value
	}

If yes it's probably worth a test, if not we can get rid of the code :)

mstetson

comment created time in 3 hours

issue openedclbanning/mxj

SetValueForPath for MapSeq

How does one set values by path (or at all) for MapSeq? I see no documentation on how to do so.

https://goplay.space/#thtuDomNont

created time in 3 hours

push eventpelletier/go-toml

Stanisław Barzowski

commit sha 2e01f733df54711f94dd4309052b79a98872dbcc

[README] There are 3 cli tools, not 2. (#454)

view details

push time in 3 hours

PR merged pelletier/go-toml

[README] There are 3 cli tools, not 2.

The README says 2 tools are provided, but actually listed 3.

+1 -1

1 comment

1 changed file

sbarzowski

pr closed time in 3 hours

issue commentgohugoio/hugo

Template lookup order is kind of limiting

I think the only thing that's really hurting is the fact that for baseof lookups in _default doesn't contain a non LANG versions in it. [60]:"_default/LAYOUT-baseof.LANG.OUTPUT_TYPE.html" [61]:"_default/SECTION-baseof.LANG.OUTPUT_TYPE.html" [62]:"_default/section-baseof.LANG.OUTPUT_TYPE.html" [63]:"_default/list-baseof.LANG.OUTPUT_TYPE.html" If I specify both LANG and OUTPUT_TYPE on each file it works pretty well, but it maybe nicer to be able to just specify OUTPUT_TYPE. Most of the other lookups are not that necessary in that case. NOTE: This whole resolution list was generated by breaking inside of hugo when resolving a layout for a file that had an OUTPUT_TYPE other than html.

richtera

comment created time in 5 hours

issue openedgohugoio/hugo

Hugo cannot identity correct translation string when multiple variants of a language code is used

<!-- Please answer these questions before submitting your issue. Thanks! -->

What version of Hugo are you using (hugo version)?

<pre> $ hugo version Hugo Static Site Generator v0.78.2 linux/amd64 BuildDate: 2020-11-13T14:14:29Z </pre>

Does this issue reproduce with the latest release?

Yes.

Steps to Reproduce

The problem can be reproduced by following the steps below:

  1. Copy the current multilingual example to local directory: https://github.com/gohugoio/hugo/tree/b8758de19ec75b4565075314f9578270a092bc6f/examples/multilingual

  2. cd into the local directory and create zh files by executing the commands:

cp content/home.en.md content/home.zh.md
cp i18n/en.toml i18n/zh.toml
cp i18n/en.toml i18n/zh-cn.toml
  1. Modify i18n/zh.toml, set other= Correct title

  2. Modify i18n/zh-cn.toml, set other= Wrong title

  3. Add the following content into config.toml

[languages.zh]
weight = 1
title = "Test ZH language"
[[languages.zh.menu.main]]
url = "/zh/home"
name = "ZH Home"
weight = 0
  1. Execute hugo server. When hugo server is executed, a warning message is displayed, indicating something is wrong:
WARN 2020/11/24 10:10:59 Failed to get translated string for language "zh" and ID "head_title": %!s(<nil>)
  1. Open browser and go to url HUGO_URL/zh/home. We should expect that the page title is Correct title. However, Wrong title is displayed as the page title.

Comments

This is probably related to #7838.

created time in 6 hours

PR opened goadesign/goa.design

Update ja/implement/encoding

A part of #116.

+10 -9

0 comment

1 changed file

pr created time in 6 hours

delete branch gohugoio/hugo

delete branch : dependabot/go_modules/github.com/getkin/kin-openapi-0.31.0

delete time in 7 hours

push eventgohugoio/hugo

dependabot[bot]

commit sha b5d906e31e716328e2c0fbbdbfe6fc5b2ff98886

build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0 Bumps [github.com/getkin/kin-openapi](https://github.com/getkin/kin-openapi) from 0.30.0 to 0.31.0. - [Release notes](https://github.com/getkin/kin-openapi/releases) - [Commits](https://github.com/getkin/kin-openapi/compare/v0.30.0...v0.31.0) Signed-off-by: dependabot[bot] <support@github.com>

view details

push time in 7 hours

PR merged gohugoio/hugo

build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0 dependencies

Bumps github.com/getkin/kin-openapi from 0.30.0 to 0.31.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/getkin/kin-openapi/commit/254be1228068a4d2dc5210a03e5680ff1024a3a6"><code>254be12</code></a> Exposing Components 'IdentifierRegExp' to enable customized component key <a href="https://github-redirect.dependabot.com/getkin/kin-openapi/issues/27">#27</a>...</li> <li><a href="https://github.com/getkin/kin-openapi/commit/c928496cd13ef6bcf7e9e865cc4b2a7786338a4d"><code>c928496</code></a> Update doc.go (<a href="https://github-redirect.dependabot.com/getkin/kin-openapi/issues/272">#272</a>)</li> <li>See full diff in <a href="https://github.com/getkin/kin-openapi/compare/v0.30.0...v0.31.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+3 -3

0 comment

2 changed files

dependabot[bot]

pr closed time in 7 hours

issue commentgohugoio/hugo

JSConfig or TSConfig no longer being read completely

The old version would look for tsconfig and jsconfig files closest to the current js file and include it in the resolver. Ideally it should use all of them but now it only uses the one at the root which do doesn't allow different config files for each theme module. The branch I had would look for those files and then recreate a new file with all the aliases in it. This was not a great solution either because it was rather complicated. Maybe I didn't understand how the new resolver is configured or used. Is it just using relative imports?

richtera

comment created time in 8 hours

issue commentgohugoio/hugo

JSConfig or TSConfig no longer being read completely

So, the 0.78.1 added a custom resolver for files in /assets. Can you elaborate what you mean by "not working"? Is it folder mapping and are you sure you need it?

richtera

comment created time in 8 hours

push eventgohugoio/hugo

Bjørn Erik Pedersen

commit sha fd70bdafe7dc5d18c9a2f22c49acc3a8de376e8e

docs: Regen docshelper

view details

push time in 8 hours

issue commentgohugoio/hugo

Config parameter recasted on injection using HUGO_PARAMS_

OK, I stumbled upon this problem myself ...

I will test this, but I suggest that we allow the user setting the delimiter to be used as the first character after HUGO. e.g. assuming it's valid Bash (or whatever), all of the below will work:

HUGO#PARAMS#API_CONFIG#APP_ID
HUGO%PARAMS%API_CONFIG%APP_ID
Chrede88

comment created time in 8 hours

issue openedpelletier/go-toml

Unmarshaling is wrong in some cases

Describe the bug Unmarshaling is wrong in some cases

To Reproduce

import (
	"fmt"

	"github.com/pelletier/go-toml"
)

type Config struct {
	Values []string `toml:"key.values"`
}

func main() {
	doc := []byte(`
	[key]
	values = ["foo", "bar"]`)

	config := Config{}
	err := toml.Unmarshal(doc, &config)
	fmt.Printf("config: %s, err: %s\n", config, err)

}

Output:

config: {[]}, err: %!s(<nil>)

Expected behavior Expected Output:

config: {[foo bar]}, err: %!s(<nil>)

Versions

  • go-toml: v1.8.1
  • go: version 1.14.4
  • operating system: Debian

Additional context

go-toml v1.6.0 & v1.7.0 work fine, and v1.8.0 & v1.8.1 work wrong.

created time in 12 hours

PR opened gohugoio/hugo

build(deps): bump github.com/getkin/kin-openapi from 0.30.0 to 0.31.0 dependencies

Bumps github.com/getkin/kin-openapi from 0.30.0 to 0.31.0. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/getkin/kin-openapi/commit/254be1228068a4d2dc5210a03e5680ff1024a3a6"><code>254be12</code></a> Exposing Components 'IdentifierRegExp' to enable customized component key <a href="https://github-redirect.dependabot.com/getkin/kin-openapi/issues/27">#27</a>...</li> <li><a href="https://github.com/getkin/kin-openapi/commit/c928496cd13ef6bcf7e9e865cc4b2a7786338a4d"><code>c928496</code></a> Update doc.go (<a href="https://github-redirect.dependabot.com/getkin/kin-openapi/issues/272">#272</a>)</li> <li>See full diff in <a href="https://github.com/getkin/kin-openapi/compare/v0.30.0...v0.31.0">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>

+3 -3

0 comment

2 changed files

pr created time in 14 hours

delete branch gohugoio/hugo

delete branch : dependabot/go_modules/github.com/evanw/esbuild-0.8.12

delete time in 14 hours

more