Giter Club home page Giter Club logo

vscode-docs-authoring's Introduction

Microsoft Learn Authoring Pack for VS Code - Feedback

To submit feedback on the Microsoft Learn Authoring Pack, create an issue in this repository. Please don't share sensitive or personal information. We're not accepting outside contributions, but will review issues regularly to continue improving the existing extensions.

The authoring pack includes the following extensions:

  • Learn Markdown, which provides Markdown authoring assistance, including support for inserting custom Markdown syntax specific to learn.microsoft.com. The rest of this readme provides details on the Learn Markdown extension.
  • Learn Preview, which uses the learn.microsoft.com CSS for more accurate Markdown preview, including custom Markdown.
  • Learn YAML, which validates Learn .yml files against the appropriate YAML schemas.
  • Learn Article Templates, which allows users to apply Markdown skeleton content to new files.
  • Learn Scaffolding, which automatically generates Learn modules based on standard patterns and automates renaming, inserting, deleting, and reordering units.
  • Learn Images, which compresses and resizes images.
  • markdownlint, a popular linter by David Anson.

License

MIT

vscode-docs-authoring's People

Contributors

928pjy avatar adamdmsft avatar adkinn avatar adunndevster avatar bharney avatar bharney0 avatar briank237 avatar bryce-turner avatar dependabot[bot] avatar duncanma avatar gewarren avatar ievangelist avatar its-just-nans avatar jamarw avatar jeahyoun avatar johnpapa avatar johnthefarmer avatar lamebrain avatar mamccrea avatar meganbradley avatar mevansgh1 avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar nschonni avatar patridge avatar qinezh avatar robinarh avatar rsknutson avatar scottaddie avatar susannewindfeldpedersen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-docs-authoring's Issues

Rewrite redirection urls in markdown files to new links at same time as redirect.json

This may just be a small extension to #34 πŸ˜‰
The description of the problem is MicrosoftDocs/feedback#361, but to summarize, the redirect.json is great for published site (and I think now VS Code with your enhancement), but GitHub links have no concept of the redirect.
If at the same time as adding the redirect entry in the file, the existing usages of the redirect could be updated, then all versions would be happy.
This would also make #30 possible without a custom solution πŸ˜„

Consecutive Alert blocks trigger MD028 error

https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md028---blank-line-inside-blockquote
When 2 Alert style blocks are used next to each other, the MD028 rule gets triggered.
EX:

> [!NOTE]
> My first note

> [!TIP]
> My second note

Not sure if this is more something for the "feedback" repo, but should this be flagged, or should authors be joining the NOTE/TIP together? Or will the processing allow for the space to be joined with a > and the authoring pack take that into account when inserting from the menu

Docs: Preview menu item not working after 0.1.2 release

Both Windows and OSX, selecting Docs:Preview stopped working around a week ago.
Alternate "Markdown: Preview" still works, so it seem related to the latest release.
Could also be related to the VS Code 1.33.0/1 release

Authoring pack embedding broken link

Issue Type: Bug

i tried to add a bookmark, and this is what it added lol
[Migrate an on-premises database to an Azure VM](../../../../../../../Program Files/Git/azure-docs-pr/articles/virtual-machines/windows/sql/virtual-machines-windows-migrate-sql.md).

