Skip to content

Commit

Permalink
Merge pull request #121 from schultyy/title-could-be-in-frontmatter
Browse files Browse the repository at this point in the history
Title could be in frontmatter
  • Loading branch information
schultyy authored Jun 5, 2021
2 parents 6052ffa + eaa22fc commit 6f29ea8
Show file tree
Hide file tree
Showing 12 changed files with 449 additions and 338 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 2.0.0

- Allows for the Blogpost's title to be configured in either the first-level headline or the frontmatter (field is configurable)
- Breaking change: Changes configuration field names to be more specific to accommodate for new title field.

## 1.8.2

- Fixes an issue where analysis would silently fail if `Keywords:` within Frontmatter was empty.
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"type": "git",
"url": "https://github.com/schultyy/better-seo"
},
"version": "1.8.2",
"version": "2.0.0",
"icon": "resources/better_seo.png",
"engines": {
"vscode": "^1.56.0"
Expand Down Expand Up @@ -42,15 +42,21 @@
"properties": {
"betterseo.frontmatter.titleAttribute": {
"type": "string",
"default": "seo_title",
"default": "title",
"pattern": "[\\w_\\d\\w]+",
"description": "Specifies the title attribute to look for in the blog post frontmatter"
},
"betterseo.frontmatter.seoTitleAttribute": {
"type": "string",
"default": "seo_title",
"pattern": "[\\w_\\d\\w]+",
"description": "Specifies the SEO title attribute to look for in the blog post frontmatter"
},
"betterseo.frontmatter.descriptionAttribute": {
"betterseo.frontmatter.seoDescriptionAttribute": {
"type": "string",
"default": "seo_description",
"pattern": "[\\w_\\d\\w]+",
"description": "Specifies the description attribute to look for in the blog post frontmatter"
"description": "Specifies the SEO description attribute to look for in the blog post frontmatter"
}
}
},
Expand Down
314 changes: 0 additions & 314 deletions src/analyzer.ts

This file was deleted.

18 changes: 18 additions & 0 deletions src/analyzer/ast.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
export interface Position {
line: number;
column: number;
}

export interface Location {
start: Position;
end: Position;
}

export interface AstChild {
type: string;
value: string;
raw: string;
depth?: number;
loc: Location;
children?: Array<AstChild>;
}
Loading

0 comments on commit 6f29ea8

Please sign in to comment.