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

示例题目解题代码对页面整体影响 #535

Open
cjcslhp opened this issue Apr 23, 2019 · 6 comments
Open

示例题目解题代码对页面整体影响 #535

cjcslhp opened this issue Apr 23, 2019 · 6 comments

Comments

@cjcslhp
Copy link
Contributor

cjcslhp commented Apr 23, 2019

是否应限制wiki页面的解题代码长度?

例如crypto/blockcipher/des#2019 ciscn partdes的解题代码在100行以上,将完整代码放在wiki页面也许会影响读者的阅读体验?

对于长度超过一定限制的代码的处理方式:

  • 直接粘贴(也许会影响阅读体验)
  • 告知读者在ctf-challenges自行寻找(当前对题目的处理方式)
  • 附加ctf-challenges对应目录链接(不利于维护)

或者更好的解决方案?

@iromise
Copy link
Member

iromise commented Apr 23, 2019

很好的问题,目前还是建议以第二种方式解决,即读者自己寻找。challenge 仓库的结构非常清晰明了,很容易找到。当然也可以使用github自带搜索,立马搜到。

其实理想情况下应该是一个相对引用的链接,但可能需要定制如何生成网站。所以目前还是选择第二种吧。

@iromise iromise pinned this issue Apr 24, 2019
@bash-c
Copy link
Contributor

bash-c commented Apr 24, 2019

@iromise

其实理想情况下应该是一个相对引用的链接,但可能需要定制如何生成网站。所以目前还是选择第二种吧。

相对引用的链接,指的是像 git.io 这样的短网址服务吗?

@iromise
Copy link
Member

iromise commented Apr 24, 2019

不是,就是类似于我们在 markdown 里插入图片时使用的相对引用。

@Ir1d
Copy link
Contributor

Ir1d commented Apr 24, 2019

可以考虑这种折叠 https://facelessuser.github.io/pymdown-extensions/extensions/details/

其实理想情况下应该是一个相对引用的链接,但可能需要定制如何生成网站。所以目前还是选择第二种吧。

是像 gist snippet 那样吗

@iromise
Copy link
Member

iromise commented Apr 24, 2019

可以考虑这种折叠 https://facelessuser.github.io/pymdown-extensions/extensions/details/

感觉这样很稳。 @cjcslhp

是像 gist snippet 那样吗

不是,我的想法是,我们把 challenge 放在某个位置,在 mkdocs 生成网站的时候,自动根据相对位置来生成绝对链接。(但感觉有点复杂。

@Ir1d

@cjcslhp
Copy link
Contributor Author

cjcslhp commented Apr 24, 2019

可以考虑这种折叠 https://facelessuser.github.io/pymdown-extensions/extensions/details/

感觉这样很稳。 @cjcslhp

实测感觉可行~

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

4 participants