Home Comments Thread

17 Replies

giscus-bot giscus-bot 2022-12-17 01:26:46
Guest *Annabel * @ 2019-08-31 20:47:03 originally posted:

Hi out.width on options page: maxwidth which is defined here... leads to 404

yihui yihui 2022-12-17 01:27:00

Fixed now. Thanks for the report!

Originally posted on 2019-09-01 03:18:34

giscus-bot giscus-bot 2022-12-17 01:26:47
Guest *Christine* @ 2019-10-23 22:51:33 originally posted:

Help! This website is not found! https://yihui.name/en/2018/11/biggest-regret-knitr/

yihui yihui 2022-12-17 01:27:00

Thanks for the report! The link works for me. Perhaps it was a temporary issue?

Originally posted on 2019-10-24 03:04:47

giscus-bot giscus-bot 2022-12-17 01:26:48
Guest *JessR* @ 2019-12-31 22:57:11 originally posted:

I arrived here from https://yihui.org/tinytex/.tlmgr

yihui yihui 2022-12-17 01:27:01

Thanks! Where did you get this link?

Originally posted on 2020-01-01 01:09:29

giscus-bot giscus-bot 2022-12-17 01:26:49
Guest *Dustin* @ 2020-01-19 05:46:34 originally posted:

my RStudio prompted me to come to this page, but it is a 404 page not found. Updated link?

yihui yihui 2022-12-17 01:27:02

Could you tell me how to reproduce it? Which link did you click in RStudio? Thanks!

Originally posted on 2020-01-19 05:58:42

giscus-bot giscus-bot 2022-12-17 01:26:49
Guest *Guneykan Ozkaya* @ 2020-01-25 20:13:08 originally posted:

I got here from this
https://yihui.org/tinytex/.tlmgr update --all --self

yihui yihui 2022-12-17 01:27:03

Thanks, but as I asked below, how did you get that link?

Originally posted on 2020-01-26 04:29:25

giscus-bot giscus-bot 2022-12-17 01:27:04
Guest *Cole Cerny* @ 2020-01-27 03:41:12 originally posted:

if you try to run tinytex::tlmgr_update() to update TeX, it tells you to put in this link

yihui yihui 2022-12-17 01:27:05

I just fixed it. Thank you so much!

Originally posted on 2020-01-28 16:00:50

giscus-bot giscus-bot 2022-12-17 01:26:50
Guest *madam sorbet* @ 2020-03-10 22:22:34 originally posted:

Hi, when I try to in R-Studio tinytex::install_tinytex() it doesn't work, it says among other things that this page https://yihui.org/gh/tinytex/tools/tinytex.profile does not exist, I searched for https://yihui.org/gh/ and it brought me here, thank you! Amazing work

yihui yihui 2022-12-17 01:27:06

Thanks for letting me know!

Originally posted on 2020-03-11 20:22:58

giscus-bot giscus-bot 2022-12-17 01:26:51
Guest *Nankumbi Joyce* @ 2020-03-29 00:40:56 originally posted:

UTF-8 decoding error in Nankumbi_Exam-22.utf8.md at byte offset 11901 (b5).
The input must be a UTF-8 encoded text.
Error: pandoc document conversion failed with error 92
In addition: Warning messages:
1: In readLines(con, warn = FALSE) :
invalid input found on input connection 'Nankumbi_Exam-22.Rmd'
2: In knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) :
The file "Nankumbi_Exam-22.Rmd" must be encoded in UTF-8. Please see https://yihui.org/en/2018/11/biggest-regret-knitr/ for more info.
3: In readLines(con, warn = FALSE) :
invalid input found on input connection 'Nankumbi_Exam-22.knit.md'
Execution halted

giscus-bot giscus-bot 2022-12-17 01:26:52
Guest *denizCvrl* @ 2020-08-20 02:49:20 originally posted:

Hello, https://yihui.org/todo/ link at https://github.com/yihui?tab=projects brought me here!

giscus-bot giscus-bot 2022-12-17 01:27:10
Guest *deadfate* @ 2021-01-13 07:46:12 originally posted:

+1, from this way

yihui yihui 2022-12-17 01:27:12

Thanks! This page has not been committed to my Github repo until now.

Originally posted on 2021-06-16 04:54:45

giscus-bot giscus-bot 2022-12-17 01:26:54
Guest *Tay Flo* @ 2020-12-30 21:40:21 originally posted:

Hi, https://yihui.org/knitr/hooks/ brought me here. :-)
Should be https://yihui.org/knitr/options/ if anyone reading wonder.

yihui yihui 2022-12-17 01:27:08

Thanks, but the former link seems to be valid. Perhaps it was a temporary problem.

Originally posted on 2020-12-31 05:19:05

giscus-bot giscus-bot 2022-12-17 01:27:09
Guest *Tay Flo* @ 2021-01-01 03:39:33 originally posted:

Sorry, I have been unclear

"Options" in https://yihui.org/knitr/hooks brings to https://yihui.org/knitr/hooks/options rather than to https://yihui.org/knitr/optio ;-)

broken link

yihui yihui 2022-12-17 01:27:10

Oh I see! Just fixed it. Thanks!

Originally posted on 2021-01-01 21:49:48

giscus-bot giscus-bot 2022-12-17 01:26:55
Guest *Christian Million* @ 2021-06-09 03:29:05 originally posted:

I got here from https://github.com/yihui?tab=projects. Here is a screenshot:

todo

yihui yihui 2022-12-17 01:27:11

I'll fix it in the next few days. Thanks for the report!

Originally posted on 2021-06-10 02:21:06

chuxinyuan chuxinyuan 2023-10-19 15:30:07

看到 {{ if and (not .Params.disable_comments) (or (eq .Kind "404") (and (not .IsHome) .Content)) }} 专门过来看看,我相信我一定不是最后一个专门来这里的。

顺便提一句,在没有 disable_comments: true 的时候,404 页面本身就是可以评论的,这里的代码是否可以简化下,烧脑的很啊。

👍 1
yihui yihui 2023-10-19 15:47:03

disable_comments: true 有最高优先级,它可以禁用任何页面的评论区,包括 404 页面。

如果这个参数未设置,那么接下来看:

  • 如果是 404 页面,那么启用评论。
  • 如果是首页,那么禁用;否则要求页面内容非空,才启用评论,这是为了去除纯列表页面,比如 https://yihui.org/en/

这只是我自己的偏好而已,其它用户不必按照我的偏好设置,也不必读懂我的代码。比如可以任何页面都无条件启用评论区。

chuxinyuan chuxinyuan 2023-10-19 16:01:17

我是默认无条件启用评论区,在不需要评论的地方补个刀,比如首页、纯列表页面等。

chuxinyuan chuxinyuan 2023-10-19 16:58:46

{{ if or (and (not .Params.disable_comments) (not .IsHome) .Content) (eq .Kind "404")) }}

yihui yihui 2023-10-19 17:16:25

这个写法与我原来的写法不等价,404 页面会无条件启用评论,disable_comments 参数无法控制它。另外,末尾多了个回括号吧。

chuxinyuan chuxinyuan 2023-10-19 17:24:46

我主要是看到你的 404 已经有评论了,你这么爱惜评论,应该不会关闭它吧!恩,总开关得有,还是你那个写法严谨!

yihui yihui 2023-10-19 19:37:54

不会关评论。但写程序的时候通常需要留条后路,尽量不写死。

Sign in to join the discussion

Sign in with GitHub