Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug 🐛] Table not shown when inside a quote #5494

Closed
5 tasks done
Dragon1573 opened this issue May 21, 2024 · 5 comments
Closed
5 tasks done

[Bug 🐛] Table not shown when inside a quote #5494

Dragon1573 opened this issue May 21, 2024 · 5 comments

Comments

@Dragon1573
Copy link

Check List

  • I have already read Docs page & Troubleshooting page.
  • I have already searched existing issues and they are not help to me.
  • I examined error or warning messages and it's difficult to solve.
  • I am using the latest version of Hexo. (run hexo version to check)
  • My Node.js is matched the required version.

Expected behavior

When there's a table in a quote, the table should be rendered as normal.

GitHub
  • 问题:请使用 Prophettrain_df 数据建模,预测后 30 天的结果。并回答 1 月 20 日当天的预测结果是多少?

    from fbprophet import Prophet
    
    model = Prophet()
    model.fit(train_df)
    pred_df = model.make_future_dataframe(periods=30, freq='D', include_history=False)
    pred_df = model.predict(pred_df)
    pred_df[['ds', 'yhat']]

    通过以上的建模预测,我们可以得到如下表格:

    ds yhat
    2015-12-22 3385.507108
    ...... ......
    2016-01-20 3426.449686

    因此,1月20日当天的预测结果约为3426次。

Typora

image

Vuepress (with theme Vdoing)

image

Actual behavior

The table did not render as expected.

Hexo (with theme Butterfly)

image

How to reproduce?

  1. Initialize an Hexo site with Yarnpkg v1.22 by yarn dlx hexo init.
  2. Switch to project directory, upgrade Yarnpkg to v4.22.0 with yarn set version berry && yarn set version latest.
  3. Install hexo-theme-butterfly and switch to this theme in _config.yml.
  4. Create a new post and paste following contents.
  5. Try build the site.
  6. Deploy public/ folder with any web server, visit the post. You may reproduce this issue.
- 问题:请使用 *Prophet*`train_df` 数据建模,预测后 30 天的结果。并回答 1 月 20 日当天的预测结果是多少?

  > ```python
  > from fbprophet import Prophet
  >
  > model = Prophet()
  > model.fit(train_df)
  > pred_df = model.make_future_dataframe(periods=30, freq='D', include_history=False)
  > pred_df = model.predict(pred_df)
  > pred_df[['ds', 'yhat']]
  > ```
  >
  > 通过以上的建模预测,我们可以得到如下表格:
  >
  > |     ds     |    yhat     |
  > |:----------:|:-----------:|
  > | 2015-12-22 | 3385.507108 |
  > |   ......   |   ......    |
  > | 2016-01-20 | 3426.449686 |
  >
  > 因此,120日当天的预测结果约为3426次。

Is the problem still there under Safe mode?

Nope. Hexo will not compile my posts under "Safe mode".

Your Node.js & npm version

22:51:38 D:\...\hexo-blog  [butterfly ≡ +0 ~5 -0 !] 1ms pwsh> echo "Node version $(node -v), NPM version $(npm -v), Yarnpkg version $(yarn -v)"
Node version v22.2.0, NPM version 10.5.2, Yarnpkg version 4.2.2

Your Hexo and Plugin version

22:54:25 D:\...\hexo-blog  [butterfly ≡ +0 ~5 -0 !] 1ms pwsh> npm ls --depth 0
hexo-site@0.0.0 D:\Repository\hexo-blog
├── hexo-asset-img@1.1.0
├── hexo-filter-nofollow@2.0.2
├── hexo-generator-archive@2.0.0
├── hexo-generator-category@2.0.0
├── hexo-generator-feed@3.0.0
├── hexo-generator-index@3.0.0
├── hexo-generator-searchdb@1.4.1
├── hexo-generator-sitemap@3.0.1
├── hexo-generator-tag@2.0.0
├── hexo-renderer-ejs@2.0.0
├── hexo-renderer-kramed@0.1.4
├── hexo-renderer-pug@3.0.0
├── hexo-renderer-stylus@3.0.1
├── hexo-server@3.0.0
├── hexo-theme-butterfly@4.13.0
├── hexo-theme-landscape@1.0.0
├── hexo-wordcount@6.0.1
└── hexo@7.2.0

