LukeSmithxyz / lb

Blog & RSS system in less than 100 lines of shell script
GNU General Public License v3.0
278 stars 80 forks source link

Titles are broken #12

Closed jesseerwin closed 5 years ago

jesseerwin commented 5 years ago

I named a post "Test" and when I published the post, the title became "Test test test Test test"

I tried again, naming the post "Yee yee cowboys" and the title is just blank.

I thought the issue might be that the text in the first post was "test" and in the second post it was "yee", so lb might not be handling duplicate text, but that is not the case. I tried a post called "l" with a text of "b" and the title became "Anime Should Be Illegal K-Pop Ought to be Illegal KPop Should be Illegal" (which are titles of previous posts I have made; don't ask)

The only modification I've made to the software is adding a line to the head in each published file that is a link to a google font, but the issue persists without said line. I tried again with a vanilla lb script, and named a post "yeet" with a text of "yote" but the title comes out as "yeet yeet".

It seems completely random, to be honest.

LukeSmithxyz commented 5 years ago

Yeah there was a big error with titles that I think I fixed yesterday. Are you using a version since then?

jesseerwin commented 5 years ago

Update: I just noticed that lb is now using a file called .htaccess to store post names and such. None of the posts I have deleted are being removed from that file as well, and it seems to be mixing things up.

Here's the file, it's pretty wonky looking. https://pastebin.com/Wig903bF

jesseerwin commented 5 years ago

Oh, your reply didn't pop up until after I posted that. Yes, I just cloned the repo a few minutes ago.

LukeSmithxyz commented 5 years ago

I don't know why I can't get this right. Lol. I just pushed another fix of an obvious bug but I'm going to test it for a minute.

LukeSmithxyz commented 5 years ago

Okay now I think it should be fixed. It seems that I didn't sufficiently meditate the ramifications of outputting printf to file.

You might want to clean out the junk in the htaccess file, but new entries should work, but tell me if there are still problems. Working in the entries I tried.

jesseerwin commented 5 years ago

Awesome. I'll test it for myself later, and if all goes well I will close the issue.

jesseerwin commented 5 years ago

Thanks, it's all working now. Keep up the good work; this script is great.