{"id":17786957,"url":"https://github.com/kamaln7/mdmw","last_synced_at":"2025-10-30T10:19:17.164Z","repository":{"id":57511263,"uuid":"129200504","full_name":"kamaln7/mdmw","owner":"kamaln7","description":"a Markdown middleware HTTP server","archived":false,"fork":false,"pushed_at":"2020-02-18T14:16:46.000Z","size":136,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T14:38:22.648Z","etag":null,"topics":["digitalocean","digitalocean-spaces","golang","http","markdown","middleware"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamaln7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-12T05:56:28.000Z","updated_at":"2020-02-07T18:26:55.000Z","dependencies_parsed_at":"2022-08-29T05:20:12.532Z","dependency_job_id":null,"html_url":"https://github.com/kamaln7/mdmw","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/kamaln7/mdmw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaln7%2Fmdmw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaln7%2Fmdmw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaln7%2Fmdmw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaln7%2Fmdmw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamaln7","download_url":"https://codeload.github.com/kamaln7/mdmw/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamaln7%2Fmdmw/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263943488,"owners_count":23533597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digitalocean","digitalocean-spaces","golang","http","markdown","middleware"],"created_at":"2024-10-27T10:09:00.177Z","updated_at":"2025-10-30T10:19:12.132Z","avatar_url":"https://github.com/kamaln7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/mdmw.png\" alt=\"mdmw logo\" width=\"301\" /\u003e\n\u003c/p\u003e\n\nmdmw is a **M**ark**d**own **m**iddle**w**are HTTP server. It renders Markdown files and serves them back as HTML. It's not meant to be your sole www-facing webserver as it cannot serve non-markdown files.\n\nYou can use mdmw to host a micro-blog, quickly share documents, host documentation, etc.\n\nmdmw supports two storage drivers (i.e. where it pulls markdown files from):\n\n- **filesystem** uses the OS filesystem to look up files\n- **spaces** uses [DigitalOcean Spaces](https://www.digitalocean.com/products/spaces/) to look up files\n\nmdmw exposes an HTTP server and uses the URI as the path for the markdown files.\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [installation](#installation)\n  - [use the docker image RECOMMENDED](#use-the-docker-image-recommended)\n  - [use a pre-built mdmw binary](#use-a-pre-built-mdmw-binary)\n- [usage](#usage)\n  - [options](#options)\n  - [configuration examples](#configuration-examples)\n    - [as a yaml config file](#as-a-yaml-config-file)\n    - [as cli flags](#as-cli-flags)\n    - [as environment variables](#as-environment-variables)\n- [license](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n### installation\n\n#### use the docker image RECOMMENDED\n\n1. pull the latest docker image\n\n```\ndocker pull kamaln7/mdmw:latest\n```\n\n#### use a pre-built mdmw binary\n\n1. download a binary suitable for your OS from [the releases page](https://github.com/kamaln7/mdmw/releases)\n2. place said binary in `/usr/local/bin` or wherever you would like\n\n### usage\n\nmdmw listens on `localhost:4000` by default. Refer to the options section below for details on how to change that. If you are using the docker image, you will need to expose port 4000\n    \nSee the options section below on how to configure mdmw. You can run `docker run -p 4000 kamaln7/mdmw` (use `-e` or `--env-file` to pass configuration options) or run `mdmw` directly if you chose to not use Docker.\n\n#### options\n\n```\nUsage:\n  mdmw [flags]\n\nFlags:\n      --config string               config file (default is ./.mdmw.yaml)\n      --filesystem.path string      path to markdown files (default \"./files\")\n  -h, --help                        help for mdmw\n      --listenaddress string        address to listen on (default \"localhost:4000\")\n      --outputtemplate string       path to HTML output template\n      --spaces.auth.access string   DigitalOcean Spaces access key\n      --spaces.auth.secret string   DigitalOcean Spaces secret key\n      --spaces.cache string         DigitalOcean Spaces cache time (default \"0\")\n      --spaces.path string          DigitalOcean Spaces files path (default \"/\")\n      --spaces.region string        DigitalOcean Spaces region\n      --spaces.space string         DigitalOcean Spaces space name\n      --storage string              storage driver to use (default \"filesystem\")\n      --validateextension           validate that files have a markdown extension (default true)\n```\n\nThere are three ways to configure mdmw. examples for each can be found below\n\n1. use a config file (yaml, toml, json, etc.) and pass `-config ./path/to/config`\n    * options become nested objects, see the example below\n2. pass cli flags as described above\n3. use environment variables\n    * options become uppercase with periods replaced by underscores, see the example below\n\n#### configuration examples\n\n* listen on `0.0.0.0:8080`\n* serve files from a Space in AMS3\n\n##### as a yaml config file\n\n```\nlistenaddress: 0.0.0.0:8080\nstorage: spaces\nspaces:\n  auth:\n    access: ACCESS KEY GOES HERE\n    secret: SECRET KEY GOES HERE\n  region: ams3\n  space: SPACE NAME GOES HERE\n```\n\n##### as cli flags\n\n```\nmdmw \\\n  --listenaddress 0.0.0.0:8000 \\\n  --storage spaces \\\n  --spaces.auth.access \"ACCESS KEY GOES HERE\" \\\n  --spaces.auth.secret \"SECRET KEY GOES HERE\" \\\n  --spaces.region ams3 \\\n  --spaces.space \"SPACE NAME GOES HERE\"\n```\n\n##### as environment variables\n\n```\nLISTENADDRESS=0.0.0.0:8000 \\\nSTORAGE=spaces \\\nSPACES_AUTH_ACCESS=ACCESS KEY GOES HERE \\\nSPACES_AUTH_SECRET=SECRET KEY GOES HERE \\\nSPACES_REGION=ams3 \\\nSPACES_SPACE=SPACE NAME GOES HERE \\\nmdmw\n```\n\n### license\n\nMIT. see [LICENSE](/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaln7%2Fmdmw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamaln7%2Fmdmw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamaln7%2Fmdmw/lists"}