mirror of
https://github.com/estruyf/vscode-front-matter.git
synced 2026-08-06 17:02:54 +02:00
Beta doc updates
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Extension } from '../../constants/extension';
|
||||
import { isProduction } from '../../helpers/isProduction';
|
||||
|
||||
export interface ICTAProps {}
|
||||
|
||||
@@ -23,8 +24,8 @@ export const CTA: React.FunctionComponent<ICTAProps> = (props: React.PropsWithCh
|
||||
|
||||
<div className="mt-10 max-w-sm mx-auto sm:max-w-none">
|
||||
<div className="space-y-4 sm:space-y-0 sm:mx-auto sm:inline-grid sm:grid-cols-2 sm:gap-5">
|
||||
<a href={Extension.installLink} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8" rel={`noopener noreferrer`}>
|
||||
{strings(`cta_button_primary`)}
|
||||
<a href={isProduction ? Extension.installLink : Extension.installBetaLink} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-white bg-teal-500 hover:bg-opacity-70 sm:px-8" rel={`noopener noreferrer`}>
|
||||
{isProduction ? strings(`cta_button_primary`) : strings(`cta_button_beta_primary`)}
|
||||
</a>
|
||||
<a href={`/docs`} title={`Read our documentation`} className="flex items-center justify-center px-4 py-3 border border-transparent text-base font-medium shadow-sm text-vulcan-500 bg-whisper-500 hover:bg-opacity-70 sm:px-8">
|
||||
{strings(`cta_button_secondary`)}
|
||||
|
||||
@@ -7,8 +7,10 @@ export const Extension = {
|
||||
issueLink: "https://github.com/estruyf/vscode-front-matter/issues",
|
||||
sponsorLink: "https://github.com/sponsors/estruyf",
|
||||
extensionLink: "https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter",
|
||||
extensionBetaLink: "https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta",
|
||||
reviewLink: "https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter&ssr=false#review-details",
|
||||
installLink: "vscode:extension/eliostruyf.vscode-front-matter",
|
||||
installBetaLink: "vscode:extension/eliostruyf.vscode-front-matter-beta",
|
||||
showcaseLink: "https://github.com/estruyf/vscode-front-matter/issues/new?assignees=&labels=&template=showcase.md&title=Showcase%3A+",
|
||||
featureLink: "https://github.com/estruyf/vscode-front-matter/issues/new?assignees=&labels=&template=feature_request.md&title=Enhancement%3A+"
|
||||
}
|
||||
@@ -11,12 +11,22 @@ weight: 2
|
||||
|
||||
To get you started, you first need to install the extension in Visual Studio Code.
|
||||
|
||||
## Installation
|
||||
|
||||
You can get the extension via:
|
||||
|
||||
- The VS Code marketplace: [VS Code Marketplace - Front Matter](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter).
|
||||
- The extension CLI: `ext install eliostruyf.vscode-front-matter`
|
||||
- Or by clicking on the following link: <a href="" title="open extension in VS Code" data-vscode="vscode:extension/eliostruyf.vscode-front-matter">open extension in VS Code</a>
|
||||
|
||||
### Beta version
|
||||
|
||||
If you have the courage to test out the beta features, we made available a beta version as well. You can install this via:
|
||||
|
||||
- The VS Code marketplace: [VS Code Marketplace - Front Matter BETA](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta).
|
||||
- The extension CLI: `ext install eliostruyf.vscode-front-matter-beta`
|
||||
- Or by clicking on the following link: <a href="" title="open extension in VS Code" data-vscode="vscode:extension/eliostruyf.vscode-front-matter-beta">open extension in VS Code</a>
|
||||
|
||||
## Welcome screen
|
||||
|
||||
Once installed, Front Matter will open the **welcome screen** the first time Visual Studio Code gets reloaded.
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
|
||||
|
||||
export const isProduction = process.env.NODE_ENV === 'production';
|
||||
@@ -7,6 +7,7 @@ export const strings = {
|
||||
cta_title_sr: " that helps managing your static sites and Markdown based sites. Supports Hugo, Jekyll, Docusaurus, NextJs, Gatsby, and more.",
|
||||
cta_description: "Why leave your editor if it can give you all power to manage your static sites? Front Matter is a headless CMS that lets you create, edit, and preview your Markdown based content straight within Visual Studio Code.",
|
||||
cta_button_primary: "Get the extension",
|
||||
cta_button_beta_primary: "Get the BETA extension",
|
||||
cta_button_secondary: "Read our docs",
|
||||
|
||||
// Generators
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
const extensionName = "frontMatter";
|
||||
|
||||
export const EXTENSION_ID = 'eliostruyf.vscode-front-matter';
|
||||
export const EXTENSION_BETA_ID = 'eliostruyf.vscode-front-matter-beta';
|
||||
|
||||
export const EXTENSION_STATE_VERSION = 'frontMatter:Version';
|
||||
export const EXTENSION_STATE_PAGES_VIEW = 'frontMatter:Pages:ViewType';
|
||||
|
||||
+15
-2
@@ -5,12 +5,14 @@ import { Folders } from './commands/Folders';
|
||||
import { Preview } from './commands/Preview';
|
||||
import { Project } from './commands/Project';
|
||||
import { Template } from './commands/Template';
|
||||
import { COMMAND_NAME } from './constants/Extension';
|
||||
import { COMMAND_NAME, EXTENSION_BETA_ID, EXTENSION_ID } from './constants/Extension';
|
||||
import { TaxonomyType } from './models';
|
||||
import { MarkdownFoldingProvider } from './providers/MarkdownFoldingProvider';
|
||||
import { TagType } from './viewpanel/TagType';
|
||||
import { ExplorerView } from './webview/ExplorerView';
|
||||
import { Extension } from './helpers/Extension';
|
||||
import { basename } from 'path';
|
||||
import { Notifications } from './helpers/Notifications';
|
||||
|
||||
let frontMatterStatusBar: vscode.StatusBarItem;
|
||||
let statusDebouncer: { (fnc: any, time: number): void; };
|
||||
@@ -19,7 +21,18 @@ let collection: vscode.DiagnosticCollection;
|
||||
|
||||
const mdSelector: vscode.DocumentSelector = { language: 'markdown', scheme: 'file' };
|
||||
|
||||
export async function activate({ subscriptions, extensionUri, extensionPath, globalState }: vscode.ExtensionContext) {
|
||||
export async function activate({ subscriptions, extensionUri, extensionPath, globalState, globalStorageUri }: vscode.ExtensionContext) {
|
||||
|
||||
// Check if Front Matter is extension is installed
|
||||
if (basename(globalStorageUri.fsPath) === EXTENSION_BETA_ID) {
|
||||
const mainVersion = vscode.extensions.getExtension(EXTENSION_ID);
|
||||
|
||||
if (!mainVersion) {
|
||||
Notifications.error(`Front Matter BETA cannot be used while the main version is installed. Please ensure that you have only over version installed.`);
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
const extension = Extension.getInstance(globalState, extensionUri);
|
||||
extension.migrateSettings()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user