Page Publishing

Indexing Published Pages

While we’re waiting for the Index or search published pages feature, here is a way to do it manually.

Finding Published Pages

Using the Discourse Data Explorer you can create a new Published Pages query:

SELECT CONCAT('/pub/', pp.slug) AS URL, pp.topic_id
FROM published_pages pp
ORDER BY pp.id

Providing an Index

Surely one can Run Data Explorer queries with the Discourse API to create and maintain an index of published pages. This might even be doable with the Custom Wizard Plugin 🧙.

I manually created a new topic using the data from the Published Pages query above, then published it at /pub/index.

Since I Run other websites on the same machine as Discourse, I could easily make the published pages index available at https://discourse.example/pub with this snippet:

    # Provide an index to published pages
    location ~* ^/pub/?$ {
        return 307 https://discourse.example/pub/index;
    }
7 Likes