# Zola new post/foo.md

**URL:** <https://zola.discourse.group/t/zola-new-post-foo-md/1062>\
**Category:** Uncategorized\
**Created:** [October 16, 2021, 9:55pm UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062 "2021-10-16T21:55:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbari](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/nbari/32/619_2.png) [@nbari](https://zola.discourse.group/u/nbari)\
**Post date:** [October 16, 2021, 9:55pm UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/1 "2021-10-16T21:55:15Z")

</div>

Is there a command to start a new post with some default keys (like adding the date, title)? something like in `hugo` when using `new post/title.md`

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [October 17, 2021, 9:14am UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/2 "2021-10-17T09:14:31Z")

</div>

No there isn’t

---

<div class="post-metadata">

**Author:** ![nbari](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/nbari/32/619_2.png) [@nbari](https://zola.discourse.group/u/nbari)\
**Post date:** [October 17, 2021, 9:54am UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/3 "2021-10-17T09:54:09Z")

</div>

Any tip, tool to create new posts? is there a way to have a template so that the “author” could just start writing without the need to worry about the format of the headers?

I am trying to find an easy way for “authors/editors” to create new posts.

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [October 17, 2021, 12:51pm UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/4 "2021-10-17T12:51:48Z")

</div>

copy\paste the template from another directory to zola’s ? From my expirience copywriters don’t like cmd or terminal and feel more confident with finder\explorer 🙂

---

<div class="post-metadata">

**Author:** ![nbari](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/nbari/32/619_2.png) [@nbari](https://zola.discourse.group/u/nbari)\
**Post date:** [October 17, 2021, 3:18pm UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/5 "2021-10-17T15:18:45Z")

</div>

true, could you please share a link to a “post” template? for the date I use `date -u +"%FT%TZ` but as you mention “copywriters” prefer not to use the command line, any tip from where they can get the current date besides sites like [timestamp-converter](https://www.timestamp-converter.com/)?

I am trying to simplify the whole edit process, for now, I hosted Zola in GitHub and using Cloudflare pages, so every time they edit/modify something (in the main branch) gets deployed, but because of the date they start to have articles in a different order (the latest article goes last, etc, problems of copy-pasting previous article)

---

<div class="post-metadata">

**Author:** ![Roman](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@Roman](https://zola.discourse.group/u/Roman)\
**Post date:** [October 18, 2021, 8:54am UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/6 "2021-10-18T08:54:15Z")

</div>

The template is more about what are you using - taxonomy, etc. The simplest front matter is

```auto
+++
title = "Article name"
+++

```

Also, with tera you could add timestamp directly to your html and don’t do any maniputations in content ([link](https://tera.netlify.app/docs/#now)

---

<div class="post-metadata">

**Author:** ![xpe](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/xpe/32/416_2.png) [@xpe](https://zola.discourse.group/u/xpe)\
**Post date:** [June 18, 2024, 9:21pm UTC](https://zola.discourse.group/t/zola-new-post-foo-md/1062/7 "2024-06-18T21:21:12Z")

</div>

Here is a simple Rust program you could adapt.

```toml
# Cargo.toml

[package]
name = "markdown_template"
version = "0.1.0"
edition = "2021"

[dependencies]
chrono = "0.4.38"
indoc = "2.0.5"

```

```rust
/// main.rs

use chrono::Local;
use indoc::formatdoc;

fn main() {
    let current_date = Local::now().format("%Y-%m-%d").to_string();
    let template = formatdoc! {r#"
        +++
        title: ""
        date: {}
        +++
    "#, current_date};
    println!("{}", template);
}

```
