{"id":19234580,"url":"https://github.com/smitelli/cosmodoc","last_synced_at":"2025-10-04T14:25:31.126Z","repository":{"id":145541648,"uuid":"438053057","full_name":"smitelli/cosmodoc","owner":"smitelli","description":"The semi-complete teardown of Cosmo's Cosmic Adventure.","archived":false,"fork":false,"pushed_at":"2024-09-12T16:47:26.000Z","size":21556,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-13T05:47:31.076Z","etag":null,"topics":["dos","ega","game","hugo"],"latest_commit_sha":null,"homepage":"https://cosmodoc.org","language":"HTML","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/smitelli.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":"2021-12-13T23:14:35.000Z","updated_at":"2024-09-12T16:47:31.000Z","dependencies_parsed_at":"2024-09-13T03:46:11.296Z","dependency_job_id":null,"html_url":"https://github.com/smitelli/cosmodoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fcosmodoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fcosmodoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fcosmodoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smitelli%2Fcosmodoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smitelli","download_url":"https://codeload.github.com/smitelli/cosmodoc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223849217,"owners_count":17213640,"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":["dos","ega","game","hugo"],"created_at":"2024-11-09T16:14:20.014Z","updated_at":"2025-10-04T14:25:26.080Z","avatar_url":"https://github.com/smitelli.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cosmodoc\n\nThe Doc for Cosmo.\n\n## Requirements\n\nThis project requires the Hugo Extended build, and was most recently verified against Hugo v0.121.0.\n\n## Build the site\n\nThis requires a working `hugo` binary.\n\n```bash\ncd src\nhugo --printPathWarnings --printUnusedTemplates --templateMetrics\n```\n\nA valid absolute path (with protocol) should be provided for `--baseURL` in production environments, although this only affects the OpenGraph, `wget` footer, robots.txt, and sitemap.xml outputs.\n\nOutput files are stored in the top-level `public/` directory. This is an appropriate place to point an HTTP server's document root.\n\n## Regenerate the syntax highlighter CSS\n\n```bash\ncd src\nhugo gen chromastyles --style=monokailight \u003e assets/scss/syntax.scss\n```\n\n## Renumber the content pages\n\nIf there are two pages with weights 10 and 20, a new page can be placed in-between by giving it a weight of 15. After a while there may be a shortage of free weight values to adequately sort new pages. If that happens, run:\n\n```bash\nscripts/renumber.py\n```\n\nThis will renumber _all_ of the pages in even increments of 10.\n\n## Build the images\n\nThe final images are already committed to the repository to ease deployment. It should not be necessary to do this procedure under normal circumstances unless an image has been changed or added. This requires working `inkscape`, `pngquant`, and `optipng` binaries.\n\nImage source material is in the `imgsrc/` directory, which mirrors the naming convention and structure of `src/content/topics/`. The master list of all source files and the list of resized versions to build are in `imgsrc/manifest.txt`.\n\n```bash\nscripts/imgmake.py\n```\n\nThe script tries not to rebuild existing files unless the source was modified more recently then the existing destination. This relies on the filesystem having sane mtimes on all the files.\n\nTo forcefully delete all buildable image versions, run:\n\n```bash\nscripts/imgmake.py clean\n```\n\n## Build the content data files\n\nIn the below examples, `$FILE` and `$DIR` are things you know how to fill in correctly.\n\n```bash\nscripts/generate.py actor -c $FILE \u003e src/data/actor.json\nscripts/generate.py font \u003e src/data/font.json\nscripts/generate.py map -d $DIR \u003e src/data/map.json\nscripts/generate.py music -d $DIR \u003e src/data/music.json\nscripts/generate.py sound -d $DIR \u003e src/data/sound.json\nscripts/generate.py sprite -f ACTRINFO.MNI \u003e src/data/actor_sprite.json\nscripts/generate.py sprite -f PLYRINFO.MNI \u003e src/data/player_sprite.json\nscripts/generate.py sprite -f CARTINFO.MNI \u003e src/data/cartoon_sprite.json\n```\n\n## AdLib examples\n\n```bash\nscripts/make-adlib-examples.py\n```\n\nThe scripts produce WAV files, but MP3/M4A is preferred for the web. Use whatever [FFmpeg](https://ffmpeg.org/) generates by default. Quality 4 is \"good enough.\"\n\n```bash\nffmpeg -i in.wav -q:a 4 out.mp3\nffmpeg -i in.wav -q:a 4 out.m4a\n```\n\nThe M4A/AAC files sometimes sound kinda goofy. There's probably a way to better tune that with a command option.\n\n## Diff rendered pages between Hugo versions\n\nHere we went from Hugo v0.90.1 to v0.107.0, which was rather noisy.\n\n```bash\ncd src\n\nhugo\nfind ../public -type f -exec sed -Ei 's/\"Hugo [0-9\\.]+\"/\"HUGOVERSION\"/g' {} +\nmv ../public ../public-orig\n\n# \u003cPut new hugo-extended binary into e.g. /usr/local/bin/hugo-107\u003e\nhugo-107\nfind ../public -type f -exec sed -Ei 's/\"Hugo [0-9\\.]+\"/\"HUGOVERSION\"/g' {} +\n```\n\nFind overall differences:\n\n```bash\ndiff -rq ../public-orig ../public\n```\n\nFind specific differences in one HTML-ish file:\n\n```bash\ndiff \u003c(tr -s '\u003e' '\\n' \u003c ../public-orig/topics/FOO/index.html) \u003c(tr -s '\u003e' '\\n' \u003c ../public/topics/FOO/index.html)\n```\n\n## Deployment\n\nIf you're interested in how this gets deployed (and _dear god why are you_) then consider sniffing around [the Salt states.](https://github.com/smitelli/salt/blob/master/states/website/cosmodoc-org.sls)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmitelli%2Fcosmodoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmitelli%2Fcosmodoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmitelli%2Fcosmodoc/lists"}