From 887a8d0089a06bfbdad6f3ab3053517eb91698d7 Mon Sep 17 00:00:00 2001 From: killshot13 Date: Fri, 21 May 2021 04:49:07 -0500 Subject: [PATCH 1/4] Dev(mdEditor): experimental usage w/ Docker. --- .devcontainer/Dockerfile | 11 +++++++++++ .devcontainer/devcontainer.json | 30 ++++++++++++++++++++++++++++++ .gitignore | 3 +++ .vscode/extensions.json | 3 +++ 4 files changed, 47 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/extensions.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..ea51227 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,11 @@ +# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/ubuntu/.devcontainer/base.Dockerfile + +# [Choice] Ubuntu version: bionic, focal +ARG VARIANT="focal" +FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} + +# [Optional] Uncomment this section to install additional OS packages. +# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ +# && apt-get -y install --no-install-recommends + + diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..95e321a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,30 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: +// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/ubuntu +{ + "name": "Ubuntu", + "build": { + "dockerfile": "Dockerfile", + // Update 'VARIANT' to pick an Ubuntu version: focal, bionic + "args": { "VARIANT": "focal" } + }, + + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "dougfinke.vscode-pandoc", + "davidanson.vscode-markdownlint" + ], + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "uname -a", + + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" +} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 35b1539..436d5cd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,6 @@ # .code-workspace files provide localized, granular control over the mdEditor config './mdEditor.code-workspace' + +# local files cached by the .devcontainer. +.dccache diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..6bf1162 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["davidanson.vscode-markdownlint"] +} From 6fc43a2bffe2eb086e7be0319c4998f63ea6cbef Mon Sep 17 00:00:00 2001 From: killshot13 Date: Mon, 28 Jun 2021 07:32:30 -0500 Subject: [PATCH 2/4] Update(mdEditor): Add atx styling rule (MD003) Adds this line to the .markdownlint.json to alleviate editor conflicts. "MD003": { "style": "atx" } --- .markdownlint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlint.json b/.markdownlint.json index f2214c3..70fff68 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,5 +1,6 @@ { "default": true, + "MD003": { "style": "atx" }, "MD007": false, "MD033": false, "MD046": false, From 7f50e90c02cda8b79a4be27723c535eaa50c2b90 Mon Sep 17 00:00:00 2001 From: killshot13 Date: Mon, 28 Jun 2021 11:40:28 -0500 Subject: [PATCH 3/4] Feature(mdEditor): Auto-prompt extension install mdEditor will now ask if you want to install the recommended extensions. the prompt should appear when entering the workplace after install. if you already have them, don't worry, that's is why nothing showed up. --- mdEditor.code-workspace | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mdEditor.code-workspace b/mdEditor.code-workspace index a5b4e9f..10277fe 100644 --- a/mdEditor.code-workspace +++ b/mdEditor.code-workspace @@ -18,9 +18,10 @@ "pandoc.htmlOptString": "-s -f gfm -t html5 --css=\\styles\\style.css", // pandoc .pdf output option template -- - // On Linux, be sure to substitute this version of `pdfOptString` to avoid errors: "pandoc.pdfOptString": "-s -f gfm -t latex", + // On Linux, be sure to substitute this version of `pdfOptString` to avoid errors: + //"pandoc.pdfOptString": "-s -f gfm -t pdf", - "pandoc.pdfOptString": "-s -f gfm -t pdf", + "pandoc.pdfOptString": "-s -f gfm -t latex", // NOTE: Other valid values are pdflatex, lualatex, xelatex, latexmk, tectonic, wkhtmltopdf, weasyprint, prince, context, and pdfroff. "editor.semanticTokenColorCustomizations": {}, From 5898c7c752e076ff5d5711a6f7f29b4c397f8a9e Mon Sep 17 00:00:00 2001 From: killshot13 Date: Mon, 28 Jun 2021 11:44:57 -0500 Subject: [PATCH 4/4] Feature(mdEditor): Auto-prompt extension install mdEditor will now ask if you want to install the recommended extensions. the prompt should appear when entering the workplace after install. if you already have them, don't worry, that's is why nothing showed up. --- .devcontainer/Dockerfile | 11 ----------- .devcontainer/devcontainer.json | 30 ---------------------------- .vscode/extensions.json | 2 +- README.md | 35 ++++++++++++++++++--------------- 4 files changed, 20 insertions(+), 58 deletions(-) delete mode 100644 .devcontainer/Dockerfile delete mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index ea51227..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/ubuntu/.devcontainer/base.Dockerfile - -# [Choice] Ubuntu version: bionic, focal -ARG VARIANT="focal" -FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT} - -# [Optional] Uncomment this section to install additional OS packages. -# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ -# && apt-get -y install --no-install-recommends - - diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index 95e321a..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,30 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.177.0/containers/ubuntu -{ - "name": "Ubuntu", - "build": { - "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick an Ubuntu version: focal, bionic - "args": { "VARIANT": "focal" } - }, - - // Set *default* container specific settings.json values on container create. - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" - }, - - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "dougfinke.vscode-pandoc", - "davidanson.vscode-markdownlint" - ], - - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "uname -a", - - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode" -} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 6bf1162..ff248fd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,3 +1,3 @@ { - "recommendations": ["davidanson.vscode-markdownlint"] + "recommendations": ["davidanson.vscode-markdownlint", "DougFinke.vscode-pandoc"] } diff --git a/README.md b/README.md index 34055de..7a3cba7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ > > **v3.1.0** - ## Table of Contents - [About](#about) @@ -48,40 +47,45 @@ mdEditor is an adaptation derived from the brainchild of [Dave Johnson](https:// ## Prerequisites -#### [Visual Studio Code](https://code.visualstudio.com/Download) - +**[Visual Studio Code](https://code.visualstudio.com/Download)** This should be self-explanantory. -#### [Pandoc](http://pandoc.org/installing.html) - +**[Pandoc](http://pandoc.org/installing.html)** This may require some guidance if you don't currently use Pandoc. I wrote a gist to help first-time users; here is [the link](https://gist.github.com/killshot13/5b379355d275e79a5cb1f03c841c7d53). ### Installation Decide where the core mdEditor files should live on your local drive (reference [About](#about) for more), then clone [mdEditor](https://github.com/killshot13/mdEditor.git) to that location. +Now, open mdEditor at the base directory using VSCode. Your IDE will auto-discover the `.code-workspace` file and prompt you to reopen the folder as a workspace. Confirm this choice, unless you wish to use a different configuration. + +If so, there is a blank `settings.json` in the `.vscode` folder for you. Otherwise, you should disregard said folder completely. + We still need to pass the linting rulebook and Pandoc style guide to the editor workspace. -Let's install these VSCode extensions, leaving the settings at their default values. +You should have noticed a prompt once you entered the workspace about installing the recommended extensions. If you have not done so already, go ahead and approve the install. + +If for some reason you did not receive a prompt or have already closed the notification tab, not to worry. Just install these VSCode extensions, leaving the settings at their default values. --> [markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) --> [vscode-pandoc](https://marketplace.visualstudio.com/items?itemName=DougFinke.vscode-pandoc) -Now, open mdEditor at the base directory using VSCode. Your IDE will auto-discover the `.code-workspace` file and prompt you to reopen the folder as a workspace. Confirm this choice, unless you wish to use a different configuration. - -If so, there is a blank `settings.json` in the `.vscode` folder for you. Otherwise, you should disregard said folder completely. - -Using this diagram, verify the file structure of your local mdEditor is free from any discrepancies. +Now, using this diagram, verify the file structure of your local mdEditor is free from any discrepancies. **Tree View** _mdEditor_ -\+---.vscode +\+---.github-templates (+6) + | + +---.vscode | `settings.json` + | `extensions.json` + | + +---images + | `mdEditor.gif` (+3) | +---md - | `project1.md` - | `project2.md` + | `test.txt` | +---styles | `style.css` @@ -89,8 +93,7 @@ _mdEditor_ | |`.markdownlint.json` |`mdEditor.code-workspace` - |`README.md` - |`LICENSE` + |`README.md` (+2) \--- **NOTE: On Linux you must uncomment the `pandoc.htmlOptString` in the `mdEditor.code-workspace` file. The current version, which uses Windows OS file separators, must be replaced with the Linux version; otherwise, the css styles will not be applied correctly.**