Anything as Markdown
pendingby sec-ml
Very simple plugin that allows any file extension to be registered as Markdown (e.g. mdx, svx, rmd, qmd, mdown, mkdn, mkd, mdwn, mdtxt, mdtext, myst, markua). User-configurable in settings.
Anything as md
Obsidian is great at markdown... that's what it does. But sometimes markdown ≠ .md.
There are a few plugins that add support for specfic extensions (.mdx probably being the most common), but Anything as .md allows you to enter a list of extensions that you want Obsidian to recognise as markdown syntax.
Experimental feature: It will also allow Obsidian to index non-md files as though they are .md. This overrides some built-in logic. While it seems stable, it is currently being tested, and nothing is guaranteed/no support is offered.
What extensions are supported?
Well... any! But I guess for findability reasons, I'll list some:
- .mdx
- .svx
- .rmd
- .qmd
- .mdown
- .mkdn
- .mkd
- .mdwn
- .mdtxt
- .mdtext
- .myst
- .markua
- .pdc
- .pandoc
...you get the idea.
Will Obsidian read my files correctly?
Markdown syntax will be understood and rendered correctly. I have no idea how other elements (jsx blocks, R code blocks, etc.) will fare. This plugin is solely for enabling visibility of the file, and optionally/experimentally, forcing the file to be recognised and treated as native .md.
How to contribute to this plugin
-
Fork and clone
- Fork this repo.
- Clone your fork:
git clone https://github.com/<your username>/anything-as-md.git cd anything-as-md -
Install dependencies
npm installNode.js 16+ is required (
node --version). -
Build the plugin
npm run buildThis compiles TypeScript to
main.js(and runs type-checking). -
Copy into the test vault (for local testing)
npm run test-copyThis copies
main.js,manifest.json, andstyles.cssintotest-vault/.obsidian/plugins/anything-as-md/. -
Try it in Obsidian
- Open the
test-vaultfolder in this repo as a vault in Obsidian. - Go to Settings → Community plugins and enable Anything as Markdown.
- Open the
-
Develop
- Edit source in
src/(e.g.main.ts,settings.ts). - Run
npm run buildthennpm run test-copyto refresh the test vault, or usenpm run devfor watch mode (rebuilds on save; runnpm run test-copywhen you want to update the test vault). - Run
npm run lintto check code style.
- Edit source in
Releasing new releases
- Update your
manifest.jsonwith your new version number, such as1.0.1, and the minimum Obsidian version required for your latest release. - Update your
versions.jsonfile with"new-plugin-version": "minimum-obsidian-version"so older versions of Obsidian can download an older version of your plugin that's compatible. - Create new GitHub release using your new version number as the "Tag version". Use the exact version number, don't include a prefix
v. See here for an example: https://github.com/obsidianmd/obsidian-sample-plugin/releases - Upload the files
manifest.json,main.js,styles.cssas binary attachments. Note: The manifest.json file must be in two places, first the root path of your repository and also in the release. - Publish the release.
You can simplify the version bump process by running
npm version patch,npm version minorornpm version majorafter updatingminAppVersionmanually inmanifest.json. The command will bump version inmanifest.jsonandpackage.json, and add the entry for the new version toversions.json
Adding your plugin to the community plugin list
- Check the plugin guidelines.
- Publish an initial version.
- Make sure you have a
README.mdfile in the root of your repo. - Make a pull request at https://github.com/obsidianmd/obsidian-releases to add your plugin.
Manually installing the plugin
- Copy over
main.js,styles.css,manifest.jsonfrom the latest release to your vaultVaultFolder/.obsidian/plugins/anything-as-md/.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.