Skip to content

Post Count #230

Answered by girlpunk
AlexHedley asked this question in Q&A
Dec 15, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Your initial code looks correct, bar an incorrect bracket placement. We can rewrite it as:

@(
    Outputs.FromPipeline(
        nameof(Content)
    )
    .Flatten()
    .FilterSources($"posts/*")
)
.Count()

Moving that penultimate closing bracket to after the count call should resolve the issue, like so:

@(Outputs.FromPipeline(nameof(Content)).Flatten().FilterSources($"posts/*").Count())

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AlexHedley
Comment options

Answer selected by AlexHedley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants