{"id":13397489,"url":"https://github.com/rstacruz/flatdoc","last_synced_at":"2025-05-14T14:00:20.891Z","repository":{"id":8648007,"uuid":"10298815","full_name":"rstacruz/flatdoc","owner":"rstacruz","description":"Build sites fast from Markdown","archived":false,"fork":false,"pushed_at":"2023-05-31T11:27:01.000Z","size":549,"stargazers_count":2680,"open_issues_count":61,"forks_count":261,"subscribers_count":55,"default_branch":"gh-pages","last_synced_at":"2025-05-11T02:06:02.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://ricostacruz.com/flatdoc","language":"CSS","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/rstacruz.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/Notes.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-05-26T14:21:27.000Z","updated_at":"2025-04-17T05:07:03.000Z","dependencies_parsed_at":"2024-06-18T15:34:03.262Z","dependency_job_id":"68414107-9631-4cf4-bf9d-218bb49b2c02","html_url":"https://github.com/rstacruz/flatdoc","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fflatdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fflatdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fflatdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rstacruz%2Fflatdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rstacruz","download_url":"https://codeload.github.com/rstacruz/flatdoc/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254159140,"owners_count":22024558,"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":[],"created_at":"2024-07-30T18:01:26.714Z","updated_at":"2025-05-14T14:00:20.744Z","avatar_url":"https://github.com/rstacruz.png","language":"CSS","funding_links":[],"categories":["CSS","others","Apps","Bonus #5 - Self-Hosted Development Tools"],"sub_categories":["Development","Notable Mentions"],"readme":"Flatdoc\n=======\n\nFlatdoc is a small JavaScript file that fetches Markdown files and renders them\nas full pages. Essentially, it's the easiest\nway to make open source documentation from *Readme* files.\n\n * No server-side components\n * No build process needed\n * Deployable via GitHub Pages\n * Can fetch GitHub Readme files\n * Gorgeous default theme (and it's responsive)\n * Just create an HTML file and deploy!\n\n*Current version: [v0.9.0][dist]*\n\n[![Build Status](https://travis-ci.org/rstacruz/flatdoc.svg?branch=gh-pages)](https://travis-ci.org/rstacruz/flatdoc)\n\nGetting started\n---------------\n\nCreate a file based on the template, which has a bare DOM, link to the\nscripts, and a link to a theme. It will look something like this (not exact).\nFor GitHub projects, simply place this file in your [GitHub pages] branch and\nyou're all good to go.\n\n*In short: just download this file and upload it somewhere.*\n\nThe main JS and CSS files are also available in [npm] and [bower].\n\n[Default theme template \u003e][template]\n\n[Blank template \u003e][blank]\n\n[bower]: http://bower.io/search/?q=flatdoc\n[npm]: https://www.npmjs.org/package/flatdoc\n\n### Via GitHub\n\nTo fetch a Github Repository's readme file, use the `Flatdoc.github` fetcher.\nThis will fetch the Readme file of the repository's default branch.\n\n``` javascript\nFlatdoc.run({\n  fetcher: Flatdoc.github('USER/REPO')\n});\n```\n\nYou may also fetch another file other than the Readme file, just specify it as\nthe 2nd parameter.\n\n``` javascript\nFlatdoc.run({\n  fetcher: Flatdoc.github('USER/REPO', 'Changelog.md')\n});\n```\n\nAfter you've done this, you probably want to deploy it via [GitHub Pages].\n\n[GitHub Pages guide \u003e][GitHub Pages]\n\n### Via a file\n\nYou may also fetch a file. In this example, this fetches the file `Readme.md` in\nthe same folder as the HTML file.\n\n``` javascript\nFlatdoc.run({\n  fetcher: Flatdoc.file('Readme.md')\n});\n```\n\nYou may actually supply any URL here. It will be fetched via AJAX. This is\nuseful for local testing.\n\n``` javascript\nFlatdoc.run({\n  fetcher: Flatdoc.file('http://yoursite.com/Readme.md')\n});\n```\n\nHow it works\n------------\n\nFlatdoc is a hosted `.js` file (along with a theme and its assets) that you can\nadd into any page hosted anywhere.\n\n#### All client-side\n\nThere are no build scripts or 3rd-party services involved. Everything is done in\nthe browser. Worried about performance? Oh, It's pretty fast.\n\nFlatdoc utilizes the [GitHub API] to fetch your project's Readme files. You may\nalso configure it to fetch any arbitrary URL via AJAX.\n\n#### Lightning-fast parsing\n\nNext, it uses [marked], an extremely fast Markdown parser that has support for\nGitHub flavored Markdown.\n\nFlatdoc then simply renders *menu* and *content* DOM elements to your HTML\ndocument. Flatdoc also comes with a default theme to style your page for you, or\nyou may opt to create your own styles.\n\nMarkdown extras\n---------------\n\nFlatdoc offers a few harmless, unobtrusive extras that come in handy in building\ndocumentation sites.\n\n#### Code highlighting\n\nYou can use Markdown code fences to make syntax-highlighted text. Simply\nsurround your text with three backticks. This works in GitHub as well.\nSee [GitHub Syntax Highlighting][fences] for more info.\n\n    ``` html\n    \u003cstrong\u003eHola, mundo\u003c/strong\u003e\n    ```\n\n#### Blockquotes\n\nBlockquotes show up as side figures. This is useful for providing side\ninformation or non-code examples.\n\n\u003e Blockquotes are blocks that begin with `\u003e`.\n\n#### Smart quotes\n\nSingle quotes, double quotes, and double-hyphens are automatically replaced to\ntheir typographically-accurate equivalent. This, of course, does not apply to\n`\u003ccode\u003e` and `\u003cpre\u003e` blocks to leave code alone.\n\n\u003e \"From a certain point onward there is no longer any turning back. That is the\n\u003e point that must be reached.\"  \n\u003e --Franz Kafka\n\n#### Buttons\n\nIf your link text has a `\u003e` at the end (for instance: `Continue \u003e`), they show\nup as buttons.\n\n\u003e [View in GitHub \u003e][project]\n\nCustomizing\n===========\n\nBasic\n-----\n\n### Theme options\n\nFor the default theme (*theme-white*), You can set theme options by adding\nclasses to the `\u003cbody\u003e` element. The available options are:\n\n#### big-h3\nMakes 3rd-level headings bigger.\n\n``` html\n\u003cbody class='big-h3'\u003e\n```\n\n#### no-literate\nDisables \"literate\" mode, where code appears on the right and content text\nappear on the left.\n\n``` html\n\u003cbody class='no-literate'\u003e\n```\n\n#### large-brief\nMakes the opening paragraph large.\n\n``` html\n\u003cbody class='large-brief'\u003e\n```\n\n### Adding more markup\n\nYou have full control over the HTML file, just add markup wherever you see fit.\nAs long as you leave `role='flatdoc-content'` and `role='flatdoc-menu'` empty as\nthey are, you'll be fine.\n\nHere are some ideas to get you started.\n\n * Add a CSS file to make your own CSS adjustments.\n * Add a 'Tweet' button on top.\n * Add Google Analytics.\n * Use CSS to style the IDs in menus (`#acknowledgements + p`).\n\n### JavaScript hooks\n\nFlatdoc emits the events `flatdoc:loading` and `flatdoc:ready` to help you make\ncustom behavior when the document loads.\n\n``` js\n$(document).on('flatdoc:ready', function() {\n  // I don't like this section to appear\n  $(\"#acknowledgements\").remove();\n});\n```\n\nFull customization\n------------------\n\nYou don't have to be restricted to the given theme. Flatdoc is just really one\n`.js` file that expects 2 HTML elements (for *menu* and *content*). Start with\nthe blank template and customize as you see fit.\n\n[Get blank template \u003e][template]\n\nMisc\n====\n\nInspirations\n------------\n\nThe following projects have inspired Flatdoc.\n\n * [Backbone.js] - Jeremy's projects have always adopted this \"one page\n documentation\" approach which I really love.\n\n * [Docco] - Jeremy's Docco introduced me to the world of literate programming,\n and side-by-side documentation in general.\n\n * [Stripe] - Flatdoc took inspiration on the look of their API documentation.\n\n * [DocumentUp] - This service has the same idea but does a hosted readme \n parsing approach.\n\nAttributions\n------------\n\n[Photo](http://www.flickr.com/photos/doug88888/2953428679/) taken from Flickr,\nlicensed under Creative Commons.\n\nAcknowledgements\n----------------\n\n© 2013, 2014, Rico Sta. Cruz. Released under the [MIT \nLicense](http://www.opensource.org/licenses/mit-license.php).\n\n**Flatdoc** is authored and maintained by [Rico Sta. Cruz][rsc] with help from its \n[contributors][c].\n\n * [My website](http://ricostacruz.com) (ricostacruz.com)\n * [Github](http://github.com/rstacruz) (@rstacruz)\n * [Twitter](http://twitter.com/rstacruz) (@rstacruz)\n\n[rsc]: http://ricostacruz.com\n[c]:   http://github.com/rstacruz/flatdoc/contributors\n\n[GitHub API]: http://github.com/api\n[marked]: https://github.com/chjj/marked\n[Backbone.js]: http://backbonejs.org\n[dox]: https://github.com/visionmedia/dox\n[Stripe]: https://stripe.com/docs/api\n[Docco]: http://jashkenas.github.com/docco\n[GitHub pages]: https://pages.github.com\n[fences]:https://help.github.com/articles/github-flavored-markdown#syntax-highlighting\n[DocumentUp]: http://documentup.com\n\n[project]: https://github.com/rstacruz/flatdoc\n[template]: https://github.com/rstacruz/flatdoc/raw/gh-pages/templates/template.html\n[blank]: https://github.com/rstacruz/flatdoc/raw/gh-pages/templates/blank.html\n[dist]: https://github.com/rstacruz/flatdoc/tree/gh-pages/v/0.9.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fflatdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frstacruz%2Fflatdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frstacruz%2Fflatdoc/lists"}