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

几点反馈 #21

Open
liaochenlanruo opened this issue Dec 2, 2021 · 2 comments
Open

几点反馈 #21

liaochenlanruo opened this issue Dec 2, 2021 · 2 comments

Comments

@liaochenlanruo
Copy link

不得不承认这是一个非常牛逼和漂亮的主题,大佬辛苦了,希望可以继续优化下去。我这几天在研究该主题,遇到了几点问题:

  1. 表格渲染
    表格渲染后宽度会被限定,然而有些表格中的内容会较多,导致表格被拉的非常长,而且单元格间的内容会重叠。是否可以给表格加一个水平滚动条解决该问题。
  2. 文章右侧文本目录
    当点击右侧的文本目录想实现跳转到某个标题时,页面总是跳转到文档开头。
  3. 站内搜索功能貌似用不了
  4. 大佬博客首页左边栏的微博、往年今日功能如何实现

我替换了默认的hexo-renderer-marked,改为hexo-renderer-multi-markdown-it以实现更多的渲染功能,不知道是否会影响到bamboo的正常运行。希望大佬抽空瞅瞅,谢谢!

@yuang01
Copy link
Owner

yuang01 commented Dec 3, 2021

  1. 表格渲染,宽度是100%的,如果想有横向滚动条,可以使用html的表格写法,例如下面的
<div style="width:100%;overflow:scroll;">
    <table border="1" rules="all" style="width:2000px; height:100px; text-align:center">
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>简介</th>
            <th>作者</th>
            <th>库存</th>
            <th>价格</th>
            <th>销量</th>
            <th>备注</th>
            <th>阅读数</th>
            <th>点赞数</th>
            <th>收藏数</th>
            <th>评论数</th>
            <th>发布时间</th>
            <th>修改时间</th>
        </tr>
        <tr>
            <td>1</td>
            <td>这是一篇标题很长的文章用来测试表格的测试标题</td>
            <td>这是一篇标题很长的文章用来测试表格不被太多列挤得变形的描述...</td>
            <td>管理员</td>
            <td>3000</td>
            <td>120.68</td>
            <td>1200</td>
            <td>测试啊测试test</td>
            <td>123</td>
            <td>20</td>
            <td>17</td>
            <td>5</td>
            <td>2018-03-06 12:00:00</td>
            <td>2018-03-07 15:00:00</td>
        </tr>
        <tr>
            <td>1</td>
            <td>这是一篇标题很长的文章用来测试表格的测试标题</td>
            <td>这是一篇标题很长的文章用来测试表格不被太多列挤得变形的描述...</td>
            <td>管理员</td>
            <td>3000</td>
            <td>120.68</td>
            <td>1200</td>
            <td>测试啊测试test</td>
            <td>123</td>
            <td>20</td>
            <td>17</td>
            <td>5</td>
            <td>2018-03-06 12:00:00</td>
            <td>2018-03-07 15:00:00</td>
        </tr>
    </table>
</div>
  1. 我下载了hexo-renderer-multi-markdown-it插件,右侧目录点击是正常的,没有发现点击总是跑到顶部的问题
    image

  2. 站内搜索,请阅读 https://yuang01.gitee.io/post/hexo-theme-bamboo-new/#%E6%90%9C%E7%B4%A2

  3. 首页左边栏的微博、往年今日 ,请阅读 https://yuang01.gitee.io/post/hexo-theme-bamboo/sidebar/

  4. hexo-renderer-multi-markdown-it插件对bamboo主题是否存在影响,右侧目录是没有影响的,我试了下,其他的没有测试

@liaochenlanruo
Copy link
Author

liaochenlanruo commented Dec 6, 2021

感谢大佬的回复,我找到原因了,是因为hexo-renderer-multi-markdown-it的配置中有一项设置的问题

minify:
  html:
    enable: true
    exclude:
      - '**/json.ejs'
      - '**/atom.ejs'
      - '**/rss.ejs'
  css:
    enable: true
    exclude:
      - '**/*.min.css'
  js:
    enable: true
    mangle:
      toplevel: true
    output:
    compress:
    exclude:
      - '**/*.min.js'

其中js那里设置为true时,会对脚本进行压缩,然而本站用了ES6代码,压缩时会报错,导致很多功能紊乱,将enable: 改为false就可以了。我用hexo-renderer-multi-markdown-it是因为他有很多渲染效果,但最近阅读文档发现bamboo主题也有相关的渲染,只是语法不同而已。

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