If your intended audience doesn't know that History Stack Exchange contains "posts", then you should omit the article. By omitting it, you are implicitly saying "I don't expect you to already know what is available to read on History Stack Exchange. So, I am informing you now: the things on History Stack Exchange that can be read are 'posts'."
If your reader knows that there is nothing to read on History Stack Exchange but posts, you could omit "posts" entirely:
I was reading there and one specific issue interested me.
The way to think of "the" in this context (and most contexts) is that it refers to something that the reader understands that you have already referred to, even if only implicitly. For example:
I went to the kitchen and got the tricycle.
only makes sense if your listener knows that a tricycle was in the kitchen. We don't normally expect that there would be a tricycle in a kitchen.
I went to a new customer's kitchen and fixed the sink.
This makes sense because it's normal and expected that a kitchen would have a sink, even if this is the first time you've heard of the kitchen. The word "kitchen" implicitly brings up the sink, so you can refer to the sink with "the".
At the Turkish restaurant, I got köfte, a kind of spiced meatball dish.
Here, omitting the article suggests that you don't expect your listener to know what köfte is or that it's something you'd likely get at the Turkish restaurant.
At Canter's Deli, you should get the corned-beef sandwich.
Here, "the" is appropriate because bringing up the deli implicitly brings up typical items on the menu. Even if you don't expect your listener to know that Canter's Deli serves corned-beef sandwiches, "the" can still be appropriate because "the" also suggests selecting one thing from among many choices. The sentence means "At Canter's deli, you should choose 'corned-beef sandwich' from among your choices for what to eat—which will be apparent once you're there."
The books at the library
That last point about "the" makes this sentence sound a little silly:
I was in the N.Y. Library. I was reading the books there, and one book interested me.
"Oh, you were reading the books!" As opposed to what, the posters on the wall? The definite article also suggests that you were there to read all the books, which is absurd. Usually when there is grammatical ambiguity, a listener will use common sense to avoid making an absurd interpretation, but in this case, the absurdity is hard to avoid because a listener understands this sentence by analogy with the "…and fixed the sink" and "…get the corned-beef sandwich" sentences. This sentence treats "the books" as a single fixture in the New York Library. That doesn't make sense if you're reading them; it makes sense in a context like this:
The yearly cost to insure the books in the New York Library is over a million dollars.
Notice "the yearly cost". The definite article fits there because insuring books implies a yearly cost.
Bringing your own books
About whether without "the" the reader might assume that you took some books along with you into the library and were reading them there, the answer is no. The ordinary thing to do at a library is read the library's books, not your own. A reader will assume that unless you say otherwise. If you were reading your own books, you'd have to say that explicitly.
The best way to reword your last example is probably just this:
I was reading at the N.Y. Library, and one book interested me.
The metaphor of pointing
If this is sounding like complicated rules to memorize, here is a simple way to understand what's going on. "The" is like pointing to something that your listener already sees, much like "that" as a demonstrative adjective (etymologically, the similarity between the words is no coincidence). For example, if someone holds up a tray containing two cookies and asks "Which would you like?", you could answer "I'll take the big one." Or you could start a conversation with "Look at the bird in that tree"—if there's only one bird and it's easy to see. The word "the" is appropriate even though it's introducing something new, because you're pointing out something that your listener already sees, or you're inviting your listener to look at it. The specific thing you mean is already there, and you're just pointing to it. Only, instead of pointing with your finger, you're pointing with the noun phrase that follows "the".
In the case of implied reference, when you bring up a kitchen, your listener "already sees" the sink, so you refer to the sink with "the". Regarding a tricycle in the kitchen, "the tricycle" would suggest that you assume that your listener expects that the kitchen contains a tricycle. Unless some other context already set that up, your listener is likely to think that you misspoke or that he misheard. Regarding advice about what to order at a restaurant, "the" can introduce an entirely new food item, because your listener will "see" the menu when actually visiting the restaurant.
Often more than one choice is perfectly good. The choice between "reading posts" and "reading the posts" is largely a matter of taste. But you should understand that these choices convey information about what you are assuming your listener sees, imagines, or expects.