22:54:28 D:\...\hexo-blog  [butterfly ≡ +0 ~5 -0 !] 1.047s pwsh> yarn info hexo-site
└─ hexo-site@workspace:.
   ├─ Version: 0.0.0
   │ 
   └─ Dependencies
      ├─ hexo-asset-img@npm:^1.1.0 → npm:1.1.0
      ├─ hexo-filter-nofollow@npm:^2.0.2 → npm:2.0.2
      ├─ hexo-generator-archive@npm:^2.0.0 → npm:2.0.0
      ├─ hexo-generator-category@npm:^2.0.0 → npm:2.0.0
      ├─ hexo-generator-feed@npm:^3.0.0 → npm:3.0.0
      ├─ hexo-generator-index@npm:^3.0.0 → npm:3.0.0
      ├─ hexo-generator-searchdb@npm:^1.4.1 → npm:1.4.1
      ├─ hexo-generator-sitemap@npm:^3.0.1 → npm:3.0.1
      ├─ hexo-generator-tag@npm:^2.0.0 → npm:2.0.0
      ├─ hexo-renderer-ejs@npm:^2.0.0 → npm:2.0.0
      ├─ hexo-renderer-kramed@npm:^0.1.4 → npm:0.1.4
      ├─ hexo-renderer-pug@npm:^3.0.0 → npm:3.0.0
      ├─ hexo-renderer-stylus@npm:^3.0.1 → npm:3.0.1
      ├─ hexo-server@npm:^3.0.0 → npm:3.0.0
      ├─ hexo-theme-butterfly@npm:^4.13.0 → npm:4.13.0
      ├─ hexo-theme-landscape@npm:^1.0.0 → npm:1.0.0
      ├─ hexo-wordcount@npm:^6.0.1 → npm:6.0.1
      └─ hexo@npm:^7.2.0 → npm:7.2.0

Your package.json

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "rebuild": "yarn run clean && yarn run build",
    "server": "hexo server"
  },
  "hexo": {
    "version": "7.2.0"
  },
  "devDependencies": {
    "hexo": "^7.2.0",
    "hexo-asset-img": "^1.1.0",
    "hexo-filter-nofollow": "^2.0.2",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-feed": "^3.0.0",
    "hexo-generator-index": "^3.0.0",
    "hexo-generator-searchdb": "^1.4.1",
    "hexo-generator-sitemap": "^3.0.1",
    "hexo-generator-tag": "^2.0.0",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-kramed": "^0.1.4",
    "hexo-renderer-pug": "^3.0.0",
    "hexo-renderer-stylus": "^3.0.1",
    "hexo-server": "^3.0.0",
    "hexo-theme-butterfly": "^4.13.0",
    "hexo-theme-landscape": "^1.0.0",
    "hexo-wordcount": "^6.0.1"
  },
  "packageManager": "yarn@4.2.2"
}

Your site's _config.yml (Optional)

# Hexo Configuration
## Docs: https://hexo.io/zh-cn/docs/configuration
## Source: https://github.com/hexojs/hexo/

# 网站(https://hexo.io/zh-cn/docs/configuration#%E7%BD%91%E7%AB%99)
title: ***Masked***
subtitle: ***Masked***
description: ***Masked***
keywords:
  - Hexo
  - Knowledge
author: ***Masked***
language: zh-CN
timezone: "Asia/Hong_Kong"
email: ***Masked***

# 网址(https://hexo.io/zh-cn/docs/configuration#%E7%BD%91%E5%9D%80)
## 如果您的网站存放在子目录中,例如 http://example.com/blog,则:
# 请将您的 url 设为 http://example.com/blog
url: ***Masked***
# 并把 root 设为 /blog/
root: ***Masked***
permalink: :title/
permalink_defaults:
pretty_urls:
  trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: false # Set to false to remove trailing '.html' from permalinks

# 目录(https://hexo.io/zh-cn/docs/configuration#%E7%9B%AE%E5%BD%95)
source_dir: source
public_dir: public
tag_dir: tags
archive_dir: archives
category_dir: categories
code_dir: downloads/code
i18n_dir: :lang
skip_render:

# 文章(https://hexo.io/zh-cn/docs/configuration#%E6%96%87%E7%AB%A0)
new_post_name: :title.md
default_layout: post
auto_spacing: true
titlecase: false
external_link:
  enable: true
  field: site
  exclude: ""
filename_case: 1
render_drafts: false
post_asset_folder: true # 资源文件夹(https://hexo.io/zh-cn/docs/asset-folders#%E6%96%87%E7%AB%A0%E8%B5%84%E6%BA%90%E6%96%87%E4%BB%B6%E5%A4%B9)
relative_link: false
future: false
syntax_highlighter: prismjs # 代码块 > 代码高亮(https://hexo.io/zh-cn/docs/syntax-highlight)
highlight: # 代码块 > 代码高亮(https://hexo.io/zh-cn/docs/syntax-highlight#Highlight-js)
  line_number: true
  auto_detect: true
  tab_replace: "    "
  wrap: false
  hljs: false
prismjs: # 代码块 > 代码高亮(https://hexo.io/zh-cn/docs/syntax-highlight#PrismJS)
  preprocess: true
  line_number: true
  tab_replace: "    "

# Homepage Configuration
index_generator:
  # path: Root path for your blogs index page. (default = '')
  path: ""
  # per_page: Posts displayed per page. (0 = disable pagination)
  per_page: 5
  # order_by: Posts order. (Order by date descending by default)
  order_by: -date

# 分类 & 标签(https://hexo.io/zh-cn/docs/configuration#%E5%88%86%E7%B1%BB-%E6%A0%87%E7%AD%BE)
default_category: uncategorized
category_map:
tag_map:

# Metadata elements
## https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta
meta_generator: true

# 日期 / 时间格式
## Hexo 使用 Moment.js 来解析和显示时间。
## You can customize the date format as defined in
## http://momentjs.com/docs/#/displaying/format/
date_format: YYYY-MM-DD
time_format: HH:mm:ss
## 当 Front Matter 中没有指定 updated 时,updated 如何取值:
## - mtime: 使用文件的最后修改时间。这是从 Hexo 3.0.0 开始的默认行为。
## - date: 使用 date 作为 updated 的值。可被用于 Git 工作流之中,因为使用 Git 管理站点时,文件的最后修改日期常常会发生改变
## - empty: 直接删除 updated。使用这一选项可能会导致大部分主题和插件无法正常工作。
updated_option: "date"

# 分页(https://hexo.io/zh-cn/docs/configuration#%E5%88%86%E9%A1%B5)
per_page: 5
pagination_dir: page

# 扩展(https://hexo.io/zh-cn/docs/configuration#%E6%89%A9%E5%B1%95)
## 插件: https://hexo.io/plugins/
## 主题: https://hexo.io/themes/
theme: butterfly

## 包括或不包括目录和文件
## (https://hexo.io/zh-cn/docs/configuration#%E5%8C%85%E6%8B%AC%E6%88%96%E4%B8%8D%E5%8C%85%E6%8B%AC%E7%9B%AE%E5%BD%95%E5%92%8C%E6%96%87%E4%BB%B6)
include: []
exclude: []
ignore: []

## Kramed 插件配置
kramed:
  gfm: true
  pedantic: false
  sanitize: false
  tables: true
  breaks: true
  smartLists: true
  smartypants: true

