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

Add support for displaying articles based on directory structure for documentation #762

Open
3 tasks done
longdafeng opened this issue Jan 30, 2024 · 9 comments
Open
3 tasks done
Labels
Feature Request New feature or request To Do

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样式看看。

@sghuang19
Copy link
Member

@longdafeng 感谢您对 Hexo 和 NexT 的信任,不过我个人认为这个迁移可能并不是个好主意……选择一个针对文档设计的框架应该会更实用。GitBook 确实没有很多可以配置的地方,但是还有很多其他选择,例如 Doxygen,Docsify,甚至是用 Obsidian 做文档。

@sghuang19 sghuang19 changed the title 如何生成文档方式网页(带文档左侧导航栏) Add support for displaying articles based on directory structure for documentation Aug 15, 2024
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 To Do
Projects
None yet
Development

No branches or pull requests

5 participants