If I 'publish' something online -as a blog article, or pdf- will it be less attractive to publishers? If I 'publish' something online -say on my blog as a blog article, or on my website as a pdf for people do download it and give me feedback- will it then be less attractive to publishers to take that on? Am I shooting myself in the foot?

background for anyone who is interested:

I wrote a 'book' which introduces a certain topic, because out of interest mainly. I think I did a good job, but I am not in a position (academically) to publish this because I am not expert in the field, haven't got the credentials etc. So I am thinking of just offering it for free, and maybe contact publishers later, after my PhD. This way, I could also revise and improve it. But I am worried now that this will affect my chances.
Yes, it will be less attractive to (most) publishers.

Most publishers operate as businesses and seek to maximise profits [citation needed]. The availability of an earlier edition on the Internet will reduce the demand for the publisher's version and thus the potential revenue that could be gained from publishing your book.

The extent to which your self-published version could impact on a publisher's revenue (and therefore their willingness to publish) will relate to how readily available it is and how similar it is to the version that the publisher would produce. If it is stored in a dark corner of the Internet and only loosely resembles the newer version then it may have little influence on their willingness to publish.

However, there are some publishers that operate on a not-for-profit basis; for example Open Book Publishers. These kinds of publishers probably would not mind the reduced profitability of your book due to previous publication.