I’m looking for a way to extend a existing markdown file. For example:
free-article.md
---
foo: bar
bar: stool
----
Free content
And then I want to extend the information from the free article in a paid-article.md
paid-article.md
---
foo: bar (extend from free-article.md)
bar: stool (extend from free-article.md)
paid: only param
---
Free content (extend from free-article.md)
Paid content
I thought maybe to abuse the multi language feature, but don’t know if that is the way to go.
There is no way to do what you ask with Hugo natively, as far as I know -but I would love to be proved wrong-.
Currently the only way I would think that you can encrypt a different version or part of a HTML page and hide it behind a paywall, would be on the frontend with JS.
Utilize a JS encryption library as part of a deploy script to selectively manipulate Hugo’s generated HTML.
Recently I opened the following GitHub issue asking for native support to frontend JS encryption: