从"入门"部分看来,它应该可行,但事实并非如此.
hugo new site my-site
hugo new privacy.md
hugo server --watch --includeDrafts
curl -L localhost:1313/privacy/index.html
# 404 page not found
curl -L localhost:1313/privacy.html
# 404 page not found
curl -L localhost:1313/privacy/
# 404 page not found
Run Code Online (Sandbox Code Playgroud)
如何添加新页面?
我正在尝试使用 Hugo 尝试访问一个新站点,但在安装过程中被卡住了。我已经安装了 Homebrew,在运行该版本时,我得到以下信息:
~ % brew --version
Homebrew 2.7.2
Homebrew/homebrew-core (no git repository)
Homebrew/homebrew-cask (git revision b96680c; last commit 2021-01-07)
Run Code Online (Sandbox Code Playgroud)
当我跑 brew install hugo
我得到以下信息:
~ % brew install hugo
fatal: Could not resolve HEAD to a revision
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "hugo".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching …Run Code Online (Sandbox Code Playgroud) 这是我的 Hugo 博客上的存储库:
我想在帖子中插入包含以下文本的图像:

Run Code Online (Sandbox Code Playgroud)
但是,它没有出现,并且给出了 404 错误 - 找不到页面。
我在这里做错了什么?
我正在使用Hugo静态页面生成器构建一个个人网站,但是当我这样做时hugo serve,我不再看到一个页面,而只是一个空白页面localhost:1313.
我删除了所有内容并进行了全新安装.但是,Hugo仍在提供空白页面.
在空白页面中,我看到了之前网站草稿的Favicon,即使我删除了上一个主题中的所有内容.我在Chrome中清除了浏览器并尝试了其他浏览器,但它仍无法正常工作.
不知道我能提供什么信息,因为没有错误消息.我怎样才能解决这个问题?
我使用了生成我的博客,blogdown但是当我尝试将其提交给R-Bloggers时,我不接受它,因为我的Feed返回以下错误:
This XML document is invalid, likely due to invalid characters.
XML error: Undeclared entity error at line 6, column 35
Run Code Online (Sandbox Code Playgroud)
显然,我网站的Feed不包含完整的RSS内容.如何让它保存所有内容?
我正在尝试创建一个基于HUGO的API文档站点,该站点读取JSON模式,并以HTML格式打印它们.
我几乎就在那里,但我很难知道如何传递我想要的部分数据.
给定标准JSON模式文件,如下所示:
{"paths": {
"/auth/login": {
"get": {
"operationId": "login",
"responses": {
"200": {
"description": "",
"schema": {
"ref": "#/definitions/loginResponse"
}
}
}
},
},
"definitions": {
"loginResponse": {
"type": "object"
}
}}
Run Code Online (Sandbox Code Playgroud)
我想显示该路径的详细信息,然后使用"ref"中的模式定义渲染部分.我找到了一种方法来读取该参数,并将其解析为定义的引用.下面的"目标"看起来像:
目标:.definitions.loginResponse
{{ range $path, $methods := .paths }}
<h4>{{ $path }}</h4>
{{ range $method, $items := $methods }}
<h5>{{ $method }}</h5>
<ul>
{{ range $status, $info := .responses }}
<li>
<div>{{ $status }}</div>
<h6>Ref: {{ $info.schema.ref }}</h6>
<p>Target: {{ $target := (printf ".definitions.%s" (index (findRE …Run Code Online (Sandbox Code Playgroud) 我是HUGO(http://gohugo.io/)静态站点生成器的新手.我正在本地运行Hugo服务器localhost:1313.我试图在两个不同的部分链接页面.我的" feature.md"文件需要链接到" grid_modules.md",反之亦然.以下是hugo生成站点中两个文件的目录结构.
~/mysite/content/about/feature.md
~/mysite/content/modules/grid_modules.md
将两个页面链接在一起的最佳方法是什么?我正在尝试的是以下内容
在feature.md:
" [grid_modules] (../modules/grid_modules)"
如果我尝试访问此链接,我会收到错误" localhost:1313/about/modules/grid_modules",我知道这是错误的位置.
我在链接中缺少什么?为什么我没有得到" localhost:1313/modules/grid_modules".
我正在尝试在本地生成我正在进行的工作hugo网站.它与gitlab CI一起工作正常.
我安装了docker和gitlab runner服务.
然后在这里使用指南,我想我应该这样做gitlab-runner exec docker pages.但结果是:
[0;33mWARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases[0;m
[0KRunning with gitlab-runner 10.5.0 (80b03db9)
[0;m[0KUsing Docker executor with image rocker/tidyverse:latest ...
[0;m[0KPulling docker image rocker/tidyverse:latest ...
[0;m[0KUsing docker image sha256:f9a62417cb9b800a07695f86027801d8dfa34552c621738a80f5fed649c1bc80 for rocker/tidyverse:latest ...
[0;m[31;1mERROR: Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/jan/Desktop/gits/stanstrup-web:C:\Users\jan\Desktop\gits\stanstrup-web:ro'
[0;m[31;1mFATAL: Error response from daemon: …Run Code Online (Sandbox Code Playgroud) 在 React 中使用像 Hugo 这样的东西是否可能/理想?我知道盖茨比,但雨果也能工作。我对将两者结合起来的知识有限,但我的理解是 Hugo 将用于您所有的模板和静态网页,然后 React 将用于 Web 应用程序类型的事物,并在其中某处使用无头 CMS?有经验的人可以评论为什么 Hugo 或 Gatsby 有时适合与 React 一起使用吗?或者框架之间关系的概述?