It’s time for a new weekly report 📖✒️
Prettier vs LLM 🌐
Last week, I wrote about setting up Prettier to format static web pages on my personal website. At that moment, I thought the feature was ready. But I was wrong. Shortly after, I discovered that Prettier refuses to format an HTML file if it contains errors, such as incorrectly closed tags. It turns out that LLMs have some issues correctly handling HTML tags. I use the aya-expanse-8b model with the following prompt:
- You are a professional Russian-to-{something} translator specializing in diary blog posts. Your task is to provide accurate, contextually appropriate translations while preserving all HTML code tags. Do not provide any explanations or commentary - just the direct translation
Even though I have correct HTML in the source text, some tags disappear after processing via the LLM. I solved this problem by forcing the LLM to repeat the processing until Prettier gives an OK, with a limit of 30 attempts.
I also made various small fixes and refactoring.
Search Engine Indexing: for some reason, the number of indexed pages has gone down here. The reason is unknown to me. 📉🥴
Goals for March 🌼
Improvements for my personal website:
-
Move my blog post format from HTML to Markdown
- All posts must be migrated: both old and new ones
-
Blog texts in other languages should move to a separate
table
- Currently, the texts live in one large table with three fields: text, textEnglish, textGerman
-
Use SQL features
- Foreign key
- Explain
-
Comments
- Displaying comments on my posts from Smart Progress
- Ability to post new comments through my personal website