hugo

使用 font-spider 对 webfont 网页字体进行压缩

馋奶兔 提交于 2019-12-12 14:02:40
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> > 原文链接: 使用 font-spider 对 webfont 网页字体进行压缩 随着当前 Web 技术的日新月异,网页界面内容越来越丰富,让人眼花缭乱,其中就包括了网页中的各种自定义字体。 例如,个人博客的首页字体: CSS3 引入的 @font-face 这一属性可以很好的解决这个问题,可以帮助我们非常灵活的使用一些特殊的字体,即使用户电脑里面没有安装这个字体,网页也可以显示。 EOT 字体是 IE 浏览器的首选格式,其他浏览器都不支持;其他浏览器更钟爱常见的 TTF 、 SVG 、 WOFF 。 基本语法如下: @font-face { font-family: <自定义一个字体的名称>; src: url('<下载好的字体,在电脑中保存的路径>'); font-variant: <font-variant>; font-stretch: <font-stretch>; font-style: <style>; font-weight: <weight>; 例如: @font-face { font-family: 'Lora'; src: url('../fonts/STKaiti.eot'); /* IE9 Compat Modes */ src: url('../fonts/STKaiti.eot

Include image preview in blogdown (.Rmd yaml header)

不羁的心 提交于 2019-12-12 09:56:09
问题 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 ).

Add image to webpage which uses hugo framework

微笑、不失礼 提交于 2019-12-12 05:11:51
问题 I want to post an image onto my blog (yes that simple!) My website is hosted on GitLab Pages and uses the Hugo framework (v0.23). I forked my webpage from here, https://gitlab.com/pages/hugo (thus my blog folder structure is the same). My content publishes fine and is stored here: home/content/post I created a folder which stores images here: home/content/post/images When I insert an image into a post the image won't publish. I've tried using the relevant short code in the post (below) with

Github IO page does not load CSS

喜夏-厌秋 提交于 2019-12-12 03:05:52
问题 Question I would like to understand why my CSS resources are not loaded on my personal Github IO page tobias-schmidt.site. Issue When I acess my page via the custom dns tobias-schmidt.site or via the direct github dns mrtobe.github.io the site correctly loads the index.html but not the referenced CSS files. When I click on the blog post it does correctly load the CSS. Then for this surfing session the CSS is also available on the index.html. Setup dns from GoDaddy with A-Record setup for

Why are the steps I took to fix 'builds' in Netlify/Hugo not working?

核能气质少年 提交于 2019-12-11 17:05:13
问题 Netlify/Hugo is not updating the changes I have pushed to Github. This is a weird issue since I have, as far as I am concerned, not done anything different from what I have been doing before this problem occurred. I have followed the instructions of this book and the one offered by of Netlify but none worked. I have also contacted Netlify but could not completely understand what I am supposed to do after they answered me. See below. When I take a look at your builds, I see hugo errors. I

HUGO: error calling where: can't evaluate the array by no match argument or more than or equal to two arguments

旧时模样 提交于 2019-12-11 14:40:09
问题 I am trying to create a ul list of the sections of my hugo site and their child pages that have a specific param. I basically want a multi-level ul menu at the side like so: Intro Page 1 Page 2 Section page 3 page 4 Here is the Hugo Code I have so far: <ul class="section-one-and-two-pages"> {{ range .Site.Pages }} {{ range where ( where .Section "intro" ) or ".Params.type" "==" "article" }} <li>{{.Permalink}}{{.Title}}</li> {{end}} {{ end }} </ul> At the top of my pages (.md) I am adding:

baseUrls, redirects and rewrites in blogdown

試著忘記壹切 提交于 2019-12-11 14:11:53
问题 Hello blogdown stackoverflow community! I have been recently migrating my personal GitHub/Jekyll blog (https://blogs.nopcode.org/brainstorm) over to Blogdown/Netlify, but I'm a bit confused by the _redirects and config.toml url routing business. I have read in detail the official blogdown and netlify documentations. As well as Yihui's recommendations on good permalink hygiene Unfortunately, no matter how many sensible changes I try (essentially on config.toml and _redirects ), I cannot

Control index.xml for Atom/RSS to generate valid rss feed (without relative links)

牧云@^-^@ 提交于 2019-12-11 05:10:01
问题 Task: I want to add an RSS feed to my site. (Later I want to add a separate RSS feed for a specific category [for R Bloggers]) Setup: I use the Hugo Academic template via the R blogdown package push my sources to github https://github.com/Tazinho/AlmostRandom from where it gets published via netlify http://www.malte-grosser.com/ added an example blogpost here http://www.malte-grosser.com/post/test-post/ Issue and validation: According to this video https://www.youtube.com/watch?v=gF0tohv99Ow

Use variable language specific strings in hugo config file

女生的网名这么多〃 提交于 2019-12-11 04:26:57
问题 My goal is to build a multilingual site using hugo. For this I would like to: not touch the theme file have a config file which defines the overall structure for all languages (config.toml) have a "string" file for all languages So for example, I would have a config.toml file like this: [params.navigation] brand = "out-website" [params.navigation.links] about = $ABOUT_NAME services = $SERVICES_NAME team = $TEAM_NAME impressum = $IMPRESSUM_NAME a english language file: ABOUT_NAME=About

Drafts rendered by netlify when draft: true in yaml

让人想犯罪 __ 提交于 2019-12-11 01:47:00
问题 I am running at blogdown site from this github repo hosted by Netlify at https://timmastny.rbind.io/ In website2/content/blog/ I have two posts 2018-01-16-git-blogdown-project-workflow.Rmd and 2018-01-13-bayesian-meta-analysis-powerlifting.Rmd You can see that in the YAML of both posts, I have draft: true and in the second one I even have publishdate: '2018-01-20' which is in the future as of this post. However, with these changes pushed to github and Netlify deployed with a clean cache, on