## 搜索配置
search:
  path: search.xml
  field: post
  content: true
  format: html

## RSS源插件配置
feed:
  enable: true
  type: atom
  path: atom.xml
  limit: 20
  hub:
  content:
  content_limit: 140
  content_limit_delim: " "
  order_by: -date
  icon: icon.png
  autodiscovery: true
  template:

## SEO/外链流失防护插件
nofollow:
  enable: true
  field: site
  exclude: []

## 站点地图插件
sitemap:
  path:
    - sitemap.xml
    - sitemap.txt
  # template: ./sitemap_template.xml
  # template_txt: ./sitemap_template.txt
  rel: false
  tags: true
  categories: true

Others

No response

@Dragon1573
Copy link
Author

Generate as normal

23:01:45 D:\...\hexo-blog  [butterfly ≡ +0 ~5 -0 !] 1ms pwsh> yarn hexo generate
INFO  Validating config
INFO  
  ===================================================================
      #####  #    # ##### ##### ###### #####  ###### #      #   #
      #    # #    #   #     #   #      #    # #      #       # #
      #####  #    #   #     #   #####  #    # #####  #        #
      #    # #    #   #     #   #      #####  #      #        #
      #    # #    #   #     #   #      #   #  #      #        #
      #####   ####    #     #   ###### #    # #      ######   #
                            4.13.0
  ===================================================================
