# Audit your published site for problems

**URL:** <https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184>\
**Category:** tips & tricks\
**Created:** [October 17, 2021, 7:14pm UTC](https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184 "2021-10-17T19:14:24Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![kaushalmodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/kaushalmodi/32/2567_2.png) [@kaushalmodi](https://discourse.gohugo.io/u/kaushalmodi)\
**Post date:** [January 13, 2022, 2:42pm UTC](https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184/8 "2022-01-13T14:42:47Z")

</div>

Thanks for this writeup @jmooring!

I just added this to my Netlify’s bash build script:

```bash
set -euo pipefail # http://redsymbol.net/articles/unofficial-bash-strict-mode
IFS=$'\n\t'

# ..

site_audit () {
    audit_dir="./audit/"

    # https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184
    if ! HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true \
         HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true \
         hugo --destination "${audit_dir}"
    then
        echo "FAIL: hugo run failed."
        exit 1
    fi

    if grep -inorE "<\!-- raw HTML omitted -->|ZgotmplZ|\[i18n\]|\(<nil>\)|(&lt;nil&gt;)|hahahugo" "${audit_dir}"
    then
        echo "FAIL: Site audit. Review the contents of ${audit_dir}."
        exit 1
    else
        echo "PASS: Site audit"
        rm -rf "${audit_dir}"
    fi
    echo ""
}

# ..

site_audit

# ..

```

---

_[View the full topic](https://discourse.gohugo.io/t/audit-your-published-site-for-problems/35184)._