Extension version: 0.1.2
VS Code version: Code 1.32.3 (a3db5be9b5c6ba46bb7555ec5d60178ecc2eaae4, 2019-03-14T23:43:35.476Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-1620 v4 @ 3.50GHz (8 x 3492)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
surface_synchronization: enabled_on
video_decode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.90GB (16.79GB free)
Process Argv .
Screen Reader no
VM 0%

Add Cleanup options as an "On Save" option

#148 is adding some interesting file cleanup options to the pack.
Since not all repos like old documentation being updated, it would be nice to have it as an "on save" option so that newer/edited documents can be cleaned up as they are edited.

//cc @bharney-msft

AB#239490

Enable preview for reference docs

We use the xref syntax to link in reference docs. For example: xref:Microsoft.Xrm.Sdk.Metadata.EntityMetadata.IsOneNoteIntegrationEnabled
In the preview, there is nothing but white space where this is used.
Would be fine if the preview included just the raw text as a short term solution. It would be better than white space.
Long term, of course it would be best to display the links as they will appear in the docs.

Switch back to Markdig

Fixing the issues that preview service is good, but it might be better to stick with Markdig instead of Markdown-It since that is what the publishing platform uses (right now AFAIK)

[Markdocs Server Error]: Error: not found: package: 'Newtonsoft.Json'

I am getting the following error when I load VS Code.

[Markdocs Server Error]: Error: An assembly specified in the application dependencies manifest (MarkdocsService.deps.json) was not found: package: 'Newtonsoft.Json', version: '10.0.3' path: 'lib/netstandard1.3/Newtonsoft.Json.dll'

I am running the following version of VS Code:

Version: 1.28.2 (system setup)
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

I have the following versions for the Docs Authoring Pack:

Docs-Articles-Templates extension breaks VSCode http requests

πŸ‘‹

We just stumbled onto a problem over at the VSCode GitHub Pull Requests extension, where our GitHub sign in flow breaks when the Docs-Articles-Templates extension is installed. The relevant issue is microsoft/vscode-pull-request-github#449

Essentially, it looks like docs-articles-templates is referencing an old version of vscode-extension-telemetry, which in turn is pulling in a really old version of applicationinsights-nodejs, which has a bug where it throws trying to parse a request (in this case, a web socket connection), completely breaking any extension trying to do http requests.

I'm trying to find a workaround right now, but it would be great if you could update your dependencies to their latest version, which will hopefully fix these issues.

wrong extension name and typo in settings

  1. In VS Code, open User Settings and scroll down to find "Docs Authoring Extenstion Configuration".
  2. Note that the extension name should be "Docs Markdown", and "extension" should be spelled correctly.

image

Use full path for auto-completing links

The number one feature I use from this extension is to insert links to other internal pages. It saves me so much time to auto-complete the proper relative link. However, it seems to have regressed a bit lately.

I have a lot of paths in my project that end with a file called "index.md", ie. "Topic/SubTopic/index.md". When I use ALT+m -> Link -> Internal and then type "SubTopic" for a couple of weeks I got "Topic/SubTopic/index.md" as a suggestion, and I could easily insert that link.

Lately this stopped working and I got NO suggestion at all anymore, not for that page, nor for any other page in that folder. The only way to get to that link is to type "index.md", but then I get hundreds of candidates, because my documentation is large any every folder has such a page.

I am not sure whether this was a change in VS Code or in the plugin, that changed the behavior, but it would make the plugin drastically more useful to me, if the old behavior would work again.

AB#239482

Can't navigate to links that begin with tildes

Links that begin from the docset root (i.e., links that begin with a tilde, like [load tests](~/test/unit-test/load-tests.md)) currently don't work when you click on them in preview. Could you please fix this issue? Thanks.

AB#239486

Pont size suggestion!

Why don't you add the auto-complete feature of H1 or H2 related to the font size?

Partial incompatibility with vscodevim extension

  • OS: macOS 10.13.3
  • Opened VS Code, uninstalled all extensions, clicked "Reload"
  • Uninstalled VS Code using AppCleaner
  • Downloaded/installed VS Code, version 1.22.2 (1.22.2), 3aeede733d9a3098f7b4bdc1f66b63b0f48c1ef9
  • Opened a new file, entered some Markdown:
# This is a heading

This is some text

## This is another heading

This is some more text
  • Saved the file: ~/Desktop/file.md
  • Installed extension: vscodevim 0.11.3, clicked "Reload"
  • In file.md
    • Moved cursor to top of file
    • Pressed esc to enter vim command mode
    • Pressed / to start a search
    • Typed This as the search value
    • Hit enter to complete the search text
    • Hit n multiple times to cycle through search results
    • Worked as expected
  • Installed "Docs Authoring Pack" extension, clicked "Reload." This installed:
    • DocFX 0.1.1
    • Docs Authoring Pack 0.0.1
    • docs-markdown 0.0.1
    • markdownlint 0.14.1
  • In file.md
    • Moved cursor to top of file
    • Pressed esc to enter vim command mode
    • Pressed / to start a search
    • Typed This as the search value
    • Hit enter to complete the search text
      • Instead of "completing" the search, enter inserts a newline in the file at the cursor's location (unexpected)
      • Since the search text hasn't been completed, typing n just appends "n" to the search text (rather than moving to the next search result as expected)
  • Change filetype of document to plaintext (in lower-right corner of VS Code)
    • vim search works as anticipated
  • Reverted document type to Markdown
  • Disabled Docs Authoring Pack extension (only that extension, not its dependencies), clicked "Reload"
    • vim-style searching still broken
  • Disabled docs-markdown extension, clicked "Reload"
    • vim-style searching works as expected

Flag alert with trailing empty blockquote lines

Not a functional thing, but sometimes I see blocks like this in documents:

> [!NOTE]
> My awesome note!
> 
> 
>

Probably it's caused by auto-insertions of extra > in the IDE. Thinking that flagging or cleaning trailing > from these blocks would be good from a diff and docset/document perspective.

AB#239487

Enable links in toc.yml files

The ability to set links in toc.yml would be a big help.
Rather than markdown links, it would insert the name and href properties in the location of the cursor.

Custom snippet tab stop doesn't work

I've been finding that using the docs authoring pack and in particular the docs-markdown ext prevents the Tab Stop functionality in other custom snippets that I have.

Steps to replicate

I created a custom snippet following https://code.visualstudio.com/docs/editor/userdefinedsnippets such as:

{
	"My Custom Snippet": {
		"prefix": "mysnippet",
		"scope": "markdown",
		"body": [
			"First tab stop: $1",
			"Second tab stop: $2",
			"Last tab stop: $0"
		],
		"description": "Add a row to the Learning Plan Table"
	}
}

Create a new file in vscode, set the language mode to markdown.
Type mysnippet and press CTRL+SPACE then select the snippet and press ENTER
Type text in the first tab stop, then press tab.

It will insert a tab and not move onto the next tab stop as per this image.

image

If I disable the docs-markdown this allows the tabstop to work. I can also disable the whole docs authoring pack and it resolves the issue.

For the moment I have disabled this for the workspace but I could see the need to use this extension within my current project along with custom snippets.

VS Code version info
Version: 1.31.1 (user setup)
Commit: 1b8e8302e405050205e69b59abb3559592bb9e60
Date: 2019-02-12T02:20:54.427Z
Electron: 3.1.2
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763

Extension versions:
docs-authoring-pack: 0.1.1
docs-markdown: 0.2.2

`moniker-end` being flagged as bad syntax

I'm assuming this is a but in the rule rather than a docs bug.

Ex: and example from the vsts-docs

::: moniker range="<= tfs-2018"
> [!NOTE]  
> In Microsoft Team Foundation Server (TFS) 2018 and previous versions,
build and release _pipelines_ are called _definitions_,
_service connections_ are called _service endpoints_,
_stages_ are called _environments_,
and _jobs_ are called _phases_.

::: moniker-end

The closing ::: moniker-end gets flagged

docsmd.moniker: Moniker linting. [Bad syntax for moniker. Only "moniker range" is supported.]markdownlint(docsmd.moniker)

New Preview doesn't hand xref links

I think the old one had some logic added in #109 but It looks like that doesn't work with the switch.
I believe there are some smarts in the xref links with the query string replacing the display text, but I'm not sure the previous one handled that

extension is not working

Issue Type: Bug

  1. install the docs-markdown extension (v 0.1.2)
  2. press Alt+M then nothing is changed.
  3. select the 'Docs:Markdown authoring menu' from Command Panel, then error message is popped.

vscode-1
vscode-2

Extension version: 0.1.2
VS Code version: Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i5-6600 CPU @ 3.30GHz (4 x 3312)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: unavailable_software
webgl: enabled
webgl2: enabled
Memory (System) 31.89GB (20.94GB free)
Process Argv C:\Program Files\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%

Add support for PlantUml

It will be nice to have support for PlantUml where you may find more details in this VSCODE Extension

The code below should generate a graph

```plantuml
@startuml
'AutoInclude

scale 2

left to right direction
skinparam packageStyle rect
actor customer
actor clark
rectangle checkout {
    customer -- (checkout)

}

@enduml

Following code should not generate a graph and shows it as a code with color syntax

```plantumlcoode
@startuml
'AutoInclude

scale 2

left to right direction
skinparam packageStyle rect
actor customer
actor clark
rectangle checkout {
    customer -- (checkout)

}

@enduml

Opening DFM preview fails

OS: MacOS High Sierra
VS Code Version: 1.22.2
DocFX Extension version: 0.1.3

While working with files in https://github.com/MicrosoftDocs/sandbox, when I open try to view a DFM preview the extension fails with the follow error message

[Child process Error]: usage: chmod [-fhv] [-R [-H | -L | -P]] [-a | +a | =a [i][# [ n]]] mode|entry file ... chmod [-fhv] [-R [-H | -L | -P]] [-E | -C | -N | -i | -I] file ...

Configure indentation

Currently this extension doesnΒ΄t respect the global editor.tabSize. It always uses "editor.tabSize": 4

[Markdocs Server Error]: System.ArgumentNullException: Value cannot be null.

After updating VS Code, I typically see some version of the following exception upon first launch after update. Here's the latest after my update to VS Code v1.72.2 today:

[Markdocs Server Error]: System.ArgumentNullException: Value cannot be null.
   at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
   at System.Net.HttpEndPointListener.ProcessAccept(SocketAsyncEventArgs args)
   at System.Net.HttpEndPointListener.Accept(SocketAsyncEventArgs e)
   at System.Net.HttpEndPointListener..ctor(HttpListener listener, IPAddress addr, Int32 port, Boolean secure)
   at System.Net.HttpEndPointManager.GetEPListener(String host, Int32 port, HttpListener listener, Boolean secure)
   at System.Net.HttpEndPointManager.AddPrefixInternal(String p, HttpListener listener)
   at System.Net.HttpEndPointManager.AddListener(HttpListener listener)
   at System.Net.HttpListener.Start()
   at MarkdocsService.MarkdownHttpServer.Start() in C:\projects\markdocs-server\MarkdownHttpServer.cs:line 32
   at MarkdocsService.Program.HandleRequest() in C:\projects\markdocs-server\Program.cs:line 26
   at MarkdocsService.Program.Main(String[] args) in C:\projects\markdocs-server\Program.cs:line 14

The output window displays the following prior to the Markdocs server error popups:

Installing docs preview extension's dependencies...
Platform: linux, x86_64, name=ubuntu, version=18.04

Downloading package "docs-previewService for Linux (x64)" (26101 KB) .................... Done!

Installing package "docs-previewService for Linux (x64)"

Finished

Environment

OS: Ubuntu 18.04 LTS
VSCode version: 1.72.2
Docs extension versions:
image

applyTemplate appears multiple times reported by VSCode

  • Extension Name: docs-markdown
  • Extension Version: 0.1.5
  • OS Version: Windows_NT x64 10.0.17763
  • VSCode version: 1.29.1
{
	"messages": [
		{
			"type": 1,
			"message": "Command `applyTemplate` appears multiple times in the `commands` section.",
			"extensionId": "docsmsft.docs-markdown",
			"extensionPointId": "commands"
		}
	],
	"activationTimes": {
		"startup": false,
		"codeLoadingTime": 1453,
		"activateCallTime": 21,
		"activateResolvedTime": 7,
		"activationEvent": "onLanguage:markdown"
	}
}

Add a Markdown link checker

Not sure if this might be defered to DocFx to handle, but I've been using https://github.com/tcort/markdown-link-check on projects lately to validate that all those relative links in markdown are actually there.
That project has some downsides, so maybe you want to do your own:

  • Gets flagged by DDoS protection on some sites
  • Doesn't natively support globbing file patterns

Toolbar configuration enhancement

I prefer to use the legacy toolbar with the extension. I followed the instructions to enable the toolbar, and that worked great. The problem is that now I have 2 toolbars.

image

The toolbar at the top ☝️ of the editor should disappear when I enable the legacy toolbar. That's valuable real estate at the top that should be consumed by tabs instead.

Gauntlet should provide HTML source from markdown preview, in VS Code.

  1. Draft a .md file with content, by using VS Code.

  2. Click the Preview button on the Gauntlet tool bar.

  3. See an HTML render of the markdown content appear.

  4. Wish you could Copy the underlying HTML source code into your clipboard, or to file.

  5. Cry knowing Gauntlet does not offer such a Copy.

  6. Thank the Gauntlet people in advance, for them adding this Copy feature. Tell them that this need is often talked about in the hallway. (Was vsts = 1234982.)

(MightyPen on GitHub, [email protected] , 2018/04/12)

Link UI updates causing build errors

The new Link UI updates rolled out 2 days ago cause me to have build errors like the following:

  • Line 363: [Warning] Illegal link: [Behavior of specialized update operations](../special-update-operation-behavior.md#behavior-of-specialized-update-operations) -- missing bookmark. The file developer/common-data-service/special-update-operation-behavior.md doesn't contain a bookmark named behavior-of-specialized-update-operations.

Now that the new Link UI only provides two options:

  • Heading in this file
  • Heading in another file

The error above is due to the fact that the I have to choose a heading, and the heading I want is the H1 title of the topic rather than any sub-heading. When I choose that heading I get the error above because the OPS build system seems to not recognize that a heading is a bookmark. Frankly, that makes sense to me too.

I understand why you might remove the external link option, but you should keep the option to link to another file that will include the title of the topic and a reference to the file without any fragment.

Or am I missing some other part of these new Link UI updates?

In the meantime, I have to manually strip out the generated fragments for h1 headings.

Bookmark in this file issue

I have some clear H1 and H2 headers in my .md file but it keeps insisting that there are no headers in the file to bookmark to.

Add support for markdown-it extensions

I was going to create requests for each feature below but couldn't be sure if they are out of scope or not, so I created a single issue. Please, let me know if you want me to create a separate request for each of those. Unfortunately, without those, it is very hard to move forward with docs.

  • table of contents
  • footnote
  • abbr
  • deflist
  • sup
  • sub
  • checkbox
  • attrs
  • kbd
  • underline
  • mark
  • emoji
  • containers

Don't use back slash in file path

In CommonMark, \ in file link will be regarded as %5C, see here.

To keep consistent with CommonMark syntax, please use / instead of \ as path separator for file inclusion and code snippet syntax auto-completion.

Markdown lint custom rule incorrectly flags video link

Inserting a video link like the following:

> [!VIDEO https://www.youtube.com/embed/87_gpuFg1Wo]

Results in a lint error:

docsmd.alert: Alert linting. [Bad alert type. Only NOTE, TIP, IMPORTANT, CAUTION, and WARNING are supported. Case-sensitive.]

Units in Learn module index.yml are not structured properly

I'm trying to track this down myself, but the yml for the units of a module in index.yml are not structured properly, it's adding an extra units: to the config. Logging this to keep track of this issue, and I'll look into it as well, but if someone else has the obvious fix feel free to fix.

units:
  units:
  - learn-pr.test-module.1-introduction
  - learn-pr.test-module.2-content
  - learn-pr.test-module.3-exercise
  - learn-pr.test-module.4-summary

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.