You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: content/docs/1_guide/4_content/guide.txt
+81-1
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,88 @@ Description: Learn how to create pages and how to fill them with content.
6
6
7
7
----
8
8
9
+
Intro: Files and folders are Kirby's primary data source in which you can organize your content exactly how you need it. If you need to build to scale, you can go beyond and add data from any data source.
10
+
11
+
----
12
+
9
13
Category: Creating your site
10
14
11
15
----
12
16
13
-
Icon: copy
17
+
Screencast:
18
+
19
+
(screencast: https://www.youtube.com/watch?v=zUPqqrhbcR8 title: The content folder text: The heart and soul of your Kirby installation: Let's learn how to create pages and add content with simple text files and folders. )
20
+
21
+
22
+
----
23
+
24
+
Text:
25
+
26
+
## Files and folders
27
+
28
+
Since Kirby is a flat-file CMS, all content is stored in files and folders within the `content` folder. Each folder you create represents a page that is accessible via its own URL.
29
+
30
+
If you create a folder called `blog` as direct child of the `content` folder, it will be accessible via `https://yourdomain.com/blog` etc.
31
+
32
+
Page folders can serve as pages in their own right, i.e. only contain the content from their own folder, or they can serve as data containers for their parents, or they can be used in other parts of the project.
33
+
34
+
35
+
All content you create in the backend can also just serve as a data store, ready to be consumed in your SPA or other types of media.
36
+
37
+
<success>
38
+
Content in Kirby can also come from a database, from an external API, Excel sheets or any other data source. We will cover this in (link: docs/guide/virtual-content text: other parts of the documentation).
39
+
</success>
40
+
41
+
42
+
## Editing content
43
+
44
+
The flat-file architecture of Kirby makes creating and editing content in Kirby highly flexible. You can create content in three ways in Kirby, in fact, all three ways can be used in parallel.
45
+
46
+
1. You can use the (glossary: panel text: Panel) to edit content and upload files.
47
+
48
+
2. You can create files and folders manually in the file system and edit content files with the text editor of your choice.
49
+
50
+
3. You can create and modify content programmatically using Kirby's API, for example, create pages from `.csv` files or from form content on the front-end.
51
+
52
+
(link: docs/guide/content/creating-pages text: Read more ›)
53
+
54
+
55
+
## Publishing workflow
56
+
57
+
Customizable page states give you maximum control over your workflow, from drafts over unreviewed to published pages. Choose what you need and start creating.
58
+
59
+
In Kirby, pages can have three states:
60
+
61
+
- draft
62
+
- listed
63
+
- unlisted
64
+
65
+
66
+
Drafts are only accessible to logged-in users, while listed and unlisted pages are accessible via their URL.
67
+
68
+
You can use these states to filter files in the frontend or to implement a multi-step publishing workflow for drafts, in-review and published pages.
69
+
70
+
71
+
(link: docs/guide/content/publishing-workflow text: Read more ›)
72
+
73
+
## Structuring content
74
+
75
+
Your content is your biggest asset, and structuring it in a way that makes it easily accessible and ideally reusable across different types of media ([Single Source Publishing](https://en.wikipedia.org/wiki/Single-source_publishing)) is therefore important.
76
+
77
+
Organize content your way. Every page type or data entry can have the completely unique data structure that your project demands.
78
+
79
+
(link: docs/guide/content/fields text: Read more ›)
80
+
81
+
## Media files
82
+
83
+
Kirby stores media files in the same folder as the page content instead of putting everything into a huge media library. In addition, you can store media files in the `site` object, i.e. directly in the `content` folder.
84
+
85
+
Kirby works with all types of media files and allows you to store meta data for each file in the same flexible way you can store information for pages.
86
+
87
+
(link: docs/guide/files text: Read more ›)
88
+
89
+
## Text formatting
90
+
91
+
When writing for the web, nobody really wants to wrap HTML tags around text. On the other hand, most WYSIWYG editors produce awful HTML output and have tons of other issues. In Kirby, content is therefore marked up and formatted in Markdown or our extended version of it, which we call KirbyText.
92
+
93
+
(link: docs/guide/content/text-formatting text: Read more ›)
Copy file name to clipboardexpand all lines: content/docs/1_guide/9_uuids/guide.txt
+1-1
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ Text:
28
28
29
29
## What are UUIDs?
30
30
31
-
Kirby is built on (link: docs/guide/content/introduction text: just files and folders), which is great for flexibility in structuring your content, performance and rapid development. Referring to a page or file from elsewhere by its file path works, but makes the site structure pretty rigid and takes away a lot of the flexibility of the content structure. Because as soon as a page or file gets renamed or moved, its file path changes – and immediately the reference to it will break.
31
+
Kirby is built on (link: docs/guide/content text: just files and folders), which is great for flexibility in structuring your content, performance and rapid development. Referring to a page or file from elsewhere by its file path works, but makes the site structure pretty rigid and takes away a lot of the flexibility of the content structure. Because as soon as a page or file gets renamed or moved, its file path changes – and immediately the reference to it will break.
32
32
33
33
UUIDs (universally unique identifiers) are an additional way to refer to any model in Kirby – be it a page, a file or a user. UUIDs look something like `page://Eesj89FnbMzMMvs0`. In contrast to file paths, UUIDs never change. They are randomly generated when the model gets first created. It is so unlikely that two models ever share the same UUID that they can be considered unique (in fact, it will take millions of years to reach a 1% probability of a collision on any given site). These properties make UUIDs the ideal candidate for robust and persistent references.
0 commit comments