hugo

How can another file be Included in a Hugo/Markdown page?

和自甴很熟 提交于 2019-12-10 13:21:14
问题 Recently the re-development of a web site was given to me. The re-worked site is to be done in Markdown and run through the Hugo static site generator. Is there a way to include other files in a Markdown web page processed through Hugo? If so, how? Unless I've missed something, this isn't addressed in the Hugo docs. With HTML and some servers (Apache, at least) you can do something like: <html> <body> Some content <!--#include virtual="name_of_first_file_to_include" --> More content <!--

Netlify fails to deploy site after public is added to .gitignore

旧街凉风 提交于 2019-12-10 12:08:20
问题 I'm trying to follow the suggestions in the Blogdown book. For a while, I was building my blogdown site locally and then letting Netlify deploy it. I am now reading that I can add my public/ folder to .gitignore , as Hugo should build it on a remote server: The public/ directory should be ignored if your website is to going to be automatically (re)built on a remote server such as Netlify. So, I tried that. I made sure GitHub isn't tracking public/ anymore. What I've done is this. First, I

Issue with updating Hugo blogdown's academic theme folder using git, GitHub desktop

三世轮回 提交于 2019-12-08 10:11:55
问题 Issue I’ve been having some issues with git/GitHub desktop sync issues with Hugo Blogdown theme folder (academic). After renaming/updating, I've a 'missing themes folder'. Once this is fixed, I'll be able to host my Hugo Blogdown website w/ academic theme. If anyone has had similar issues, please advise. Thanks! Environment I work with macOS High Sierra ( v10.13.4 ) and RStudio ( v1.2.616 ) w/ Hugo ( v0.30 ) blogdown ( v0.6.3 ) and the academic theme. Previously raised this issue here GitHub:

blogdown home page not showing toc of posts any more

随声附和 提交于 2019-12-08 04:58:58
问题 I am using blogdown 0.14 with a slightly modified hugo-lithium theme. It seems that the home page of the blog created has changed. It used to be a page with the toc of the posts, not it is a page with a link to a page where this toc is displayed. Is there a way to get back the old behavior? 回答1: That was mentioned an hour ago on twitter: See gohugoio/hugoThemes issue 682 and gohugoio/hugoThemes issue 678 As stated in gohugoio/hugo#6153, Hugo 0.57.0 has a breaking change since now: (Actually,

Change figure and table captions in blogdown

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 12:16:16
问题 I'm tinkering with blogdown and would like to create figures and table with non-English caption headers. The following chunk ```{r label1, echo=FALSE, fig.cap="Fancy caption", fig.fullwidth=TRUE} plot(1,1) ``` produces the plot and a caption that reads Figure 1: Fancy caption I'd like to be able to change the label such that, say, "Figure" becomes "Plot". I thought I could fix it in the same way as for bookdown : In the _bookdown.yml file I could have language: ui: chapter_name: "Chap "

Website not updating with blogdown & hugo

旧城冷巷雨未停 提交于 2019-12-07 02:48:18
问题 I know this question is likely to get down-voted due to insufficient reproducibility of code leading to the error, but I am so dumbfounded by the error I do not even know where to start in explaining it clearly enough. I therefore apologise in advance. This issue has occurred twice on two separate machines. I created a new site with blogdown in R-Studio using the hugo-academic theme new_site(theme = "gcushen/hugo-academic") Everything works fine, and I start adding some publications (as

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded

[亡魂溺海] 提交于 2019-12-06 21:47:22
问题 Running into this issue when working with Hugo and the AWS CLI on Ubuntu 18.04. ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (failed to map segment from shared object): ignored. This is a fresh install of Ubuntu 18.04, Hugo, and AWS CLI. 回答1: Found the answer after a bit of web searching here: https://github.com/PX4/Firmware/issues/9409 If you update your .bashrc with the below line it should fix the issue: export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3

Include image preview in blogdown (.Rmd yaml header)

假装没事ソ 提交于 2019-12-06 14:28:44
I have tried a couple of approaches but none worked so far. I want to include an image preview for a blog post written in R markdown (.Rmd) on my main blog page where a number of posts and projects are generally shown. I can make it work in plain markdown (.md) using below code taken from the Hugo academic-theme here +++ # Optional image to display on homepage (relative to `static/img/` folder). image_preview = "bubbles.jpg" +++ The result would look as shown here (see section Projects ). However, I do not know how to translate this to the .Rmd yaml in my blog post. I can include an image at

Proper app.yaml handlers configuration for Google App Engine for a static html website

戏子无情 提交于 2019-12-06 12:54:05
问题 Here is the file structure of my website: public │ 404.html │ app.yaml │ index.html │ index.xml │ prereqs.zip │ sitemap.xml │ sof2018.py | ├───categories │ index.html │ index.xml ├───css │ styles.css ├───home │ index.html ├───js │ scripts.js ├───prerequisites │ index.html ├───scripts │ │ index.html │ │ index.xml │ │ │ ├───page │ │ └───1 │ │ index.html │ │ │ └───sof2018 │ index.html ├───tags │ index.html │ index.xml └───usage index.html Basically I need to ensure the following: if any folder

Resize image in Hugo (v 0.32.x) in markdown

雨燕双飞 提交于 2019-12-06 04:39:48
I am trying to resize an image in Hugo (not using HTML / CSS), which is apparently available in the v 0.32 update . Beneath the "Image Processing" heading at the link in the last sentence, the following "Resize" method is described: Resize to the given dimension, {{ $logo.Resize "200x" }} will resize to 200 pixels wide and preserve the aspect ratio. Use {{ $logo.Resize "200x100" }} to control both height and width. I'm having some trouble implementing this in my Hugo site. In particular, I am using a .md file, and am trying to add an image which is stored somewhere else in the site's source