INFO  Start processing
INFO  Files loaded in 2.42 s
INFO  Generated: sitemap.txt
INFO  Generated: link/index.html
INFO  Generated: categories/index.html
INFO  Generated: sitemap.xml
INFO  Generated: tags/index.html
INFO  Generated: atom.xml
INFO  Generated: search.xml
INFO  Generated: 404.html
INFO  Generated: categories/技术杂谈/index.html
INFO  Generated: archives/index.html
INFO  Generated: archives/2024/05/index.html
INFO  Generated: categories/机器学习/index.html
INFO  Generated: tags/git/index.html
INFO  Generated: tags/python/index.html
INFO  Generated: archives/2024/index.html
INFO  Generated: tags/pyinstaller/index.html
INFO  Generated: tags/nodejs/index.html
INFO  Generated: tags/numpy/index.html
INFO  Generated: tags/vscode/index.html
INFO  Generated: tags/pillow/index.html
INFO  Generated: tags/jupyter/index.html
INFO  Generated: tags/docker/index.html
INFO  Generated: tags/selenium/index.html
INFO  Generated: tags/函数式编程/index.html
INFO  Generated: tags/dev-containers/index.html
INFO  Generated: img/404.jpg
INFO  Generated: img/favicon.png
INFO  Generated: index.html
INFO  Generated: img/friend_404.gif
INFO  Generated: js/main.js
INFO  Generated: js/search/algolia.js
INFO  Generated: css/index.css
INFO  Generated: skill/git/sparse-checkout/image-20221230121918038.png
INFO  Generated: skill/vscode/devcontainers/image-20221013230313100.png
INFO  Generated: skill/python/fp/lambda-expressions/index.html
INFO  Generated: archives/2024/page/2/index.html
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111140026943.png
INFO  Generated: archives/2024/05/page/2/index.html
INFO  Generated: categories/机器学习/page/2/index.html
INFO  Generated: tags/python/page/2/index.html
INFO  Generated: categories/技术杂谈/page/3/index.html
INFO  Generated: tags/函数式编程/page/2/index.html
INFO  Generated: page/3/index.html
INFO  Generated: css/var.css
INFO  Generated: archives/page/2/index.html
INFO  Generated: skill/git/sparse-checkout/image-20221230195235858.png
INFO  Generated: js/tw_cn.js
INFO  Generated: skill/git/sparse-checkout/image-20221230195905131.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111235915025.png
INFO  Generated: js/utils.js
INFO  Generated: skill/python/fp/recursive/index.html
INFO  Generated: skill/git/sparse-checkout/image-20221230200544195.png
INFO  Generated: skill/git/sparse-checkout/image-20221230201457972.png
INFO  Generated: skill/git/sparse-checkout/image-20221230195559943.png
INFO  Generated: skill/python/fp/purity-first-class-entity-invariance/index.html
INFO  Generated: archives/page/4/index.html
INFO  Generated: archives/page/3/index.html
INFO  Generated: archives/2024/page/5/index.html
INFO  Generated: archives/page/6/index.html
INFO  Generated: archives/2024/page/4/index.html
INFO  Generated: archives/page/7/index.html
INFO  Generated: archives/2024/page/6/index.html
INFO  Generated: archives/2024/page/3/index.html
INFO  Generated: archives/page/5/index.html
INFO  Generated: archives/2024/page/7/index.html
INFO  Generated: archives/2024/05/page/3/index.html
INFO  Generated: archives/2024/05/page/4/index.html
INFO  Generated: categories/技术杂谈/page/2/index.html
INFO  Generated: archives/2024/05/page/5/index.html
INFO  Generated: categories/机器学习/page/3/index.html
INFO  Generated: archives/2024/05/page/7/index.html
INFO  Generated: page/2/index.html
INFO  Generated: page/4/index.html
INFO  Generated: archives/2024/05/page/6/index.html
INFO  Generated: tags/python/page/3/index.html
INFO  Generated: page/6/index.html
INFO  Generated: categories/机器学习/page/4/index.html
INFO  Generated: page/7/index.html
INFO  Generated: skill/git/sparse-checkout/index.html
INFO  Generated: page/5/index.html
INFO  Generated: skill/python/fp/lazy-eval/index.html
INFO  Generated: skill/vscode/devcontainers/image-20221013231007517.png
INFO  Generated: skill/python/fake-boolean/image-20221011001516306.png
INFO  Generated: ml/lanqiao/examine-5/Examine-5-01.png
INFO  Generated: skill/vscode/devcontainers/image-20221013230433745.png
INFO  Generated: skill/vscode/devcontainers/image-20221013231053159.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221112001247635.png
INFO  Generated: skill/python/bundle-spider-to-one-executable/index.html
INFO  Generated: skill/python/nine-numbers/index.html
INFO  Generated: skill/python/fp/op-as-func-partial-func-currying/index.html
INFO  Generated: skill/python/fp/tools-in-list-processing/index.html
INFO  Generated: skill/python/jupyter-notebook-switch-default-shell/index.html
INFO  Generated: skill/python/debugging-with-pdb/index.html
INFO  Generated: skill/vscode/devcontainers/image-20221013215032338.png
INFO  Generated: skill/python/fp/high-level-functions-and-decorators/index.html
INFO  Generated: skill/git/sparse-checkout/image-20221230201133024.png
INFO  Generated: skill/vscode/devcontainers/image-20221013214848468.png
INFO  Generated: skill/vscode/devcontainers/image-20221013225549826.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111134019073.png
INFO  Generated: ml/lanqiao/challenge-8/index.html
INFO  Generated: skill/python/fake-boolean/index.html
INFO  Generated: skill/vscode/devcontainers/index.html
INFO  Generated: skill/python/tencent-exmail-with-selenium/index.html
INFO  Generated: ml/lanqiao/challenge-9/index.html
INFO  Generated: js/search/local-search.js
INFO  Generated: ml/lanqiao/challenge-7/index.html
INFO  Generated: ml/lanqiao/examine-8/index.html
INFO  Generated: ml/lanqiao/examine-9/index.html
INFO  Generated: ml/lanqiao/challenge-6/index.html
INFO  Generated: ml/lanqiao/challenge-5/index.html
INFO  Generated: ml/lanqiao/examine-6/index.html
INFO  Generated: ml/lanqiao/examine-3/index.html
INFO  Generated: ml/lanqiao/examine-4/index.html
INFO  Generated: ml/lanqiao/examine-7/index.html
INFO  Generated: ml/lanqiao/challenge-2/index.html
INFO  Generated: ml/lanqiao/examine-1/index.html
INFO  Generated: ml/lanqiao/challenge-3/index.html
INFO  Generated: ml/lanqiao/challenge-1/index.html
INFO  Generated: ml/lanqiao/examine-2/index.html
INFO  Generated: ml/lanqiao/challenge-4/index.html
INFO  Generated: skill/vscode/devcontainers/image-20221013213504407.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111140614228.png
INFO  Generated: ml/lanqiao/examine-9/uid214893-20190505-1557033552596.png
INFO  Generated: ml/lanqiao/challenge-7/Challenge-7-01.png
INFO  Generated: ml/lanqiao/examine-5/index.html
INFO  Generated: ml/lanqiao/examine-9/uid214893-20190505-1557033587970.png
INFO  Generated: ml/lanqiao/examine-9/uid214893-20190505-1557033583749.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111224514196.png
INFO  Generated: ml/lanqiao/examine-9/uid214893-20190505-1557033590996.png
INFO  Generated: ml/lanqiao/examine-9/uid214893-20190505-1557033673417.png
INFO  Generated: images/index-title.jpg
INFO  Generated: skill/vscode/devcontainers/image-20221013230753903.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111134557473.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111222013000.png
INFO  Generated: skill/vscode/devcontainers/image-20221013231116766.png
INFO  Generated: skill/python/fake-boolean/image-20221011000858341.png
INFO  Generated: skill/vscode/devcontainers/image-20221013230240383.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111231833088.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111234751134.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111233653005.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111233426248.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111140519358.png
INFO  Generated: images/404.png
INFO  Generated: skill/python/tencent-exmail-with-selenium/image-20221111140432449.png
INFO  144 files generated in 1.43 s

