@fujocoded/remark-alt-text-files
v0.0.2
Published
Add alt text to your images directly from your filesystem
Downloads
4
Maintainers
Readme
@fujocoded/remark-alt-text-files
A remark plugin that allows loading alt text from a file, rather than hardocding it in markdown
Sample usage
In astro.config.js:
import remarkAltTextFiles from "@fujocoded/remark-alt-text-files";
export default defineConfig({
// ...
integrations: [
mdx({
remarkPlugins: [remarkAltTextFiles],
}),
],
});In markdown files:


# This will load alt text from "./image.alt.txt"
You can change the following options:
root: where the alt text file will be searched from (default: the loaded path of the markdown file orprocess.cwd())pathPrefix: the prefix to indicate alt text should be loaded from a file (default:file:)
