Documentation
New Challenge
Alright, I am preparing for my next job (back in Austria <3), and this position offers generous room for finishing my master's in medical biology, which was about time, I would say.
Also, I am involved in a new project, where I have the chance to dive deeper into database structures and databases in general as well as communicating the thin line between the technical possible of engineering and wizardry of mount mordor.
Having that said, it is a great opportunity to add a skill set to my stack and I will probably also write the backend for this project as well.
Thanks, nerds!
Session Wrap-Up
Today, we tackled several key areas to enhance your FastAPI application and its deployment:
- Nginx Configuration: Addressed serving FastAPI with Nginx, including 504 Gateway Timeout resolution and HTTPS setup.
- Dependency Installation: Solved virtual environment and permission issues for dependency installations.
- Markdown Rendering: Fixed escaping issues to correctly display HTML content from Markdown in FastAPI using Jinja2.
Updated To-Do List
- Monitoring and Logging: Set up comprehensive monitoring and logging for insights into FastAPI and Nginx operations.
- Data Transfer to PostgreSQL: Create mechanisms for migrating Markdown/YAML content into a PostgreSQL database for dynamic content management.
- Automate Deployment: Explore CI/CD pipelines for streamlined deployment processes.
- Performance Optimization: Fine-tune FastAPI and Nginx for optimal performance.
- Security Enhancements: Apply security best practices to safeguard all components of the application.
- User Feedback and Testing: Engage in extensive testing and gather user feedback for continuous improvement.
- Feature Development: Continue to develop and integrate new features based on user feedback and requirements.
- Matomo Implementation: Integrate Matomo analytics for detailed insights and analytics on user interactions.
- Search Engine Optimization: Implement SEO strategies to improve visibility and search engine ranking.
- Discover Enhancements: Research and implement new features or technologies to expand the functionality and reach of your websites.
- Implement Pagination: Plan and add pagination to efficiently manage and navigate large datasets or content pages.
Stay curious and tuned!
A long way behind, a long one to go
So, the thing is, I wrote these lines before 182bit.org went live to production, because apparently on the run, there can be some obstacles in your way. Sailing the ship in development on my local machine, using uvicorn was fast and straight forward.
It is not that the upcoming challenges were overly hard or complex, but my main feedback tool ChatGPT had some issues in generating responses, and I got reminded how dependent of it I still am. One cannot speed up experience, I guess.
Also, there is still no extended markdown functionality implemented, but I guess it is time to focus again an some minor details on the interface and design. I have 'tags' and 'author' metadata in my yaml headers, so I want to show them and present them in an appealing way.
Next biggy might be Matomo implementation, yet it might take some time, because project requests start to fly in, so I guess all of this starts working in a way ;)
At this point, what really got me a huge push forward in this was setting up NVIM as my proper IDE for, well, everything. Among other great tutorials there is an outstanding one for setting up NVIM on the YoutTube channel of @typecraft_dev, that I would like to recommend anybody, who wants to be a super-cool neckbeard or just doesn't get the tickles using VSCode.
Check it out: Neovim for Newbs
Stay curious, nerds!
Added features
- Markdown formatting using markdown
- Reading of metadata using frontmatter
- Sanitizing HTML using bleach
Next steps
- [ ] Implementing data validation using BaseModel from Pydantic
- [ ] Enhance error handling
- [ ] Making 'tags' metadata data type consistent (str -> list)
- [ ] Content structuring and pagination
- [ ] Writing a well usable backend interface to add content
I managed to reorganize some of my backbone structure which should make it more scaleable as content grows. I recognized some problems regarding responsibility on smaller displays as well but have not found any satisfying solution just yet.
I am trying to implemet markdown parsing on my posts, providing a broader range of possibilities to design larger texts and more ellaborated journals with the aim of delivering information better.
Finally, I managed to break the website down into small pieces and implement them to my website using mainly the python libraries FastAPI and Jinja2. With this, another optical makeover is coming. Yet, I am almost sure, that this will change a couple of times. Good thing is, that the more modularized the project gets, the easier it gets to customize on a global level. This saves time, and since time equals money, this saves money ;) Greets!
Here some text for some new layout. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Here some text for some new layout. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Here some text for some new layout. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
Finally! Another break through - at least for my narrow horizon. My domains received ssl certificates via let's encrypt using dehydrated and I pretty much love the fact as it is. Also, I managed to create some webpages using bootstrap and also wordpress. Still looking for a way to implement a posting system though and I don't want to go for a solution using PHP. Maybe it is finally time to get handy with fastapi or rocket or both. Bootstrap makes it really easy to create a well organized, well designed frontend, now it is time to give it some life!
Finally, a bit of time to progress some stuff. Meanwhile, I started working with the bootstrap framework and templates for it and it is really fun. If things go on this well, I can start building a small portfolio with actual usecase. For now, it is not much and I still have a lot to learn but hey, you've got to celebrate small steps as well. Stay well!
My original intention was to create one user per TLD, thus subdirectories of this users root directory are created to serve different services, e.g. a jitsi server (jitsi.domain.tld), a jekyll blog (jekyll.domain.tld), a nextcloud solution (nextcloud.domain.tld), a fastapi webapp (fastapi.domain.tld), you get the idea. Seems like this is not possible with jekyll and the approach is more that I will have to collect all the domains under the service of jekyll, e.g. /srv/jekyll/{domain1.tld, domain2.tld, domain3.tld} and so on and so forth, am I correct here? It does seem that I am able to start jekyll within the target users directory, but an error pops up as soon as jekyll tries to write files (only allowed for owner of the directory). Let's see if there is a way to doodle around this error, but in case it is not possible (without giving up reasonable directory permissions), I can live with the jekyll-as-a-user solution as well.
Running into first problems. I want to keep the installation as tidy as possible, which is not the easiest task with the narrow knowledge that I have. I installed ruby with RVM in my sudo-user's $HOME directory. With this, I do not own the right permissions to start jekyll within the project directories (/var/www/TLD).
Finally! Almost a year has passed since I have worked on this project. Now, the migration to the new v-server () seems to have worked out. Next stop SSL certificates, I guess. Note to myself: this is the point, where I put my last project to sleep.
Started noticing this project again. Funny how easy it is to come up with small ideas and lose interest at first steps. Purpose seems to be an essential need for drive. Then again it has something magical to write one's articles directly into a html file. Kind of gives the feeling one would have proceeded to develop special skills. It's great!
So, I managed to mess something up beyond my understanding. More or less out of nowhere problems with ssl certificates came up and I had to start from scratch because I really did not know where to start. So, dehydrated freshly installed, fixed some stuff there, tweaked around in the nginx config files and so on, so forth. Right now the site is reachable via http without any problems, as far as I can see and I had some time to do some reading in the meantime. Therefore, I guess putting this status updates into a database and installing a mail service are the next milestones to go for, if anything else is fixed.
As far as I am understanding correctly, one should be able to cut down a simple setup into seperate pieces which can be automatically put together with Python. Playing around with fastapi and found a great tutorial: Check it out!
Simple HTML/CSS is in progress. Welcome Splash removed again. To Do: Tutorials until now, Categories, Python Template
Welcome Splash added.
Archive