Generate under "Safe mode"

23:00:18 D:\...\hexo-blog  [butterfly ≡ +0 ~5 -0 !] 1ms pwsh> yarn hexo generate --safe   
INFO  Validating config
INFO  Start processing
INFO  Files loaded in 137 ms
INFO  Generated: link/index.md
INFO  Generated: img/favicon.png
INFO  Generated: css/var.styl
INFO  Generated: categories/index.md
INFO  Generated: tags/index.md
INFO  Generated: img/404.jpg
INFO  Generated: css/index.styl
INFO  Generated: img/friend_404.gif
INFO  Generated: js/tw_cn.js
INFO  Generated: js/search/algolia.js
INFO  Generated: js/utils.js
INFO  Generated: js/main.js
INFO  Generated: js/search/local-search.js
INFO  Generated: images/index-title.jpg
INFO  Generated: images/404.png
INFO  15 files generated in 29 ms

@Dragon1573
Copy link
Author

🛠️ Temporary walkaround

Rewrite the table with HTML syntax directly.

- 问题:请使用 *Prophet*`train_df` 数据建模,预测后 30 天的结果。并回答 1 月 20 日当天的预测结果是多少?

  > ```python
  > from fbprophet import Prophet
  > 
  > model = Prophet()
  > model.fit(train_df)
  > pred_df = model.make_future_dataframe(periods=30, freq='D', include_history=False)
  > pred_df = model.predict(pred_df)
  > pred_df[['ds', 'yhat']]
  > ```
  >
  > 通过以上的建模预测,我们可以得到如下表格:
  >
  > <table style="text-align: center;">
  >     <thead>
  > 	    <tr><th>ds</th><th>yhat</th></tr>
  >     </thead>
  >     <tbody>
  >         <tr><td>2015-12-22</td><td>3385.507108</td></tr>
  >         <tr><td>......</td><td>......</td></tr>
  >         <tr><td>2016-01-20</td><td>3426.449686</td></tr>
  >     </tbody>
  > </table>
  >
  > 因此,120日当天的预测结果约为3426次。

