Search Page Up and Running
Update 4/23/2021: The write.as team has introduced some rate-limiting features on their API to combat spam bots. That stopped this Glitch app and my other Blazor WASM apps from working.
Took me a couple of days, but I got my journal search page up and running. That was a great learning experience.
If you want to remix my search app, you can find it here. If you want to remix the original Write.as Search app, you can find it here.
Prior to creating a Write.as blog, I've never even heard of Glitch. Below is a list of notes and references I've made while trying to get my search page working.
- I still don't exactly know how to describe Glitch. The best I can come up with is that it is like a web application generator, that is sort of like Github, where you can fork (remix) projects (apps) and test it right on the browser. With Glitch, your browser is your IDE; you develop and test on it. It also acts like “source control” with the ability to roll back (rewind) to your previous changes.
- Prior to me working on this search page app, I've never even seen Python code. I've heard of it, (isn't it like the most popular programming language right now?), but never had to use it.
- Pro tip: their “if” statements end with a colon.
- I've also never heard of Flask until I had to figure out how the HTMLs were getting rendered by Python.
- That lead me to figuring out that Flask uses the Jinja2 template engine. This stumped me for awhile, because the template language looked very similar to the Liquid template language that the Jekyll static site generator uses.
Some links to pages that helped me get it done:
- Rendering Templates with Flask
- Python Tutorial
- CSS – Stop text from overflowing
- Checking for null or empty with Jinja2
- Trimming strings with Jinja2
- Removing unnecessary white space from Jinja rendered template
Tags: #SiteUpdates #Bookmarks #Glitch #Python
Discuss... or leave a comment below.