lwn.net has a solution to this. Subscribers can create a link that allows non subscribers to read that one article and at the top it has a promo offering a few months free subscription.
This allows you to posts articles on reddit/hn and people can still click them and when they see how high quality the articles are they will want to subscribe to see them all.
Of course this requires your content to be quality and not just clickbait that gets shared around on social media.