Managing a Quarto blog just got easier. Today, I’m excited to introduce {quartize}
, a Visual Studio Code extension that simplifies the process of creating and organizing blog posts for Quarto-based websites. Taking inspiration from the popular {blogdown}
R package’s new_post()
function in R, {quartize}
brings similar conveniences to VS Code users.
Background
This extension came about as a result of my recent migration to Quarto for my personal blog. After years of using various static site generators (Hugo and Jekyll) and more dynamic frameworks (CodeIgniter and WordPress), I made the switch to Quarto and immediately missed some of the workflow conveniences I’d grown use to. Having used R’s blogdown::new_post()
back in the olden days, I wanted something similar but native to my current VS Code environment. Rather than switching contexts between editors just to create a new post, I built {quartize}
to streamline the process directly within VS Code.
As my first VS Code extension, {quartize}
represents not just a tool but also my journey into VS Code extension development. I’ve learned a lot about the VS Code extension API, TypeScript, and the intricacies of integrating it all. There’s still much to learn, but I’m excited to share this project with the Quarto community and see how it evolves. Moreover, I’m particularly excited about testing {quartize}
’s compatibility with Posit’s upcoming Positron IDE, which is based on the open-source version of VS Code (“Code - OSS”). This potential compatibility could provide a seamless experience for users transitioning between different Code IDEs in the Quarto ecosystem.
Why Quartize?
If you’re using Quarto for blogging, you know the drill: create a new directory, set up the frontmatter, organize your images, and maintain a consistent structure. {quartize}
handles all of this automatically, letting you focus on what matters most – writing great content.
The extension is designed to be a lightweight, user-friendly tool that streamlines the process of creating new posts, making it easier to maintain a consistent structure across your blog. Specifically, {quartize}
offers the following key features:
- Post Creation: Create new posts directly from VS Code’s command palette or through a user-friendly form interface
- Smart Defaults: Automatically generates slugs, dates, and directory structures
- Image Selection: Built-in image selection and alt text handling
- Category Support: Manage and reuse categories with autocomplete suggestions
- Theme Integration: Seamlessly matches your VS Code theme
Getting Started
- Install Quartize from the VS Code marketplace or Open VSX Registry
- Open your Quarto blog project
- Press
Ctrl+Shift+P
(orCmd+Shift+P
on macOS) - Type “Quartize: New Blog Post”
- Select either
(Palette)
to proceed in the command palette; or, (Open Plugin)
to create a new post using a web form interface similar to an RStudio plugin.
- Select either
Answer the prompts and your new post is ready for content.
Configuration
Customize Quartize for your workflow by adding common authors and categories to your VS Code settings:
{
"quartize.authors": ["Your Name"],
"quartize.categories": ["tech", "data-science"],
"quartize.defaultAuthor": "Your Name"
}
[!TIP] You can access the
settings.json
file by pressingCtrl+,
(Windows/Linux) orCmd+,
(macOS) to open the Settings view, then clicking the “Edit in settings.json” link.Or you can open the file directly by going to
File > Preferences > Settings
(Windows/Linux) orCode > Preferences > Settings
(macOS) and clicking the “Open Settings (JSON)” button.
Setting | Type | Description |
---|---|---|
quartize.authors |
array | List of predefined authors |
quartize.categories |
array | List of predefined categories |
quartize.defaultAuthor |
string | Default author for new posts |
Fin
In summary, {quartize}
is a lightweight, user-friendly extension that simplifies the process of creating blog posts for Quarto-based websites. Feel free to check it out, provide feedback, or contribute to its development.