Open tlyim opened 1 year ago
The following workflow (in a Windows 10 pc with VS Code, Node.js, npm, and command line madoko installed) works for me as a substitute for the www.madoko.net server,
open VS Code
install the Madoko extension to VS Code
click Settings of VS Code, then search for terminal.integrated.profiles.windows
click the link Edit in settings.json
in the item found above to open the settings.json
file for editing
add the "Node.js Command Prompt" section into that file as in the following:
"terminal.integrated.defaultProfile.windows": "Node.js Command Prompt",
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"icon": "terminal-powershell"
},
"Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [
"/k",
"C:\\Program Files\\nodejs\\nodevars.bat"
],
"icon": "terminal-cmd"
},
"Node.js Command Prompt": {
"path": [
"${env:windir}\\Sysnative\\cmd.exe",
"${env:windir}\\System32\\cmd.exe"
],
"args": [
"/k",
"C:\\Program Files\\nodejs\\nodevars.bat"
],
"icon": "terminal-cmd"
},
D:\github\Courses\
in my case)render.bat
file provided near the bottom of this comment)myfile.mdk
) to open it for editingBS2203\
of D:\github\Courses\
in my case) where the specific .mdk file (ie, myfile.mdk
) is located; then select "Open in Intergrated Terminal" from the dropdown menu..\render myfile.mdk
myfile.html
file and move it to the same directory where myfile.mdk
is locatedmyfile.html
and select "Show Preview" to view the rendered .html file in the upper-right preview panel to be openedmyfile.mdk
file to see this panel widened for convenience in editingmyfile.html
file to see this panel widened for convenience in previewingsample render.bat
file:
@echo off
REM This bat file render .mdk file with madoko-cli
REM and move .html from the out\ directory to the .mdk's directory
set dpath=%~dp1
set name=%~n1
set newxtn=.html
set newfile=%dpath%out\%name%%newxtn%
set destination=%dpath%%name%%newxtn%
call madoko %1
move /y "%newfile%" "%~dp1"
The server is still down, so thank you for opening this issue. I will try your solution and post here how it went.
I'm using Ubuntu WSL and I ended up doing the following:
madoko-html
. see the code block below:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "madoko-html",
"type": "shell",
"command": "madoko",
"args": [
"--no-tex",
"--no-pdf",
"--odir=${fileDirname}/${fileBasenameNoExtension}-out",
"${file}"
],
"problemMatcher": []
}
]
}
keybindings.json
. Add the following keybinding, notice that you have to provide the name of the task as the argument (in my case madoko-html
). See code block below:
// Place your key bindings in this file to override the defaults
[
{
"key": "ctrl+h",
"command": "workbench.action.tasks.runTask",
"when": "editorTextFocus && !editorReadonly",
"args": "madoko-html",
}
]
ctrl + h
-out
. You can change this however you like, it's just the --odir
argument of the madoka cli. Thanks for your sharing! It is really useful. But I still have a question that how can I new a .mdk file.
You just have to create a new file and save it with the .mdk extension.
Thank you very much!
Just wanted to comment that the web is still down, and so is the link to the reference documentation :/
Documentation is there at http://madoko.org/reference.html
But I guess this project is not much tended to now..
Will appreciate very much your advice on how I can still use Madoko local to make changes to and render my slides when the server www.madoko.net is down (just like now).