saicaca / fuwari

✨A static blog template built with Astro.
https://fuwari.vercel.app
MIT License
1.36k stars 314 forks source link

request to add static cms feature #101

Closed View-my-Git-Lab-krafi closed 4 months ago

View-my-Git-Lab-krafi commented 5 months ago

4809-concern request to add static cms feature.

View-my-Git-Lab-krafi commented 5 months ago

sorry this is not a bug requsest , your theme is really best, i wish it should have instigation with static CMS do you have any plan do that ? ? i am trying to achieve that i already made one with netlify cms https://krafi-info.netlify.app/ https://gitlab.com/krafi/krafi.info . can you help me to achieve that . please >>.... https://www.youtube.com/watch?v=3yip2wSRX_4&t=78s even though i can add category and tags with cms

View-my-Git-Lab-krafi commented 5 months ago

https://github.com/View-my-Git-Lab-krafi/mywebkrafi/blob/main/public/admin/config.yml

View-my-Git-Lab-krafi commented 5 months ago

So i came to this solution with some extra pain to use cms

  1. manually entering date using cms, why there it no field to enter time , there is a lot of widget i will give at the bottom . but i dont know what you use i cant use those date , datetime widget
  2. as i notice i can use only one catagory
  3. Tags without tags the build fail , why ?? even the tags are [] so netlify compiler mess with it, I used {} which will break at the end. and then manually going to git i can change it to [] .

to be honest what i was trying to do looks like i faild . sadly .

backend:
  name: git-gateway
  branch: main # Branch to update (optional; defaults to master)

publish_mode: simple # Set to editorial_workflow if you want multi-branch workflow
media_folder: "src/content/posts" # Media files will be stored in the repo under src/content/posts
public_folder: "./" # The src attribute for uploaded media will begin with /content/posts
collections:
  - name: "blog" # Used in routes, e.g., /admin/collections/blog
    label: "Blog" # Used in the UI
    folder: "src/content/posts" # The path to the folder where the documents are stored
    create: true # Allow users to create new documents in this collection
    slug: "{{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: "../../layouts/BlogPost.astro"}
      - {label: "Title", name: "title", widget: "string"}
      - {label: "Description", name: "description", widget: "string"}
      - {label: "Category", name: "category", widget: "string", default: "you_can_set_one" }
      - {label: "Publish Date", name: "published", widget: "string", default: "yy-mm-dd"}
      - {label: "Tags", name: "tags", widget: "list", default: ["all", "all", "all"]}
      - {label: "Image", name: "image", widget: "image"}
      - {label: "Body", name: "body", widget: "markdown"}
      - {label: "Draft", name: "draft", widget: "boolean", default: false}

ghost cms widget


**String Widget

Type: string
Description: For short text input.
Example Usage: Titles, names.
Text Widget

Type: text
Description: For longer text input, typically multi-line.
Example Usage: Descriptions, biographies.
Number Widget

Type: number
Description: For numeric input.
Example Usage: Prices, quantities.
Boolean Widget

Type: boolean
Description: For true/false input.
Example Usage: Draft status, feature toggles.
Date Widget

Type: date
Description: For date input.
Example Usage: Event dates, publish dates.
Datetime Widget

Type: datetime
Description: For date and time input.
Example Usage: Timestamp, scheduling.
Markdown Widget

Type: markdown
Description: For Markdown-formatted text.
Example Usage: Blog posts, content with rich text formatting.
Image Widget

Type: image
Description: For image file uploads.
Example Usage: Featured images, gallery items.
File Widget

Type: file
Description: For file uploads.
Example Usage: Documents, downloadable resources.
Select Widget

Type: select
Description: For dropdown selection.
Options: Single or multiple selections.
Example Usage: Categories, tags.
Relation Widget

Type: relation
Description: For selecting and referencing entries from another collection.
Example Usage: Related articles, linked content.
List Widget

Type: list
Description: For creating an array of items.
Example Usage: Galleries, lists of links.
Subwidgets: Can contain other widgets as items.
Object Widget

Type: object
Description: For creating a structured group of nested fields.
Example Usage: Contact forms, complex data structures.
Subwidgets: Contains other widgets as fields.
Hidden Widget

Type: hidden
Description: For fields that should not be displayed in the UI.
Example Usage: Metadata, fixed values.**
View-my-Git-Lab-krafi commented 5 months ago

well netlify function can solve this issue i think by replacing {} to [] ## python code

saicaca commented 4 months ago

Thank you for your support, but I do not plan to introduce more CMS by default into the project. Since I am not familiar with CMS, I may not be able to provide further assistance. I am converting this issue into a discussion.