{"id":15611581,"url":"https://github.com/boxdot/make-static","last_synced_at":"2026-03-01T04:36:26.385Z","repository":{"id":78593698,"uuid":"62392865","full_name":"boxdot/make-static","owner":"boxdot","description":"Static website generator using Make","archived":false,"fork":false,"pushed_at":"2016-07-01T12:56:53.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-03T05:58:08.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxdot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-01T12:53:19.000Z","updated_at":"2016-07-01T12:53:40.000Z","dependencies_parsed_at":"2023-05-20T03:56:39.193Z","dependency_job_id":null,"html_url":"https://github.com/boxdot/make-static","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"72a26e81f96a2ce47a390e9ea29ab8f3597674ef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boxdot/make-static","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Fmake-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Fmake-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Fmake-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Fmake-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxdot","download_url":"https://codeload.github.com/boxdot/make-static/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxdot%2Fmake-static/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T06:05:33.975Z","updated_at":"2026-03-01T04:36:26.361Z","avatar_url":"https://github.com/boxdot.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"% Make static blog\n%\n% May 12, 2015\n\nWe want to run `make` in a directory, which transforms all md-files in the same directory and all its subdirectories to html-files. All other files are copied. Of course, make should rebuild only updated files. We apply the following\n\n## Strategy\n\nThe following transformation rules are to apply:\n\n1. `index.md` -\u003e `target/index.html` using pandoc\n2. `title.md` -\u003e\n\ta. create dir `target/title`\n  \tb. `target/title/index.html` using pandoc\n3. every other `file` except for the files from 1 and 2 -\u003e `target/file`\n4. Apply 1--3 to each directory except for `target`.\n\n## Possible extension\n\nFile and directory names beginning with a date, e.g. `2015-05-11-file`, could be placed in the directory `target/2015/05/11/file/`. On the other hand, if you take a look at the great [blog](http://bost.ocks.org/) of Mike Bostock, then you will see, that he uses just simple urls for articles, e.g. http://bost.ocks.org/mike/join/. And I think, that following Mike Bostock's design decisions can't be bad. Especially, since this idea was partly initiated by his [article](http://bost.ocks.org/mike/make/) about `make`.\n\n## Implementation\n\n```Makefile\n# redefined in the recursive call\n# redefined in the recursive call\nMAKEFILE := Makefile\nTARGET := output\n\nMD_FILES=$(shell find *.md -maxdepth 0 -type f 2\u003e/dev/null | grep -v index | tr '\\n' ' ')\nDIRS=$(shell find * -maxdepth 0 -type d 2\u003e/dev/null | grep -v $(TARGET) | tr '\\n' ' ')\nOTHER_FILES=$(filter-out $(TARGET) $(DIRS) $(MD_FILES) index.md,$(wildcard *))\n\nINDEX_HTML=$(addprefix $(TARGET)/,$(subst .md,.html,$(wildcard index.md)))\nTARGET_DIRS=$(addprefix $(TARGET)/,$(DIRS))\nHTML_FILES=$(addprefix $(TARGET)/,$(subst .md,/index.html,$(MD_FILES)))\nHTML_DIRS=$(filter-out $(TARGET_DIRS),$(patsubst %/,%,$(dir $(HTML_FILES))))\nTARGET_OTHER_FILES=$(addprefix $(TARGET)/,$(OTHER_FILES))\n\nPANDOC=pandoc\n\n\nall: $(TARGET) $(INDEX_HTML) $(HTML_FILES) $(TARGET_OTHER_FILES) $(TARGET_DIRS) \n\n$(TARGET):\n\tmkdir -p $(TARGET)\n\nifdef INDEX_HTML\n$(INDEX_HTML): index.md\n\t$(PANDOC) $\u003c -o $@\nendif\n\n$(HTML_FILES): $(TARGET)/%/index.html: %.md $(TARGET)/%\n\t$(PANDOC) $\u003c -o $@\n\n$(HTML_DIRS): $(TARGET)/%:\n\tmkdir -p $@\n\n$(TARGET_OTHER_FILES): $(TARGET)/%: %\n\tcp $\u003c $@\n\n$(TARGET_DIRS): $(TARGET)/%: %\n\t@echo \"$(\\x1b[32;01m)Building recursively $\u003c...$(\\x1b[0m)\"\n\t@make -C $\u003c -f ../$(MAKEFILE) TARGET=../$@ MAKEFILE=../$(MAKEFILE)\n\n\n.PHONY: clean\nclean: \n\trm -rf $(TARGET)\n\n```\n\n[Download](Makefile) (MIT License)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxdot%2Fmake-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxdot%2Fmake-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxdot%2Fmake-static/lists"}