From ffcf8da8d03b8500c6afc4f3770ef42c0ed533c1 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 6 Apr 2024 12:31:46 +0530 Subject: [PATCH] Decap: use TOML frontmatter consistently --- .../index.md | 22 ++++++++---------- .../index.md | 23 +++++++------------ .../posts/using-containers-in-nixos/index.md | 14 +++++------ .../index.md | 14 +++++------ static/admin/config.yml | 6 ++++- 5 files changed, 34 insertions(+), 45 deletions(-) diff --git a/content/posts/improving-dependency-sync-speeds-for-your-gradle-project/index.md b/content/posts/improving-dependency-sync-speeds-for-your-gradle-project/index.md index 4dedade..df3850d 100644 --- a/content/posts/improving-dependency-sync-speeds-for-your-gradle-project/index.md +++ b/content/posts/improving-dependency-sync-speeds-for-your-gradle-project/index.md @@ -1,16 +1,12 @@ ---- -title: Improving dependency sync speeds for your Gradle project -date: 2024-03-30T21:43:07.031Z -summary: Waiting for Gradle to download dependencies is so 2023. -socialImage: "uploads/gradle-social.webp" -categories: - - gradle -tags: - - gradle - - kotlin-multiplatform - - perf ---- - ++++ +title = "Improving dependency sync speeds for your Gradle project" +date = "2024-03-30T21:43:07.031Z" +summary = "Waiting for Gradle to download dependencies is so 2023" +socialImage = "uploads/gradle-social.webp" +categories = ["gradle"] +tags = ["gradle", "kotlin-multiplatform", "perf"] +draft = false ++++ Android developers are intimately familiar with the ritual of staring at your IDE for tens of minutes while Gradle imports a new project before they can start working on it. While not fully avoidable, there are many ways to improve the situation. For small to medium projects, the time spent on this import phase can be largely dominated by dependency downloads. ## Preface diff --git a/content/posts/tips-and-tricks-for-using-renovate/index.md b/content/posts/tips-and-tricks-for-using-renovate/index.md index 8d91f27..a23555c 100644 --- a/content/posts/tips-and-tricks-for-using-renovate/index.md +++ b/content/posts/tips-and-tricks-for-using-renovate/index.md @@ -1,18 +1,11 @@ ---- -categories: - - automation -date: 2023-01-17T19:32:18.074Z -summary: Renovate is an extremely powerful tool for keeping your dependencies - up-to-date, and its flexibility is often left unexplored. I'm hoping to change - that. -draft: false -slug: tips-and-tricks-for-using-renovate -tags: - - dependency-management - - renovate -title: Tips and tricks for using Renovate ---- - ++++ +title = "Tips and tricks for using Renovate" +date = "2023-01-17T19:32:18.074Z" +summary = "Renovate is an extremely powerful tool for keeping your dependencies up-to-date, and its flexibility is often left unexplored. I'm hoping to change that" +categories = ["automation"] +tags = ["dependency-management", "renovate"] +draft = false ++++ [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/) is a free to use dependency update management service powered by the open-source [renovate](https://github.com/renovatebot/renovate), and is a compelling alternative to GitHub's blessed solution for this problem space: [Dependabot](https://docs.github.com/en/code-security/dependabot). Renovate offers a significantly larger suite of supported language ecosystems compared to Dependabot as well as fine-grained control over where it finds dependencies, how it chooses updated versions, and a lot more. TL;DR: Renovate is a massive upgrade over Dependabot and you should evaluate it if _any_ aspect of Dependabot has caused you grief, there's a good chance Renovate does it better. I'm collecting some tips here about "fancy" things I've done using Renovate that may be helpful to other folks. You'll be able to find more details about all of these in their very high quality docs at [docs.renovatebot.com](https://docs.renovatebot.com/). diff --git a/content/posts/using-containers-in-nixos/index.md b/content/posts/using-containers-in-nixos/index.md index c333c4f..7860e50 100644 --- a/content/posts/using-containers-in-nixos/index.md +++ b/content/posts/using-containers-in-nixos/index.md @@ -1,11 +1,9 @@ ---- -title: Using containers in NixOS -date: 2023-12-08T11:27:39.010Z -summary: NixOS allows running arbitrary Docker containers declaratively, these - are some of my notes on my usage of this functionality. -draft: true ---- - ++++ +title = "Using containers in NixOS" +date = "2023-12-08T11:27:39.010Z" +summary = "NixOS allows running arbitrary Docker containers declaratively, these are some of my notes on my usage of this functionality." +draft = true ++++ NixOS comes with the ability to [declaratively manage docker containers](https://nixos.wiki/wiki/NixOS_Containers#Declarative_docker_containers), which functions as a nice escape hatch when something you want to run doesn't have a native Nix package or is not easy to run within NixOS. All the available configuration options can be found [here](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=alpha_desc&query=virtualisation.oci-containers.containers), so rather than explain all of it I'll just walk through my own experience of getting a container up for [Linkding](https://github.com/sissbruecker/linkding). diff --git a/content/posts/using-retrofit-to-disguise-scraping-as-a-rest-api/index.md b/content/posts/using-retrofit-to-disguise-scraping-as-a-rest-api/index.md index 87f3a99..e8de4ad 100644 --- a/content/posts/using-retrofit-to-disguise-scraping-as-a-rest-api/index.md +++ b/content/posts/using-retrofit-to-disguise-scraping-as-a-rest-api/index.md @@ -1,11 +1,9 @@ ---- -title: Using Retrofit to disguise scraping as a REST API -date: 2023-09-13T07:08:10.659Z -summary: We've all used Retrofit to interact with REST APIs for as long as we - can remember, but what if there was no API? -draft: true ---- - ++++ +title = "Using Retrofit to disguise scraping as a REST API" +date = "2023-09-13T07:08:10.659Z" +summary = "We've all used Retrofit to interact with REST APIs for as long as we can remember, but what if there was no API?" +draft = true ++++ Square's Retrofit is best known for being the gold standard of REST clients in the JVM/Android ecosystem, but it's excellent API design also lends itself to great extensibility which we will leverage today. While trying to implement post search functionality in [Claw](https://msfjarvis.dev/g/compose-lobsters), my [lobste.rs](https://lobste.rs) client I stumbled into a _tiny_ problem: there was no API! lobste.rs has a [web-based search](https://lobste.rs/search) but no equivalent mechanism via the JSON API I was using for doing everything else within the app. diff --git a/static/admin/config.yml b/static/admin/config.yml index 6693caa..d175bd0 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -12,9 +12,13 @@ collections: slug: '{{slug}}' editor: preview: false + format: toml-frontmatter fields: - { label: 'Title', name: 'title', widget: 'string' } - { label: 'Publish Date', name: 'date', widget: 'datetime', picker_utc: true } - { label: 'Description', name: 'summary', widget: 'string' } - - { label: 'Draft', name: 'draft', widget: 'boolean' } + - { label: 'Categories', name: 'categories', widget: 'list' } + - { label: 'Tags', name: 'tags', widget: 'list' } + - { label: 'Social image', name: 'socialImage', widget: 'image' } + - { label: 'Draft', name: 'draft', widget: 'boolean', required: false } - { label: 'Body', name: 'body', widget: 'markdown' }