What are some good ways to implement breadcrumbs on a Jekyll site?

后端 未结 12 2564
南方客
南方客 2020-12-14 04:47

I\'m aware that there are single-level breadcrumbs in http://raphinou.github.com/jekyll-base/ but I\'m looking for some good ways to have breadcrumbs on a Jekyll sit

12条回答
  •  情歌与酒
    2020-12-14 05:20

    I found an alternative technique that is not entirely automatic but that works on GitHub pages.

    It consists of creating a data file with the list of possible paths. For example, here is _data/breadcrumbs.csv for my site:

    url,title
    /,Home
    /api/,API
    /api/jsonarray/,JsonArray
    /api/jsonbuffer/,JsonBuffer
    /api/jsonobject/,JsonObject
    /api/jsonvariant/,JsonVariant
    /doc/,Manual
    /example/,Examples
    /news/,News
    /faq/,FAQ
    

    Then, a simple loop creates the breadcrumb:

    
    

    See this article for details and links to the implementation.

提交回复
热议问题