Closed khannzxc closed 3 years ago
Actually i am integrating Netlify CMS. I have integrated it to other hugo themes in the past.
But in this theme the post are saved in a folder like posts/POSTNAME/POSTNAME.md
How can I tell netlify to create a folder with same name as post title?
my netlify.toml is
backend:
name: git-gateway
branch: master # Branch to update (optional; defaults to master)
media_folder: static/images/uploads
public_folder: /images/uploads
collections:
- name: "post"
label: "Post"
folder: "exampleSite/content/posts"
create: true
fields:
- { label: "Title", name: "title", widget: "string" }
#- { label: "Publish Date", name: "date", widget: "datetime" }
- { label: "Description", name: "description", widget: "string" }
# - { label: 'Side Image', name: 'image', widget: 'image' }
- { label: "Body", name: "body", widget: "markdown" }
# - { label: 'Libraries', name: 'libraries', widget: 'list' }
#- { label: "Categories", name: "categories", widget: "list" }
#- { label: "Tags", name: "tags", widget: "list" }
#- { label: "Series", name: "series", widget: "list" }
How to create new posts
If you wanna write it on english translation in the Posts
page
hugo new posts/yournamecontent/index.en.md
If you wanna write it without multilanguage in the Posts
page
hugo new posts/yournamecontent.md
If you wanna create a special page for example About
page
hugo new about.md
or hugo new about/index.en.md
Yeah it is not necessary to have a folder for a post. The issue is considered solved now
@khusika
How to create new posts
1. If you wanna write it on english translation in the `Posts` page `hugo new posts/yournamecontent/index.en.md` 2. If you wanna write it without multilanguage in the `Posts` page `hugo new posts/yournamecontent.md` 3. If you wanna create a special page for example `About` page `hugo new about.md` or `hugo new about/index.en.md`
Is it also possible to have posts in their own folder for easy management and organization of assets? For example the image files included in the post. (in the documentation for creating your first post it is not mentioned what the best practice is for post specific images)
So: posts > postname1 > postname1.md posts > postname1 > images.jpg posts > postname1 > video.webm
Is it possible to create the post in its own folder for this workflow when telling hugo to make a new post? Also, regarding the language translation, is it possible to disable multi-language so posts are just name.md instead of name.lang.md?
Is it also possible to have posts in their own folder for easy management and organization of assets?
Use CMS, read "Frontend Interfaces with Hugo" for more information
Is it possible to create the post in its own folder for this workflow when telling hugo to make a new post?
Please read about hugo new
documentation here
Also, regarding the language translation, is it possible to disable multi-language so posts are just name.md instead of name.lang.md?
Without multilanguage path
posts/postname/index.md
; posts/postname.md
; pagename/index.md
; pagename.md
Is it also possible to have posts in their own folder for easy management and organization of assets?
Use CMS, read "Frontend Interfaces with Hugo" for more information
Doesn't something like Hokus or Netlify CMS need theme-specific setup to work properly?
Is it possible to create the post in its own folder for this workflow when telling hugo to make a new post?
Please read about
hugo new
documentation here
Yes, I did that, but nothing there talks about that. Does that mean you would have to manually name the folder for each post, is that correct?
Also, creating a new post.md does not include the theme's post options in the front matter (just title, date and draft). Is it possible to make it include the options you built into the theme? then we could remove the options what we don't want to change, but don't have to remember all the option names and such.
Doesn't something like Hokus or Netlify CMS need theme-specific setup to work properly?
It's not "theme-specific setup" but "user-specific setup", and i wont (for the moment) support lot of 3rd party CMS-apps to be included in this theme.
Yes, I did that, but nothing there talks about that. Does that mean you would have to manually name the folder for each post, is that correct?
I don't understand what "manually" are you talking about, using hugo new
is already automatic to generate a post in/out-side folder.
Also, creating a new post.md does not include the theme's post options in the front matter (just title, date and draft).
Every single post created using hugo new
will include the default front-matter from archetypes
Please read Hugo Documentation for general question and read FeelIt Documentation for specific question (e.g. extended-shortcode, UI, bugs, library, etc.)
Thread locked as it's already out of topic discussion from original post. Feel free to create a new issues which is related to the theme bugs or feature request
How to create new posts
hugo new posts/istpost
The above command create a file
istpost.md
incontent/posts
folder. But the default posts are in this formatposts/Folder/folder.md
My question is will we create folder manually?