Display message on logout (flash?) I have looked through previous questions and answers, but don't see the following clearly explained.
When my users visit /logout, they are successfully logged out and redirected to the website's homepage.
What is not clear to me is how I can detect that action, and display some HTML saying they have been successfully logged out.
You can set postLogoutRedirect in your config/general.php (docs) to redirect your users to a specific page, something like 'postLogoutRedirect' =&gt; 'your-page'
If you want to use an existing page, say your homepage, and display an alert you could set 'postLogoutRedirect' =&gt; '/?loggedout' and check for it in your template using:
{% if craft.app.request.getParam('loggedout') is not null %}
    &lt;p&gt;You have been logged out&lt;/p&gt;
{% endif %}