I have a working version of these scripts, still have to fine tune some details, but for my use case is enough.
Also I still have to give some love to the documentation. I’m having problems with the use of subshells, so I will try to solve the issues I’m having without using subshells.
Then again yesterday I started to write some scripts to deploy my astro static sites locally or in my home server, which doesn’t have a public static ip.
The scripts are in this [ repo ]
I am still working on it, so it is not actually working right now. I’m hoping I can finish it by the end of the day, if I got time to get some programming done today.
In the end I did have some time to do some programming but not much so instead I just added the little arrow to the site, to go back to the top.
Tags:
[astro]Today I wanted to work a little on my site, so I decided to clean up the news section. Adding a new dependency for generating an excerpt of the news and moving the content to a dialog.
Also using named slots to clean the Layout from the dialog contents. I have to repeat this for the other sections in the index page.
Today I started with the pagination, which basically requires load all the entries, sorted them, reverse them and sliced them in chunks of 10 entries.
While doing that I found out that… well actually I was reminded that javascript doesn’t behave well with numbers. Even with javascript it didn’t want to work.
Also added a snippet to VS Code to add these entries quicker.
Tags:
[astro]It seems kind of obvious but there is no hint in the Astro documentation for
rendering various pieces of content in the same page, you can only use the
<Content>
component once per component.
Then it hit me, I can achieve that by creating a component, passing the entry from the page and rendering the entry to the render method of astro:content.
Maybe I can write a blog post about it.