Summary
Learn how to structure and use the content in the most efficient way. The secret is to use to the maximum extent the features made available, out of which importing external content (at build time or at run time) is the most powerful since it allows establishing single source of truth for a lot of repetitive pieces of content that you may need to use in your documents. As such, when modifying this kind of pieces of content, you donβt have to remember in which document you place it, only modify the source and the pice of content will appear in its new version in all document where is placed.
There are two types of content that you can use in your documents:
- content directly included in your documents
- content imported from
external sources
We define an external source
as a source of content which is outside the current document. An external source can be another file from your documentation or a file from an external Github repository (public or private). External sources are very important because allows you to create reusable pieces of content which can be placed anywhere within your documentation. The content from external sources (external content
) can be rendered at build time
or at run time
. These beeing said, it becomes clear that it is very important the way in which you organise your documentation.
Organise documents
As example, we will use the structure of Docaroo documentation. The documents are located in doc-contents
folder inside the project folder. We name doc-contents
as the docs root folder
.
π doc-contents/
βββ π _components
β βββ π alerts.md
β βββ π card.md
β βββ π components.md
β βββ π download-link
β β βββ π download-link.md
β β βββ π lorem-ipsum.pdf
β βββ π faq-item.md
β βββ π images.md
β βββ π link-btn.md
β βββ π rich-media.md
β βββ π scroll-spy.md
β βββ π xlsx-to-html-chart
β β βββ π corrected-example.xlsx
β β βββ π test-file.xlsx
β β βββ π xlsx-to-html-chart.md
β βββ π xlsx-to-html-table
β βββ π tables
β β βββ π test-file.xlsx
β βββ π test-file.xlsx
β βββ π xlsx-to-html-table.md
βββ π _content
β βββ π content-items.md
β βββ π content.md
β βββ π external-content.md
βββ π _experiments
β βββ π docx-summary
β β βββ π docx-summary.md
β β βββ π pe.docx
β β βββ π pe__word_summary.txt
β β βββ π pr.docx
β β βββ π pr__word_summary.txt
β β βββ π pt.docx
β β βββ π pt__word_summary.txt
β βββ π experiments.md
β βββ π pdf-summary
β βββ π pdf-summary.md
β βββ π pe.pdf
β βββ π pe__pdf_firstpage.png
β βββ π pe__pdf_summary.txt
β βββ π pr.pdf
β βββ π pr__pdf_firstpage.png
β βββ π pr__pdf_summary.txt
β βββ π pt.pdf
β βββ π pt__pdf_firstpage.png
β βββ π pt__pdf_summary.txt
βββ π _faq
β βββ π q0.md
β βββ π q01.md
β βββ π q1.md
β βββ π q2.md
β βββ π q3.md
β βββ π q4.md
β βββ π q6.md
β βββ π q7.md
β βββ π q71.md
β βββ π q8.md
β βββ π q9.md
βββ π _tools
β βββ π cat-info.md
β βββ π faq.md
β βββ π site-pages.md
β βββ π tag-info.md
βββ π downloads
β βββ π lorem-ipsum.pdf
βββ π general
β βββ π 404.html
βββ π get-started.md
βββ π intro.md
βββ π partials
βββ π card-gallery-demo
β βββ π c1.md
β βββ π c2.md
β βββ π c3.md
β βββ π c4.md
βββ π errors-and-warnings
β βββ π wrong-link-btn-type.md
βββ π external-content-demo
β βββ π alert-content.md
β βββ π card-content-aside-demo.md
β βββ π card-content-demo.md
β βββ π card-gallery-c1.md
β βββ π card-gallery-c2.md
β βββ π card-gallery-c3.md
β βββ π card-gallery-c4.md
β βββ π ec1.md
β βββ π ec2.md
β βββ π faq-demo.md
βββ π media
β βββ π c1-tr-1.png
β βββ π c1-tr-2.png
β βββ π doc-site-s.png
β βββ π doc-site-tr.png
β βββ π girl-1.png
β βββ π home-600.png
β βββ π home-s.png
β βββ π human-600.png
β βββ π joy-s.png
β βββ π man-s.png
β βββ π man-thinking.png
β βββ π smile-600.png
β βββ π w2s-gr-s.png
βββ π scroll-spy
βββ π demo-combined-scroll-spy
β βββ π item1.md
β βββ π item2.md
βββ π demo-scroll-spy
βββ π item1.md
βββ π item2.md
βββ π item3.md
βββ π item4.md
βββ π item5.md
Following the structure of Docaroo documents, you can organise your documentation based on the next recommendations:
- Do not rename the
docs root folder
, it has to be always nameddoc-contents
- Do not remove the following sub-folders:
general
: it contains some mandatory html files (currently 404.html, which you can customise as you need)_tools
: it contains the main tools made available by Docaroo for easy work documents and taxonomies as well asfaq
page if this feature is active_faq
: iffaq
feature is active for the site, this sub-folder contains the questions and answers
- Use
collections
of documents to group your documents in relevant sections. A collection is a folder starting with_
and properly declared in_config.yml
- For easy find all documentβs components (such as images), you can put each document on itβs own folder together with the media files that it uses. This approach may be bette than having a single source of many media files. However, large media files (such as videos) should not be stored in the
docs root folder
and to be rendered/played from specialized and much faster sources (such as Vimeo or Youtube). We provide dedicated components for such situations.
Observe the files in partials sub-folder. These files doesnβt have regular front matter and should stay like this to avoid them to be rendered as documents at build time.
On this page