Skip to content

Commit

Permalink
Initial build of the Blog post view
Browse files Browse the repository at this point in the history
  • Loading branch information
coatless committed Oct 28, 2024
1 parent e1569d4 commit 6d8672c
Show file tree
Hide file tree
Showing 22 changed files with 4,727 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/publish-extensions-to-marketplace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# config(GH Action): https://github.com/marketplace/actions/publish-vs-code-extension
# Using default config with secrets set in the repository settings
on:
push:
tags:
- "*"

name: Deploy Extension
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- name: Publish to Open VSX Registry
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.OPEN_VSX_TOKEN }}
- name: Publish to Visual Studio Marketplace
uses: HaaLeo/publish-vscode-extension@v1
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: https://marketplace.visualstudio.com
45 changes: 45 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Dependencies
node_modules/
npm-debug.log
yarn-debug.log
yarn-error.log
yarn.lock

# VS Code Extension Specific
out/
dist/
*.vsix

# Development Environment
.vscode-test/
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# TypeScript
*.js
*.js.map
!webpack.config.js

# Test Coverage
coverage/

# Operating System
.DS_Store
Thumbs.db

# Temporary files
*.log
*.tmp
*~

# Environment Variables
.env
.env.local
.env.*.local

# Build output
build/
*.tgz
5 changes: 5 additions & 0 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
});
11 changes: 11 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog

## [Unreleased]

### Features

- Quartize brings the ability to create new blog posts directly in the command palette or through a webpage interface.
- Open the command palette by pressing `Ctrl`+`Shift`+`P` (Windows/Linux) or `Cmd`+`Shift`+`P` (macOS) and searching for "Quartize: New Blog Post (Palette)" to create a new post with minimal input.
- Alternatively, open the command palette and search for "Quartize: New Blog Post (Open Plugin)" to fill out a form with more detailed information.

### Dependencies


[unreleased]: https://github.com/coatless-vsx/quartize/compare/e1569d4dcd791b34c7fdfb9a1a48338fc0610049...HEAD
31 changes: 31 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Copyright (c) 2024 HJJB, LLC
All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software, subject to the following conditions:

1. The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

2. The Software may be distributed in both source code and binary forms, but
may not be modified, adapted, or altered without explicit written permission
from the copyright holder.

3. The Software may not be used for commercial purposes without explicit
written permission from the copyright holder.

4. Redistributions of the Software must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
95 changes: 94 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,95 @@
# quartize
VS Code & Positron Extension for Quarto Content

Quartize is a Visual Studio Code extension that streamlines the process of creating blog posts for Quarto-based websites.
It provides an intuitive interface for generating new blog posts with proper frontmatter, directory structure, and basic templates.

- 🎨 Two ways to create posts:
- Quick create through Command Palette
- Web View interface
- 🏷️ Category and author management
- 📸 Featured image support
- 🎯 SEO-friendly slug generation
- 🎨 Integrated with VS Code themes

## Installation

- Open VS Code.
- Go to the Extensions view (`Ctrl`+`Shift`+`X` or `Cmd`+`Shift`+`X`)
- Search for "Quartize"
- Click Install

### Requirements

- Visual Studio Code 1.94.0 or higher
- A Quarto blog project
- Quarto CLI installed

## Usage

The extension provides two main features: quick create and viewer interface.
You can use the quick create feature to create a new post with minimal input, or use the viewer interface to fill out a form with more detailed information.

### Quick Create (Command Palette)

1. Press `Ctrl`+`Shift`+`P` (Windows/Linux) or `Cmd`+`Shift`+`P` (macOS)
1. Search for "Quartize: New Blog Post (Palette)"
1. Follow the prompts to enter:
- Post title
- Description
- Categories

Voilà! Your new post is created with the proper frontmatter and directory structure.

### Viewer Interface

1. Press `Ctrl+Shift+P` (Windows/Linux) or `Cmd+Shift+P` (macOS)
1. Search for "Quartize: New Blog Post (Open Plugin)"
1. Fill out the form with:
- Title
- Date
- Author
- Categories
- Description
- Featured image
- Image alt text
1. Click "Create Post"

## Configuration

You can configure the extension by setting the following options in your `settings.json` file:

| 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 |

> [!TIP]
> You can access the `settings.json` file by pressing `Ctrl+,` (Windows/Linux) or `Cmd+,` (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) or `Code > Preferences > Settings` (macOS) and clicking the "Open Settings (JSON)" button.
For example, to set up authors, categories, and a default author, add the following to your `settings.json` file:

```json
{
"quartize.authors": [
"John Doe",
"Jane Smith"
],
"quartize.categories": [
"tech",
"programming",
"data-science"
],
"quartize.defaultAuthor": "John Doe"
}
```

## License

Copyright (c) 2024 HJJB, LLC. All rights reserved.

This software is provided under a custom license that allows usage but prohibits modification.
See the LICENSE file for full terms and conditions.
28 changes: 28 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";

export default [{
files: ["**/*.ts"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
parser: tsParser,
ecmaVersion: 2022,
sourceType: "module",
},

rules: {
"@typescript-eslint/naming-convention": ["warn", {
selector: "import",
format: ["camelCase", "PascalCase"],
}],

curly: "warn",
eqeqeq: "warn",
"no-throw-literal": "warn",
semi: "warn",
},
}];
Loading

0 comments on commit 6d8672c

Please sign in to comment.