diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8c6548f7..14ea4ad6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Change Log
+## [2.5.0] - 2020-08-16
+
+- Moved the center layout button the the other actions section
+- [#60](https://github.com/estruyf/vscode-front-matter/issues/60): Added the ability to open a site preview in VS Code
+
## [2.4.1] - 2020-08-16
- Better editor highlighting functionality
diff --git a/README.md b/README.md
index 6e7e87c6..4478038d 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
@@ -30,6 +30,10 @@ The extension will automatically verify if your title and description are SEO co
In version v2.0.0 we released the newly redesigned sidebar panel with improved SEO support. This extension makes it the only extension to manage your Markdown pages for your static sites in Visual Studio Code.
+
+
+
+
Table of Contents
@@ -37,7 +41,8 @@ In version v2.0.0 we released the newly redesigned sidebar panel with improved S
@@ -75,7 +80,7 @@ To leverage most of the capabilities of the extension. SEO information and every
When you open the panel and the current file is not a Markdown file, it will contain the following sections:
-
+
> **Info**: both **Global Settings** and **Other Actions** sections are shown for the base view as when a Markdown file is openend.
@@ -85,7 +90,7 @@ When you open the Front Matter panel on a Markdown file, you get to see the foll
**Global Settings**
-
+
**SEO Status**
@@ -97,9 +102,11 @@ When you open the Front Matter panel on a Markdown file, you get to see the foll
**Actions**
-
+
+> **Info**: To gain the `open preview` button to show up, you will need to first set the `local preview URL`. You can do this within the `Global Settings` section or by updating the `frontMatter.preview.host` setting.
+
**Metadata: Keywords, Tags, Categories**
@@ -111,11 +118,23 @@ When you open the Front Matter panel on a Markdown file, you get to see the foll
**Other actions**
-
+
**Info**: The `Enable write settings` action allow you to make Markdown specific changes to optimize the writing of your articles. It will change settings like the `fontSize`, `lineHeight`, `wordWrap`, `lineNumbers` and more.
+## Site preview
+
+The Markdown preview is not consistently delivering the same result as the one you will see on your site. The Front Matter extension provides you a way to show the site result. For this, you will first have to set the `frontMatter.preview.host` setting. You can perform it from the `Global Settings` section in the panel or in your `settings.json` file to set the setting.
+
+For example, with Hugo, the local server spins up on `http://localhost:1313`. When you set this URL as the value of the `frontMatter.preview.host` setting. You can click on the `open preview` button and the site preview will be shown.
+
+
+
+
+
+> **Important**: Be sure to spin up your local server. This is an action the extension currently doesn't do for you. If you want, you create yourself a custom action in order to start it.
+
## Custom actions
Since version `1.15.0`, the extension allows you to create your own custom actions, by running Node.js scripts from your project. In order to use this functionality, you will need to configure the [`frontMatter.custom.scripts`](#frontmattercustomscripts) setting for your project.
@@ -241,6 +260,10 @@ You can also specify a prefix and suffix, which can be added to the slug if you
> **Info**: At the moment, the extension only supports English stopwords.
+**Front Matter: Preview article**
+
+Opens the site preview for the current article. More information about it can be found in the [site preview](#site-preview) section.
+
### Usage
- Start by opening the command prompt:
@@ -404,12 +427,34 @@ Specify if you want to highlight the Front Matter in the Markdown file. Default:
}
```
+### `frontMatter.preview.host`
+
+Specify the host URL (example: http://localhost:1313) to be used when opening the preview.
+
+```json
+{
+ "frontMatter.preview.host": ""
+}
+```
+
+### `frontMatter.preview.pathName`
+
+Specify the path you want to add after the host and before your slug. This can be used for instance to include the year/month like: `yyyy/MM` (if not set via the slug). The date will be generated based on the article its date field value.
+
+```json
+{
+ "frontMatter.preview.pathName": ""
+}
+```
+
+> **Important**: As the value will be formatted with the article's date, it will try to convert all characters you enter. In case you wan to skip some characters or all of them, you need to wrap that part between two single quotes. Example: `"'blog/'yyyy/MM"` will result in: `blog/2021/08`.
+
## Feedback / issues / ideas
Please submit them via creating an issue in the project repository: [issue list](https://github.com/estruyf/vscode-front-matter/issues).