# Announcing Acorn Prettify

**URL:** https://discourse.roots.io/t/announcing-acorn-prettify/26545
**Category:** blog
**Tags:** acorn
**Created:** 2024-01-16T15:13:26Z
**Posts:** 9

## Post 1 by @ben — 2024-01-16T15:13:26Z

We’re excited to announce the launch of a new package, [Acorn Prettify](https://github.com/roots/acorn-prettify), which is the successor to the [Soil plugin](https://github.com/roots/soil).

**Read more at [Announcing Acorn Prettify | Roots](https://roots.io/announcing-acorn-prettify/)**

---

## Post 2 by @Log1x — 2024-01-24T22:27:46Z

# Acorn Prettify v1.0.1 released

## What’s Changed

- :artist_palette: Ensure that collections are always instances of `Illuminate\Support\Collection` by @Log1x in [🎨 Ensure that collections are always instances of `Illuminate\Support\Collection` by Log1x · Pull Request #3 · roots/acorn-prettify · GitHub](https://github.com/roots/acorn-prettify/pull/3)
- :adhesive_bandage: Prevent XML errors from leaking by @Log1x in [https://github.com/roots/acorn-prettify/pull/5](https://github.com/roots/acorn-prettify/pull/5)

**Full Changelog** : [https://github.com/roots/acorn-prettify/compare/v1.0.0...v1.0.1](https://github.com/roots/acorn-prettify/compare/v1.0.0...v1.0.1)

---

## Post 3 by @raffjones — 2024-02-02T14:06:11Z

I tried this on a clean install of `roots/bedrock` and the latest `roots/sage`

```
composer require roots/acorn-prettify
```

No problem installing. Then:

```
wp acorn vendor:publish --tag=prettify-config
```

But this produced:

```
INFO No publishable resources for tag [prettify-config].
```

And there is no config file to be found anywhere, and no front end change to nav item classes or any other (previously Soil) enhancement such as relative URLs.

---

## Post 4 by @Log1x — 2024-02-02T14:32:16Z

You need to run `wp acorn optimize:clear` probably. This should be done for you automatically when you install packages if you setup `post-autoload-dump` like the [Acorn installation docs](https://roots.io/acorn/docs/installation/) show.

---

## Post 5 by @ben — 2024-02-02T15:00:58Z

> [@raffjones](#):
>
> no front end change to nav item classes

The nav walker from Soil is not included in this package — I’d recommend using [GitHub - Log1x/navi: A developer-friendly alternative to the WordPress NavWalker.](https://github.com/Log1x/navi)

> [@raffjones](#):
>
> relative URLs

These are disabled by default and can be enabled via the config if you’d like

See:

- [https://github.com/roots/acorn-prettify#features](https://github.com/roots/acorn-prettify#features)
- [https://github.com/roots/acorn-prettify/blob/78a9fb99a919ce7baca3161020b612004f96ce7c/config/prettify.php](https://github.com/roots/acorn-prettify/blob/78a9fb99a919ce7baca3161020b612004f96ce7c/config/prettify.php)

---

## Post 6 by @raffjones — 2024-02-02T15:09:24Z

Thanks very much @Log1x and @ben

@Log1x - that does indeed sort it. I added the `post-autoload-dump` script to `composer.json` then ran `composer dump-autoload -o` followed by trying the command to publish the config file. Now I can see it as `config/prettify.php` in the theme directory.

@ben - Once the config was published I could see the custom nav walker was removed, so that will explain the menu item classes. I’ll look at your suggested approach.

---

## Post 7 by @robrecord — 2024-12-11T11:30:04Z

Please may I ask what the best practice would be for including scripts such as Google analytics now that Soil has been deprecated? I’m using Radicle.

I can’t decide if I need to add into a helper class, or put into the scripts directory.

---

## Post 8 by @robrecord — 2024-12-11T16:53:36Z

Answering my own question:

In the local development envirionment (eg. in virtual machine, maybe):

```
wp acorn make:provider
```

In the created file, add a filter for `wp_head` within the `register()` method. Echo your script from within the filter. Use the `Roots\env` function to get environment variables and insert into the script.

Add the environment variables (eg. `GTAG="your google tag id"`) to your .env file. If using trellis, this can be automated by adding to the `env` vars in the appropriate file(s) in `trellis/group_vars`.

Then add your new provider class to the lists of providers in both `composer.json` and `config/app.php` following the conventions in each file.

* * *

Documentation: [Service Provider Configuration | Radicle Docs | Roots](https://roots.io/radicle/docs/service-provider-configuration/)

---

## Post 9 by @ben — 2025-09-26T14:29:30Z

[v1.0.3 has been released](https://github.com/roots/acorn-prettify/releases/tag/v1.0.3)

- :adhesive_bandage: Nice Search: Ensure we exit cleanly in fastcgi or litespeed (props @RafaelKr)
