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

如何生成文档方式网页(带文档左侧导航栏) #762

Open
3 tasks done
longdafeng opened this issue Jan 30, 2024 · 8 comments
Open
3 tasks done

如何生成文档方式网页(带文档左侧导航栏) #762

longdafeng opened this issue Jan 30, 2024 · 8 comments
Labels
Feature Request New feature or request

Comments

@longdafeng
Copy link

Issue Checklist

Expected behavior

我想把文档全部迁移过来, 把gitbook 迁移到hexo + next 的系统.

现在面临一个问题, 对于文档, 我想在左边的导航栏里, 生成文档的目录树, 类似 https://oceanbase.github.io/, 或者
https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/swagger/introduction.html

我不想用2个系统分别来生成blog 和document, 有没有办法一个系统来生成.

因为next 很好集成了 大量的插件, 尤其是搜索插件和评论插件, 这个对我们来说很方便.

image

Actual behavior

  • Links to demo site with this issue:
  • Links to repository or source code of the blog:
  • Screenshots:

Steps to reproduce the behavior

请问如何可以实现 https://zalando-incubator.github.io/hexo-theme-doc/usage-and-configuration/swagger/introduction.html

Other Information

No response

@longdafeng longdafeng added the Feature Request New feature or request label Jan 30, 2024
Copy link

welcome bot commented Jan 30, 2024

Thanks for opening this issue, maintainers will get back to you as soon as possible!

@longdafeng
Copy link
Author

@stevenjoezhang could you please take a look at this issue?

In my oponion, we can provide one layout -- document, if user use this layout in front matter, maybe this is a solution.

@longdafeng
Copy link
Author

@renovate-bot I look forward to your feedback.

@pplmx
Copy link

pplmx commented Feb 19, 2024

@longdafeng Like this?
image

@stevenjoezhang
Copy link
Member

谢谢反馈,不好意思之前在休假没有回复,目前我们为文档站设计的导航栏是在页面顶部(参考 https://theme-next.js.org/docs/tag-plugins/label 右侧顶部栏),这个设计在易用性上相比其它成熟的方案可能有所欠缺。我会研究一下能不能在导航栏里添加目录树(代码逻辑上应该不难,不过调整样式和美观性上还需要一些时间)

@baoang
Copy link

baoang commented Apr 2, 2024

关于位置问题,我倒想到有个插件,叫popular-related-post的,在新版中更换为related-post了,结果在next theme中,比如用mist风格,发现相关文章本来是在文章下方的,现在变成到左侧栏中显示了,而且似乎显示的数量少了,有的文章甚至一篇相关文章也没有.
如果有人能够接手原先的popular related post就好了,感觉上去呐,相关文章的位置在当前文章的下方更舒适.

@stevenjoezhang
Copy link
Member

https://www.npmjs.com/package/hexo-related-popular-posts 这个插件更新比较少,上次更新是4年前了,所以换成了 https://www.npmjs.com/package/hexo-related-posts
一篇相关文章也没有的话可能就要调参数了,hexo-related-posts用的算法有一些权重可以设置
位置放到底部感觉怎么调样式都有点怪,所以挪到侧栏了,在Pisces/Gemini下是单独的一个块,比较清爽

@baoang
Copy link

baoang commented Apr 2, 2024

https://www.npmjs.com/package/hexo-related-popular-posts 这个插件更新比较少,上次更新是4年前了,所以换成了 https://www.npmjs.com/package/hexo-related-posts 一篇相关文章也没有的话可能就要调参数了,hexo-related-posts用的算法有一些权重可以设置 位置放到底部感觉怎么调样式都有点怪,所以挪到侧栏了,在Pisces/Gemini下是单独的一个块,比较清爽

多谢答复。我尝试一下Pisces样式看看。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants