How to organize multiple exits within a single Jekyll project?

I use Jekyll to create documentation for software products. I have 30+ different products having a common LIQUID template, but different content. Each product documentation has its own table of contents .

For one project, everything is in order. I have a content folder as well as css / js folders. I run jekyll serve and publish the project.

The problem is that I do not want 30 Jekyll projects to be stored next to each other with similar css, configs, js folders and will differ only in part of the content.

Question: how can I organize the internal structure so that I have a single project with a common layout and "x" of different content folders within the same project?

how

_product1 /

  • some_subdir

    'topic.md

_product2 /

  • some_subdir

    'topic.md

If possible, how can I control the output? I need to publish product 1 and product 2 ... product "x" separately.

Thanks for the help.

UPD: Here is a demo project on GitHub: https://github.com/plywoods/JekyllDocumentationDemo

+6
source share
1 answer

The way to split content in Jekyll is to use Collections .

Here is an example of a Jekyll site using Collections: https://github.com/netponto/netponto.imtqy.com

_meetings, _membersand _sessions- different collections and similar to yours _product1, _product2etc.


/ URL- _config.yml Jekyll. :

collections:
  meetings:
    output: true
    permalink: /reunioes/:path/
  sessions:
    output: true
    permalink: /sessoes/:path/

, "", - :

{% for session in site.sessions %}
  <p>{{ session.title }}</p>
{% endfor %}

, GitHub, , , , .

+4

All Articles