From b070295a4bc7367c0762dff505049c99402f1849 Mon Sep 17 00:00:00 2001 From: maxime-cool Date: Thu, 22 Feb 2024 11:53:54 +0100 Subject: [PATCH] added nested pages --- content/Revue de presse/index.md | 9 --------- static/admin/config.yml | 31 +++++++++++++++++++------------ 2 files changed, 19 insertions(+), 21 deletions(-) delete mode 100644 content/Revue de presse/index.md diff --git a/content/Revue de presse/index.md b/content/Revue de presse/index.md deleted file mode 100644 index 1b0a2ca..0000000 --- a/content/Revue de presse/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "Revue de presse" -description: "A few years ago, while visiting or, rather, rummaging about Notre-Dame, the author of this book found, in an obscure nook of one of the towers, the following word, engraved by hand upon the wall: —ANANKE." -featured_image: '/images/Victor_Hugo-Hunchback.jpg' -menus: ['main'] ---- -{{< figure src="/images/Victor_Hugo-Hunchback.jpg" title="Illustration from Victor Hugo et son temps (1881)" >}} - -_The Hunchback of Notre-Dame_ (French: _Notre-Dame de Paris_) is a French Romantic/Gothic novel by Victor Hugo, published in 1831. The original French title refers to Notre Dame Cathedral, on which the story is centered. English translator Frederic Shoberl named the novel The Hunchback of Notre Dame in 1833 because at the time, Gothic novels were more popular than Romance novels in England. The story is set in Paris, France in the Late Middle Ages, during the reign of Louis XI. \ No newline at end of file diff --git a/static/admin/config.yml b/static/admin/config.yml index 5651ebd..6a8faf3 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -10,18 +10,25 @@ locale: 'fr' media_folder: "static/images" public_folder: "/images" collections: - - name: posts - identifier_field: name - label: 'Blog' # Used in the UI - folder: '_posts/blog' # The path to the folder where the documents are stored - slug: '{{year}}-{{month}}-{{day}}-{{slug}}' # Filename template, e.g., yyyy-MM-dd-title.md - fields: # The fields for each document, usually in front matter - - { label: 'Layout', name: 'layout', widget: 'hidden', default: 'blog' } - - { label: 'Title', name: 'title', widget: 'string' } - - { label: 'Publish Date', name: 'date', widget: 'datetime' } - - { label: 'Featured Image', name: 'thumbnail', widget: 'image' } - - { label: 'Rating (scale of 1-5)', name: 'rating', widget: 'number' } - - { label: 'Body', name: 'body', widget: 'markdown' } + - name: pages + label: Pages + label_singular: 'Page' + folder: content/pages + create: true + # adding a nested object will show the collection folder structure + nested: + depth: 100 # max depth to show in the collection tree + summary: '{{title}}' # optional summary for a tree node, defaults to the inferred title field + # adding a path object allows editing the path of entries + # moving an existing entry will move the entire sub tree of the entry to the new location + path: { widget: string, index_file: 'index' } + fields: + - label: Title + name: title + widget: string + - label: Body + name: body + widget: markdown # - label: 'Settings' # name: settings # files: