all: Typo fixes

This commit is contained in:
Christian Oliff 2024-04-11 16:23:17 +09:00 committed by GitHub
parent 92de8625c7
commit 17765a7451
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 9 additions and 9 deletions

View file

@ -307,7 +307,7 @@ func (f *fileServer) createEndpoint(i int) (*http.ServeMux, net.Listener, string
if redirect := serverConfig.MatchRedirect(requestURI); !redirect.IsZero() {
// fullName := filepath.Join(dir, filepath.FromSlash(path.Clean("/"+name)))
doRedirect := true
// This matches Netlify's behaviour and is needed for SPA behaviour.
// This matches Netlify's behavior and is needed for SPA behavior.
// See https://docs.netlify.com/routing/redirects/rewrites-proxies/
if !redirect.Force {
path := filepath.Clean(strings.TrimPrefix(requestURI, baseURL.Path()))

View file

@ -374,7 +374,7 @@ func cacheDirDefault(cacheDir string) string {
// Turns out that Cloudflare also sets NETLIFY=true in its build environment,
// but all of these 3 should not give any false positives.
if os.Getenv("NETLIFY") == "true" && os.Getenv("PULL_REQUEST") != "" && os.Getenv("DEPLOY_PRIME_URL") != "" {
// Netlify's cache behaviour is not documented, the currently best example
// Netlify's cache behavior is not documented, the currently best example
// is this project:
// https://github.com/philhawksworth/content-shards/blob/master/gulpfile.js
return "/opt/build/cache/hugo_cache/"

View file

@ -181,7 +181,7 @@ func (m *pageMap) AddFi(fi hugofs.FileMetaInfo) error {
var rs *resourceSource
if pi.IsContent() {
// Create the page now as we need it at assemembly time.
// Create the page now as we need it at assembly time.
// The other resources are created if needed.
pageResource, pi, err := m.s.h.newPage(
&pageMeta{

View file

@ -133,7 +133,7 @@ type pageTrees struct {
func (t *pageTrees) collectAndMarkStaleIdentities(p *paths.Path) []identity.Identity {
key := p.Base()
var ids []identity.Identity
// We need only one identity sample per dimensio.
// We need only one identity sample per dimension.
nCount := 0
cb := func(n contentNodeI) bool {
if n == nil {

View file

@ -676,7 +676,7 @@ params:
}
// shouldList returns whether this page should be included in the list of pages.
// glogal indicates site.Pages etc.
// global indicates site.Pages etc.
func (p *pageMeta) shouldList(global bool) bool {
if p.isStandalone() {
// Never list 404, sitemap and similar.

View file

@ -87,7 +87,7 @@ func (t Translator) initFuncs(bndl *i18n.Bundle) {
// the context.Context.
// A common pattern is to pass Page to i18n, and use .ReadingTime etc.
// We need to improve this, but that requires some upstream changes.
// For now, just creata a wrepper.
// For now, just create a wrapper.
templateData = page.PageWithContext{Page: p, Ctx: ctx}
}
}

View file

@ -217,6 +217,6 @@ type Parser struct {
type ParserAttribute struct {
// Enables custom attributes for titles.
Title bool
// Enables custom attributeds for blocks.
// Enables custom attributes for blocks.
Block bool
}

View file

@ -27,7 +27,7 @@ import (
var (
_ error = (*errorResource)(nil)
// Imnage covers all current Resource implementations.
// Image covers all current Resource implementations.
_ images.ImageResource = (*errorResource)(nil)
// The list of user facing and exported interfaces in resource.go
// Note that if we're missing some interface here, the user will still

View file

@ -9,7 +9,7 @@ httpget $HUGOTEST_BASEURL_0 'Title: Hugo Server Test' $HUGOTEST_BASEURL_0 'Serve
httpget ${HUGOTEST_BASEURL_0}doesnotexist 'custom 404'
httpget ${HUGOTEST_BASEURL_0}livereload.js 'function'
# By defauilt, the server renders to memory.
# By default, the server renders to memory.
! exists public/index.html
stopServer