# How to edit the YAML Front Matter of multiple markdown files

**URL:** <https://discourse.gohugo.io/t/how-to-edit-the-yaml-front-matter-of-multiple-markdown-files/40070>\
**Category:** tips & tricks\
**Created:** [August 18, 2022, 7:35pm UTC](https://discourse.gohugo.io/t/how-to-edit-the-yaml-front-matter-of-multiple-markdown-files/40070 "2022-08-18T19:35:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![iaeiou](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/iaeiou/32/15332_2.png) [@iaeiou](https://discourse.gohugo.io/u/iaeiou)\
**Post date:** [August 18, 2022, 7:35pm UTC](https://discourse.gohugo.io/t/how-to-edit-the-yaml-front-matter-of-multiple-markdown-files/40070/1 "2022-08-18T19:35:51Z")

</div>

Hi there,

I’m migrating to a new theme, and needed to modify some Front matter variables in my posts.

I’m lazy and I don’t like Regex, so I searched for a tool to help me.

I found [yq](https://github.com/mikefarah/yq), a standalone CLI processor written in Go

The [official documentation](https://mikefarah.gitbook.io/yq/) is pretty unclear, so I wrote a post:

> **[Edit the Yaml Front Matter of multiple Markdown files](https://roneo.org/en/hugo-edit-yaml-files-from-the-cli-with-yq/)**
>
> Edit the Yaml Front Matter of multiple Markdown files - Roneo.org ✨

(I’m rebuilding the design of this site, things can be broken)

---

<div class="post-metadata">

**Author:** ![Mikhail](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/mikhail/32/1138_2.png) [@Mikhail](https://discourse.gohugo.io/u/Mikhail)\
**Post date:** [August 22, 2022, 7:37am UTC](https://discourse.gohugo.io/t/how-to-edit-the-yaml-front-matter-of-multiple-markdown-files/40070/2 "2022-08-22T07:37:03Z")

</div>

Many free text editors can do “Search and replace in the project.” The regular expression language allows us to make almost any substitution in strings. For example Visual Studio Code.

 ![regex-1](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/3X/c/d/cdd1df276182cb1d3f3c4f8ec1b8efe1718ea3de.png)