image

@uiolee
Copy link
Member

uiolee commented May 26, 2024

Can't reproduce. it works as expected.

marked

@uiolee uiolee closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
@uiolee
Copy link
Member

uiolee commented May 26, 2024

I didn't find hexo-renderer-marked, hexo-renderer-markdown-it, hexo-renderer-pandoc in your package.json. Maybe you are using another markdown renderer, then the problem is probably caused by your markdown renderer. This is not a problem with hexo

@Dragon1573
Copy link
Author

I've changed my package.json to hexo-renderer-markdown-it. Unable to reproduce either. Seems this is caused by hexo-renderer-kramed.

Thanks for your help ❤️

Markdown content
# 时间序列分析应用练习

## 数据集

- 下载地址:[阿里云 OSS 服务](https://labfile.oss.aliyuncs.com/courses/1283/wiki_machine_learning.csv)
- 来源:维基百科特定词条每日浏览量

## Prophet 建模预测*Pandas* 中,数据集的时间字段会默认以 `object` 数据类型载入,需要调用 `pandas.to_datetime()` 函数将字段转换为可用于时间计算的 `datetime` 数据类型。

- 问题:请使用 *Prophet*`train_df` 数据建模,预测后 30 天的结果。并回答 1 月 20 日当天的预测结果是多少?

  > ```python
  > from fbprophet import Prophet
  > 
  > model = Prophet()
  > model.fit(train_df)
  > pred_df = model.make_future_dataframe(periods=30, freq='D', include_history=False)
  > pred_df = model.predict(pred_df)
  > pred_df[['ds', 'yhat']]
  > ```
  >
  > 通过以上的建模预测,我们可以得到如下表格:
  >
  > |     ds     |    yhat     |
  > |:----------:|:-----------:|
  > | 2015-12-22 | 3385.507108 |
  > |   ......   |   ......    |
  > | 2016-01-20 | 3426.449686 |
  >
  > 因此,120日当天的预测结果约为3426次。
package.json
{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "scripts": {
    "build": "hexo generate",
    "clean": "hexo clean",
    "rebuild": "yarn run clean && yarn run build",
    "server": "hexo server"
  },
  "hexo": {
    "version": "7.2.0"
  },
  "devDependencies": {
    "hexo": "^7.2.0",
    "hexo-asset-img": "^1.1.0",
    "hexo-filter-nofollow": "^2.0.2",
    "hexo-generator-archive": "^2.0.0",
    "hexo-generator-category": "^2.0.0",
    "hexo-generator-feed": "^3.0.0",
    "hexo-generator-index": "^3.0.0",
    "hexo-generator-searchdb": "^1.4.1",
    "hexo-generator-sitemap": "^3.0.1",
    "hexo-generator-tag": "^2.0.0",
    "hexo-renderer-ejs": "^2.0.0",
    "hexo-renderer-markdown-it": "^7.1.1",
    "hexo-renderer-pug": "^3.0.0",
    "hexo-renderer-stylus": "^3.0.1",
    "hexo-server": "^3.0.0",
    "hexo-theme-butterfly": "^4.13.0",
    "hexo-wordcount": "^6.0.1",
    "markdown-it-emoji": "^3.0.0",
    "yarn-upgrade-all": "^0.7.2"
  },
  "packageManager": "yarn@4.2.2"
}
Screenshots

image

Dragon1573 added a commit to Dragon1573/Boudoir-of-Sagiri that referenced this issue May 26, 2024
- 详见 hexojs/hexo#5494
- 此问题可能来自 `hexo-renderer-kramed`
- 切换为 `hexo-renderer-markdown-it` ,问题不可复现

Signed-off-by: Dragon1573 <49941141+Dragon1573@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants