Compare commits

...
712 Commits
Author SHA1 Message Date
squidfunk 9c3134750e Fixed backward compatibility for localization 2017-10-18 21:56:53 +02:00
squidfunk c1e541b32b Added localization to clipboard 2017-10-18 20:44:15 +02:00
squidfunk 6703454356 Fixed Flow errors temporarily 2017-10-18 20:44:15 +02:00
squidfunk 00911b7350 Improved passing i18n values to JavaScript 2017-10-18 20:44:15 +02:00
squidfunk ae0ef54212 Prepare 1.10.4 release 2017-10-18 19:46:28 +02:00
Martin Donath 657715fdde Merge pull request #501 from squidfunk/fix/scrollbar-on-short-content
Fixed vertical scrollbar on short pages
2017-10-18 19:42:25 +02:00
Martin Donath 4151875a93 Merge branch 'master' into fix/scrollbar-on-short-content 2017-10-18 19:36:42 +02:00
squidfunk 716971d13d Fixed vertical scrollbar on short pages 2017-10-18 19:35:24 +02:00
Jonas Fonseca 91aacd5493 Fix typo in site search section 2017-10-18 18:37:08 +02:00
greenkeeper[bot] 6ee58d8b15 chore(package): update flow-bin to version 0.57.1 2017-10-16 19:13:46 +02:00
Waylan Limberg b955abab6e Removed deprecated Markdown config format in docs
* Remove deprecated Markdown config format in docs.

Support for including Markdown extension configs in the extension name has been [deprecated][1] and will not work in any future released of Python-Markdown. MkDocs has offered full support for defining extension configs [since version 0.13][2] and everyone should be using that format.

[1]: https://pythonhosted.org/Markdown/release-2.6.html#extension-configuration-as-part-of-extension-name-deprecated
[2]: http://www.mkdocs.org/about/release-notes/#other-changes-and-additions-to-version-0130

* Update codehilite Markdown config

* Update TOC Markdown configs

* Update pymdown Markdown configs
2017-10-16 19:13:05 +02:00
Jonas Fonseca 2e728cc9f6 Improve printing of code blocks
- Hide clipboard icon
 - Wrap code and hide the scrollbar
2017-10-16 07:48:49 +02:00
Jonas Fonseca 7ca03c017d Fix a typo and use question admonition 2017-10-13 16:08:40 +02:00
Lukas Geiter 253596c58d Keep search open on enter without selection 2017-10-12 17:02:54 +02:00
Martin Donath a267729084 Update release-notes.md 2017-10-12 00:11:31 +02:00
Martin Donath 139778db3a Update CHANGELOG 2017-10-12 00:11:02 +02:00
squidfunk dd50eb77e2 Prepare 1.10.3 release 2017-10-11 19:31:41 +02:00
squidfunk 85a8b1041b Fixed vertical scrollbar on some MathJax formulas 2017-10-11 19:24:50 +02:00
squidfunk 0ff0b46c7a Fixed footnote backref target offsets regression 2017-10-11 18:37:08 +02:00
squidfunk 872a953ee0 Prepare 1.10.2 release 2017-10-06 11:05:47 +02:00
squidfunk ea81720a52 Fixed Safari sidebar height bug 2017-10-06 10:59:43 +02:00
greenkeeper[bot] 6c42611aa2 chore(package): update flow-bin to version 0.56.0 2017-09-29 07:49:53 +02:00
Martin Donath fd6c7e81bb Merge pull request #470 from squidfunk/greenkeeper/flow-bin-0.55.0
Update flow-bin to the latest version 🚀
2017-09-28 09:24:31 +02:00
Martin Donath 880581dba3 Merge pull request #473 from squidfunk/greenkeeper/stylelint-order-0.7.0
Update stylelint-order to the latest version 🚀
2017-09-28 09:24:09 +02:00
Martin Donath 16a120a019 Merge branch 'master' into greenkeeper/flow-bin-0.55.0 2017-09-28 09:21:04 +02:00
Martin Donath 5272abd70c Merge branch 'master' into greenkeeper/stylelint-order-0.7.0 2017-09-28 09:20:50 +02:00
Martin Donath 93c2c777ac Merge pull request #474 from coliff/patch-1
Update URL for Material Design
2017-09-28 09:20:27 +02:00
Christian Oliff 57158e7d10 Update URL for Material Design
Site is now at: https://material.io/guidelines/material-design/
2017-09-25 21:57:44 +09:00
greenkeeper[bot] 9f30a13921 chore(package): update stylelint-order to version 0.7.0 2017-09-24 22:54:48 +00:00
Martin Donath 65442dccaf Merge branch 'master' into greenkeeper/flow-bin-0.55.0 2017-09-25 00:35:31 +02:00
Martin Donath 76c282c175 Merge pull request #467 from squidfunk/greenkeeper/yargs-9.0.1
Update yargs to the latest version 🚀
2017-09-25 00:35:19 +02:00
greenkeeper[bot] 80bdd9670a chore(package): update flow-bin to version 0.55.0 2017-09-20 19:52:27 +00:00
greenkeeper[bot] 7004e5cf2e chore(package): update yargs to version 9.0.1 2017-09-18 00:03:23 +00:00
Martin Donath 12d1a2822a Merge pull request #465 from squidfunk/fix/release-deploy-travis
Install secure urllib package to fix twine deployment on Travis
2017-09-14 17:50:57 +02:00
squidfunk 55a908f23a Install secure urllib package to fix twine deployment on Travis 2017-09-14 17:50:34 +02:00
Martin Donath 52b255c04a Merge pull request #464 from squidfunk/fix/release-deploy-travis
Fix Travis release build
2017-09-14 12:31:56 +02:00
Martin Donath 90ad175b00 Merge branch 'master' into fix/release-deploy-travis 2017-09-14 12:31:23 +02:00
squidfunk 2b6ad0053a Install packages in user location to fix Travis 2017-09-14 12:30:38 +02:00
squidfunk d1376b89d7 Don't try to uninstall packages on Travis 2017-09-14 12:25:54 +02:00
squidfunk 707038db64 Don't try to uninstall packages on Travis 2017-09-14 12:24:50 +02:00
squidfunk 3d617ba270 Don't try to uninstall packages on Travis 2017-09-14 12:20:19 +02:00
squidfunk 739a41210d Don't try to uninstall packages on Travis 2017-09-14 12:19:45 +02:00
squidfunk efd6efc855 Omit local installation on Travis, only build Docker image 2017-09-14 12:01:15 +02:00
squidfunk ff3731ec05 Omit local installation on Travis, only build Docker image 2017-09-14 12:00:51 +02:00
greenkeeper[bot] 94d0e888cf chore(package): update babel-eslint to version 8.0.0 2017-09-14 11:47:44 +02:00
squidfunk ecf5369891 Prepare 1.10.1 release 2017-09-14 11:46:48 +02:00
squidfunk 91b87d1c91 Fixed bold code blocks rendering normal font 2017-09-14 11:35:48 +02:00
squidfunk 50e6328d1f Updated CONTRIBUTING.md 2017-09-07 14:25:03 +02:00
squidfunk 9694d23223 Updated screens and landing page documentation 2017-09-06 10:28:07 +02:00
squidfunk 43484824ee Added notes on icon logo to documentation 2017-09-01 20:25:08 +07:00
greenkeeper[bot] 60d3a49aed chore(package): update gulp-stylelint to version 5.0.0 2017-09-01 20:20:29 +07:00
greenkeeper[bot] c6cb673abd chore(package): update flow-bin to version 0.54.0 2017-09-01 20:15:45 +07:00
squidfunk a37bdac33e Prepare 1.10.0 release 2017-09-01 20:06:27 +07:00
squidfunk 1511c43fca Updated changelog [ci skip] 2017-09-01 19:59:48 +07:00
squidfunk 2537e39c75 Added support for configurable icon as logo 2017-09-01 19:59:48 +07:00
squidfunk a1a18404e3 Removed unnecessary documentation 2017-09-01 19:59:48 +07:00
squidfunk 2ae628ed6d Fixed incorrect color transition for nested pane in mobile navigation 2017-09-01 19:59:48 +07:00
squidfunk bca99813d1 Fixed error in mobile navigation in case JavaScript is not available 2017-09-01 19:59:48 +07:00
squidfunk 6a8eb11378 Improve tasklist checkbox styling 2017-09-01 19:59:48 +07:00
squidfunk aff623aaac Fixed uninitialized overflow scrolling on main pane for iOS 2017-09-01 19:59:48 +07:00
squidfunk 3f80ada54d Prepare 1.9.0 release 2017-08-29 22:44:46 +07:00
squidfunk 19feb7a67d Replaced ligatures with Unicode code points 2017-08-29 22:28:53 +07:00
greenkeeper[bot] 53a4221b53 chore(package): update webpack-stream to version 4.0.0 2017-08-29 21:27:53 +07:00
Martin Donath 4e748c5a55 Merge pull request #441 from squidfunk/feat/pymdown-details
Implement pymdownx.details functionality
2017-08-29 21:21:36 +07:00
squidfunk 1e5611f1e8 Added polyfill for details and adjusted social footer 2017-08-29 21:17:16 +07:00
squidfunk cf78aa3a9a Added new admonition classes and finished details 2017-08-29 18:46:07 +07:00
squidfunk c8d11a83bb Merge branch 'master' into feat/pymdown-details
Conflicts:
	material/base.html
2017-08-29 14:26:43 +07:00
squidfunk 39c38e6812 Fixed spacing for new admonition styles 2017-08-29 14:11:38 +07:00
squidfunk 4d4c76c979 Added basic implementation for details 2017-08-29 13:17:26 +07:00
squidfunk fc4d13de7d Added missing files 2017-08-26 18:36:49 +07:00
squidfunk 35dbc1c0bb Refactored Admonition styles 2017-08-26 18:36:49 +07:00
greenkeeper[bot] 4768d78530 chore(package): update flow-bin to version 0.53.0 2017-08-16 15:20:03 +07:00
squidfunk a09d5e5819 Prepare 1.8.1 release 2017-08-07 19:18:12 +02:00
squidfunk cc7facb199 Fixed missing pagination on GitHub API 2017-08-07 19:10:11 +02:00
greenkeeper[bot] 18b2ca47b2 chore(package): update flow-bin to version 0.52.0 2017-08-03 19:20:51 +02:00
squidfunk 3b6ee1e1cb Prepare 1.8.0 release 2017-08-02 14:35:07 +02:00
Martin Donath 14f85c52de Merge pull request #425 from squidfunk/feat/search-separator
Added support for lazy rendering of search results
2017-08-02 14:20:42 +02:00
squidfunk c0164698cd Merge branch 'master' into feat/search-separator 2017-08-02 14:15:48 +02:00
squidfunk bbb3455c52 Added support for lazy rendering of search results 2017-08-02 14:09:13 +02:00
squidfunk fde1e25a69 Added missing files 2017-08-02 12:21:36 +02:00
squidfunk 8ff457a7fc Upgraded dependencies and fixed ESLint regression 2017-08-02 12:21:36 +02:00
greenkeeper[bot] fd305fe801 chore(package): update stylelint-scss to version 2.0.0 2017-07-30 00:43:28 +02:00
squidfunk d204b63ee4 Added search separator customization option 2017-07-27 23:27:27 +02:00
squidfunk ef1c5a4043 Added search separator customization option 2017-07-27 22:48:47 +02:00
squidfunk 147e5ef75d Fixed CSS linting with stylelint 2017-07-25 17:35:17 +02:00
squidfunk e7fd2b494c Prepare 1.7.5 release 2017-07-25 17:18:42 +02:00
squidfunk 932be00bc8 Forgot to include built JS 2017-07-25 17:11:44 +02:00
squidfunk bda96f88df Improved search user experience 2017-07-25 17:07:16 +02:00
squidfunk 357c6f4122 Improved search matching and highlighting 2017-07-25 16:50:15 +02:00
squidfunk 4887a7e062 Added note to documentation on Disqus integration 2017-07-25 16:26:10 +02:00
squidfunk fce9e77c26 Fixed broken forms due to search shortcuts 2017-07-25 16:11:26 +02:00
squidfunk 993fb4782c Improved markup of search dialogue for a11y 2017-07-25 16:04:56 +02:00
greenkeeper[bot] b2969d6f24 chore(package): update flow-bin to version 0.51.0 2017-07-24 00:45:55 +02:00
greenkeeper[bot] 39d18b6947 chore(package): update gulp-rev to version 8.0.0 2017-07-23 16:22:38 +02:00
Bastien Guyl 77e1a8031c Update EmojiOne demo url
The link http://emojione.com/demo does not exist anymore and it is replace by https://emoji.codes/
2017-07-21 14:08:41 +02:00
squidfunk 546a32f87a Corrected social links 2017-07-20 14:42:04 +02:00
greenkeeper[bot] 6067536ea5 chore(package): update stylelint-order to version 0.6.0 2017-07-18 15:33:07 +02:00
greenkeeper[bot] 605d274523 chore(package): update gulp-stylelint to version 4.0.0 2017-07-18 14:15:39 +02:00
Christian Oliff e3bfb68115 Correct Disqus typo 2017-07-18 09:08:08 +02:00
greenkeeper[bot] eb3062b809 chore(package): update stylelint to version 8.0.0 2017-07-16 14:36:09 +02:00
greenkeeper[bot] a0f0345a24 chore(package): update flow-bin to version 0.49.1 2017-07-15 19:10:41 +02:00
greenkeeper[bot] 11c4693328 chore(package): update chalk to version 2.0.0 2017-07-15 18:57:06 +02:00
squidfunk 21918c8d54 Adjusted Docker badge [ci skip] 2017-07-10 11:03:35 +02:00
squidfunk ea3909dcc1 Prepare 1.7.4 release 2017-06-21 11:21:07 +02:00
squidfunk 4aaf9d6491 Prepare 1.7.4 release 2017-06-21 11:21:07 +02:00
Martin Donath 47ac324dd7 Create CODE_OF_CONDUCT.md 2017-06-21 11:20:50 +02:00
squidfunk a2cab75d96 Upgraded dependencies 2017-06-21 11:09:07 +02:00
squidfunk bea89e87c1 Provide x-ua-compatible tag for IE compatibility 2017-06-21 10:50:12 +02:00
squidfunk 32f6d63a29 Added note on examples 2017-06-21 10:36:23 +02:00
squidfunk a2261041dd Added documentation how to run examples [ci skip] 2017-06-21 10:36:23 +02:00
squidfunk d85ef155de Added example for basic configuration 2017-06-21 10:36:23 +02:00
squidfunk 7d373a128c Added example how to change language 2017-06-21 10:36:23 +02:00
squidfunk cb8900d973 Fixed functional link colors in TOC for active palette 2017-06-14 14:57:28 +02:00
squidfunk ad9388ab42 Upgraded dependencies 2017-06-13 15:11:03 +02:00
squidfunk 80c6474683 Upgraded dependencies 2017-06-13 15:11:03 +02:00
squidfunk ef1a71a973 Upgraded dependencies 2017-06-13 15:11:03 +02:00
squidfunk 324e62e569 Upgraded dependencies 2017-06-13 15:11:03 +02:00
squidfunk f4fd1c3cea Prepare 1.7.3 release 2017-06-07 12:52:32 +02:00
jumpei-miyata 876b71466f Fixed support for Japanese search 2017-06-07 12:43:06 +02:00
squidfunk eed002861e Prepare 1.7.2 release 2017-06-06 22:03:17 +02:00
squidfunk ba0b46e9b0 Fixed non-disappearing tooltip 2017-06-06 21:54:39 +02:00
squidfunk e5761ccfb1 Fixed offset of search box when repo url is not set 2017-06-06 20:52:14 +02:00
squidfunk 42d208560f Prepare 1.7.1 release 2017-06-01 22:53:39 +02:00
squidfunk 6abed20acb Fixed wrong offset of targeted footnote backrefs 2017-06-01 22:47:57 +02:00
squidfunk 95d014032f Fixed wrong z-index order of header, overlay and drawer 2017-06-01 22:28:10 +02:00
squidfunk 5305e3920a Added double quotes where possible 2017-06-01 22:20:46 +02:00
squidfunk c586f9a799 Fixed wrong variable reference in localization docs 2017-06-01 10:07:23 +02:00
squidfunk cb12b4e587 Prepare 1.7.0 release 2017-06-01 09:56:47 +02:00
Martin Donath 00898eda30 Merge pull request #347 from squidfunk/feature/lunr-languages-integration
Added support for multilingual search
2017-06-01 09:47:43 +02:00
squidfunk dcb0ee3f22 Added documentation for site search localization 2017-06-01 09:43:54 +02:00
squidfunk 271d974266 Merge branch 'master' into feature/lunr-languages-integration 2017-06-01 09:14:10 +02:00
Martin Donath d40f6ce69f Merge pull request #333 from squidfunk/feature/clipboard-js-integration
Clipboard.js integration
2017-06-01 09:11:28 +02:00
squidfunk d17b0fbb90 Fixed search highlighting for non-latin languages 2017-06-01 00:54:06 +02:00
squidfunk 974f07ccb4 Added support for multilingual search 2017-06-01 00:40:10 +02:00
squidfunk 745058c77e Removed unnecessary stuff 2017-05-31 17:06:02 +02:00
squidfunk 9a24b60cdf Removed references to Clipboard from docs 2017-05-31 16:53:05 +02:00
squidfunk bca2077c1e Added clipboard active color to palettes 2017-05-31 16:50:11 +02:00
squidfunk 0253d6e6c8 Added support for superfences without codehilite 2017-05-31 16:34:20 +02:00
squidfunk fba1883def Refactored clipboard initialization 2017-05-31 16:22:00 +02:00
squidfunk 3b544b94d9 Improved flow type declaration 2017-05-31 15:31:38 +02:00
squidfunk 13cd1d1a26 Merge branch 'master' into feature/clipboard-js-integration 2017-05-31 15:31:17 +02:00
squidfunk 670ae4a44c Refactored clipboard integration, not finished 2017-05-31 15:22:59 +02:00
squidfunk c07ef90f0e Migrated changes from @facelessuser to code base [ci skip] 2017-05-31 12:25:54 +02:00
squidfunk 9bb8ecc6b0 Prepare 1.6.4 release 2017-05-24 16:26:12 +02:00
squidfunk f86b79b0e5 Upgraded gulp-uglify and updated pinned dependencies 2017-05-24 16:16:50 +02:00
squidfunk f717345ec9 Removed unnecessary argument in Promise 2017-05-24 16:09:24 +02:00
squidfunk 0e30256604 Fixed JavaScript error for GitHub organization URLs 2017-05-24 16:09:24 +02:00
Siva Sankar 056e91e9f4 Update the documentation for Discus Integration
'site_url' field is mandatory in the 'mkdocs.yml' file for the Disqus Integration to work, else it will display the error message as "We were unable to load Disqus. If you are a moderator please see our troubleshooting guide."
2017-05-20 22:12:47 +02:00
squidfunk f8df576a2d Merge branch 'facelessuser-clipboard' into feature/clipboard-js-integration 2017-05-16 21:10:19 +02:00
Martin Donath db397f3151 Merge branch 'master' into clipboard 2017-05-16 21:07:26 +02:00
squidfunk 7024070572 Prepare 1.6.3 release 2017-05-16 21:00:27 +02:00
squidfunk e473a1fedc Fixed undefined source stats for private repositories 2017-05-16 19:41:12 +02:00
facelessuser 4b6ffe6628 Add clipboard.js support 2017-05-15 18:31:10 -06:00
Isaac Muse adc98fac48 Merge pull request #2 from squidfunk/master
Sync up to master
2017-05-15 12:16:33 -06:00
squidfunk 2d66c7ed22 Prepare 1.6.2 release 2017-05-15 11:44:24 +02:00
squidfunk 3516542c98 Removed second underline on abbreviations 2017-05-15 11:37:00 +02:00
squidfunk 6b5629317f Removed ligatures on monospace fonts 2017-05-15 11:27:22 +02:00
squidfunk 5255eaa813 Removed accidentally committed report 2017-05-15 11:05:28 +02:00
squidfunk 2bc2517658 Removed flaky visual regression tests 2017-05-15 11:05:28 +02:00
squidfunk 58288f87ac Fixed miscalculated sidebar height 2017-05-15 10:53:41 +02:00
squidfunk 60a897152c Fixed githooks 2017-05-12 12:17:14 +02:00
squidfunk f6c5529467 Upgraded dependencies 2017-05-12 12:17:14 +02:00
Oscar Vasquez e7a72a3d5d Added missing documentation for the site_favicon option 2017-05-11 11:55:23 +02:00
facelessuser 00ba4be6aa Update MathJax CDN
Fixes #317
2017-05-11 11:35:43 +02:00
Christian Oliff 5e9ee23b9b Typo fix 'show' should be 'shown'
Typo fix 'show' should be 'shown'
2017-04-28 17:08:03 +02:00
squidfunk f5a0596b91 Prepare 1.6.1 release 2017-04-23 21:11:54 +02:00
squidfunk 6609324bd6 Fixed layer order of search component elements 2017-04-23 21:05:13 +02:00
squidfunk 0beb885666 Added gitter badge to README [ci skip] 2017-04-23 20:54:46 +02:00
squidfunk 7ae0a42654 Fixed following of link if search input is focused 2017-04-23 20:52:27 +02:00
squidfunk f6238f3bae Prepare 1.6.0 release 2017-04-22 15:00:26 +02:00
squidfunk 6336e5055c Added language from localizations to HTML tag 2017-04-22 14:55:21 +02:00
squidfunk eea31eb528 Fixed too small footnote divider when using larger font sizes 2017-04-22 14:50:32 +02:00
squidfunk eaaefe4fc4 Fixed broken source files links 2017-04-22 14:38:51 +02:00
squidfunk 00b7e600a8 Merged master and implemented search overlay 2017-04-22 14:17:25 +02:00
squidfunk a5b06b9839 Updated babel-loader, flow-bin, lunr and gulp-changed 2017-04-22 13:22:54 +02:00
Matt Bostock 3ac96ee1d2 Make it clearer mkdocs.yml should exist
Make it clearer that `mkdocs.yml` should exist already and the `theme` line should be added to it.

Otherwise you might follow the README as a new Mkdocs user and be confused why it complains about a missing mandatory field such as `site_name`.
2017-04-22 12:45:24 +02:00
squidfunk 8ac6712dc3 Fixed overflowing sidebar 2017-04-22 00:42:48 +02:00
squidfunk fab1ab54d6 Refactored targetted link offsets 2017-04-22 00:42:48 +02:00
squidfunk 45e57c29e2 Fixed Travis build test 2017-04-20 18:46:58 +02:00
squidfunk 0e971367c0 Prepare 1.5.5 release 2017-04-20 18:39:03 +02:00
squidfunk 77e972753c Fixed hijacking of browser search 2017-04-20 18:31:41 +02:00
squidfunk a54f57affc Fixed Docker build and added tests 2017-04-16 22:03:53 +02:00
squidfunk c315a786fa Fixed gitter.im link 2017-04-16 00:06:11 +02:00
squidfunk 87538c1745 Prepare 1.5.4 release 2017-04-08 19:18:56 +02:00
Martin Donath 7a6acb8a7b Merge pull request #266 from squidfunk/fix/search-missing-results
Fixed missing search results when only a h1 is present
2017-04-08 19:12:00 +02:00
squidfunk 463fd5202d Removed commented out code 2017-04-08 19:01:27 +02:00
squidfunk 49ac0e2111 Merge branch 'master' into fix/search-missing-results 2017-04-08 18:52:28 +02:00
squidfunk bdf359bafd Remove .travisignore from .travisignore 2017-04-08 18:08:12 +02:00
squidfunk ddab77a120 Re-enable documentation builds [ci skip] 2017-04-08 18:08:12 +02:00
squidfunk 9abb64f1a1 Fixed link in contributing.md [ci skip] 2017-04-08 18:08:12 +02:00
squidfunk 5df7a85618 Fixed unresponsive overlay on android 2017-04-08 16:09:33 +02:00
squidfunk 67bea5e152 Fixed highlighting not working for two or more words 2017-04-08 16:04:09 +02:00
Oscar Vasquez ccde3239f8 Updated link to customization with correct address 2017-04-08 10:37:29 +02:00
squidfunk 5ef40b5e3d Prepare 1.5.3 release 2017-04-07 10:05:33 +02:00
squidfunk b283236770 Fixed missing right spacing on overflow of source container 2017-04-07 00:17:32 +02:00
squidfunk ed0f7b96fe Don't deploy documentation on PR 2017-04-06 23:56:28 +02:00
squidfunk 100f6c0e3b Added support for documentation build on Travis 2017-04-06 23:56:28 +02:00
squidfunk f921f45787 Fixed missing top padding for h1 on 404 page 2017-04-06 17:17:15 +02:00
squidfunk 2ab6083ebe Fixed JavaScript errors on 404 page 2017-04-06 16:23:08 +02:00
squidfunk 5b1bbea2a3 Fixed wrong palette color for focused search result 2017-04-06 11:40:48 +02:00
squidfunk 2c429eb739 Added missing script in package.json 2017-04-05 13:25:16 +02:00
squidfunk 3f1d258cb6 Refactored .travis.yml for simpler release build 2017-04-05 13:25:16 +02:00
squidfunk 315fa4b590 Fixed deprecated calls for template variables 2017-04-05 11:39:13 +02:00
squidfunk 6e5b9d0754 Fixed missing requirements.txt in package 2017-04-05 11:17:14 +02:00
squidfunk 189e403d70 Prepare 1.5.2 release 2017-04-05 11:11:02 +02:00
squidfunk 85d0a82706 Adjusted module name for import 2017-04-04 17:46:12 +02:00
greenkeeper[bot] aa0b80ef9b chore(package): update modularscale-sass to version 3.0.2
Closes #244

https://greenkeeper.io/
2017-04-04 17:46:12 +02:00
squidfunk ecc04128f1 Fixed non-synchronized transitions on search form 2017-04-01 22:45:47 +02:00
greenkeeper[bot] f375dd6f67 chore(package): update flow-bin to version 0.42.0
https://greenkeeper.io/
2017-03-31 00:05:55 +02:00
squidfunk e4f4e630ce Added requirements as explicit dependencies in setup.py 2017-03-30 23:39:02 +02:00
squidfunk a00c8b1fdb Prepare 1.5.1 release 2017-03-30 22:57:22 +02:00
squidfunk 758f07cadc Fixed incorrectly set site url, if given 2017-03-30 22:37:39 +02:00
squidfunk 92d77fd896 Fixed rendering and offset for targetted footnote 2017-03-26 16:33:48 +02:00
squidfunk 0ca71b6e8c Prepare 1.5.0 release 2017-03-24 20:19:23 +01:00
squidfunk 9d066f5f78 Changed keyboard event handlers to key codes for compatibility 2017-03-24 20:02:27 +01:00
squidfunk de54e6e800 Fixed error when search term contained parentheses 2017-03-24 20:02:27 +01:00
squidfunk c732082a1c Reset meta text to placeholder if input is cleared 2017-03-24 20:02:27 +01:00
squidfunk 931465af9f Added keyboard events to search modal 2017-03-24 20:02:27 +01:00
squidfunk 544b1243aa Added prototypical arrow up/down result selection 2017-03-24 20:02:27 +01:00
squidfunk 3c1eb193bc Added new placeholders to documentation [ci skip] 2017-03-24 20:02:27 +01:00
squidfunk 89fff8a6ab Improve search performance 2017-03-24 20:02:27 +01:00
squidfunk 50efda702a Focus search after reset 2017-03-24 20:02:27 +01:00
squidfunk a2ff177885 Added reset button for search 2017-03-24 20:02:27 +01:00
squidfunk da02320bb5 Added files to be ignored in CI [ci skip] 2017-03-16 19:07:45 +01:00
squidfunk 41df5e4d24 Fixed suffix for commit message .githooks 2017-03-16 19:07:45 +01:00
squidfunk 7da699a3fe Test ci-skip script [skip ci] 2017-03-16 19:07:45 +01:00
squidfunk 17f67ae625 Added githook to skip CI build on non-src changes 2017-03-16 19:07:45 +01:00
squidfunk 41ed99c3d3 Test ci-skip script 2017-03-16 19:07:45 +01:00
squidfunk 4e6041364e Test ci-skip script 2017-03-16 19:07:45 +01:00
squidfunk f45e706c55 Fixed permissions on githook 2017-03-16 19:07:45 +01:00
squidfunk 526842404a Test ci-skip script 2017-03-16 19:07:45 +01:00
squidfunk 4cfd1d7d6c Added githook to skip CI build on non-src changes 2017-03-16 19:07:45 +01:00
squidfunk 0f932c0520 Prepare 1.4.1 release 2017-03-16 17:51:46 +01:00
squidfunk c293fcfb42 Fixed invalid destructuring attempt on NodeList 2017-03-16 17:43:41 +01:00
squidfunk a4012cf6f1 Fixed some references in changelog 2017-03-16 17:31:44 +01:00
squidfunk dfc7ed362a Prepare 1.4.0 release 2017-03-16 17:08:04 +01:00
squidfunk de20cdd67f Fixed deprecations for stylelint-order 2017-03-16 16:52:14 +01:00
greenkeeper[bot] e08e828e0a chore(package): update stylelint-order to version 0.4.0
https://greenkeeper.io/
2017-03-16 16:46:07 +01:00
squidfunk d77d900479 Truncate search result text for performance reasons 2017-03-16 16:40:55 +01:00
squidfunk 675a75e000 Normalize placeholder names for search results 2017-03-16 16:12:53 +01:00
squidfunk c4c7beaefa Fixed case where table of contents icon is missing on mobile navigation 2017-03-16 16:12:53 +01:00
Martin Donath 3c1cfa86e0 Merge pull request #217 from squidfunk/refactor/search-results
Improved search interface
2017-03-16 13:04:31 +01:00
squidfunk 7485a2ec50 Switch back to yarn 2017-03-16 12:54:13 +01:00
squidfunk cd64b7372a Switch back to npm temporarily for CI build 2017-03-16 12:46:35 +01:00
squidfunk e54dcba38e Switch back to npm temporarily for CI build 2017-03-16 12:44:05 +01:00
squidfunk be5f4a5658 Try to fix yarn installation on travis 2017-03-16 12:37:23 +01:00
squidfunk 8359c24804 Try to fix yarn installation on travis 2017-03-16 12:36:05 +01:00
squidfunk 71c28f5f0a Try to fix yarn installation on travis 2017-03-16 12:34:47 +01:00
squidfunk 2bd669c7ab Try to fix yarn installation on travis 2017-03-16 12:32:08 +01:00
squidfunk 8f9124bc3f Fix yarn installation failing in CI 2017-03-16 12:16:55 +01:00
squidfunk 536554c18b Added support for search localization 2017-03-16 12:11:00 +01:00
squidfunk 1440c62e57 Adjusted mobile styles for search results 2017-03-14 18:30:33 +01:00
squidfunk ba3565625d Added page grouping for search results 2017-03-12 17:58:34 +01:00
squidfunk f72a88721e Merge branch 'master' into refactor/search-results 2017-03-11 19:52:46 +01:00
squidfunk e8fc5132a1 Prepare 1.3.0 release 2017-03-11 18:55:35 +01:00
squidfunk e00d5fb98a Slightly better distinguishable footnotes 2017-03-11 18:40:44 +01:00
squidfunk 59b2ae1a9d Smaller tweaks on documentation 2017-03-11 18:40:44 +01:00
squidfunk 34b09a6724 Added missing documentation for features 2017-03-11 18:40:44 +01:00
squidfunk b8f4b62b72 Added documentation for edit_uri configuration 2017-03-11 18:40:44 +01:00
squidfunk 7cf5d428a4 Added documentation for Metadata extension 2017-03-11 18:40:44 +01:00
squidfunk 200a28289b Updated changelog 2017-03-11 15:04:50 +01:00
squidfunk 0862c7587f Fixed issues with whitespaces in path for scripts 2017-03-11 15:04:50 +01:00
squidfunk 96efd18c32 Updated yarn lock file 2017-03-11 14:52:23 +01:00
squidfunk fa6a343555 Updated flow type checker dependencies 2017-03-11 14:52:23 +01:00
greenkeeper[bot] 1801dd7b58 chore(package): update yargs to version 7.0.2
Closes #200

https://greenkeeper.io/
2017-03-11 14:52:23 +01:00
squidfunk 159466d448 Removed test code from docs 2017-03-11 14:42:55 +01:00
squidfunk 19fb287cef Implemented source file linkage through metadata 2017-03-11 14:42:55 +01:00
squidfunk d12f17e520 Reduced repaints for header and sidebars 2017-03-11 14:42:55 +01:00
squidfunk 0fa899fe0b Changed sidebar position to absolute to fix repaints with buttons 2017-03-11 14:42:55 +01:00
squidfunk 25b366ce7f Prototype fixing sidebar re-positioning 2017-03-11 14:42:55 +01:00
squidfunk 12e12135c1 Move button into content block 2017-03-11 14:42:55 +01:00
squidfunk a911dd31b3 Added source file links, have to fix repaints 2017-03-11 14:42:55 +01:00
squidfunk 6f64bcc3e1 Prepare 1.2.0 release 2017-03-03 17:10:34 +01:00
squidfunk bbc48e75bf Fixed missing link in tabs navigation on deeply nested items 2017-03-02 16:02:32 +01:00
squidfunk 009b41cdb1 Added quote/cite styles for admonition 2017-02-26 19:55:53 +01:00
squidfunk 0a6e70262b Added help message to build pipeline 2017-02-26 19:44:56 +01:00
squidfunk 68896b1a78 Removed unnecessary dependencies 2017-02-26 19:44:56 +01:00
squidfunk a58904c8c2 Replaced all occurrences of npm with yarn 2017-02-26 19:44:56 +01:00
squidfunk acf74131cc Replace backticks with $() command substitution for portability 2017-02-26 19:44:56 +01:00
squidfunk 253d805352 Fixed navigation link colors when applying palette 2017-02-26 18:14:40 +01:00
squidfunk 7f37798408 Prepare 1.1.1 release 2017-02-26 17:19:30 +01:00
squidfunk fc4a466346 Fixed incorrectly displayed nested lists 2017-02-26 17:12:26 +01:00
squidfunk 8bf2368892 Prepare 1.1.0 release 2017-02-26 15:50:12 +01:00
Martin Donath ca4b8aa94b Merge pull request #187 from squidfunk/refactor/sidebar-height-spacing
Added tabs navigation feature (optional)
2017-02-26 15:35:23 +01:00
squidfunk 842146183d Deactivate tabs by default 2017-02-26 15:30:48 +01:00
squidfunk d52f605200 Refactored and cleaned up partials 2017-02-26 15:06:50 +01:00
squidfunk eb6aedf5cc Added palette colors for tabs 2017-02-26 14:15:21 +01:00
squidfunk 0eee81b048 Added support for tabs 2017-02-26 13:59:54 +01:00
squidfunk 09d579b516 Fixed Gulp build pipeline 2017-02-26 11:55:47 +01:00
squidfunk 2c3ca5aeb4 Merge branch 'master' into refactor/sidebar-height-spacing 2017-02-26 11:04:12 +01:00
greenkeeper[bot] eb66e7f894 chore(package): update lunr to version 1.0.0
https://greenkeeper.io/
2017-02-26 08:56:24 +01:00
Martin Donath 968516a9c8 Merge pull request #186 from squidfunk/chore/flow-type-checking
Integrate static type-checking with JSDoc and Flow
2017-02-25 17:30:02 +01:00
squidfunk aaa3c8d6b4 Trigger new build 2017-02-25 17:25:47 +01:00
squidfunk ac2f924dad Correct indentation [ci skip] 2017-02-25 17:20:38 +01:00
squidfunk c6e5159cc6 Merge branch 'master' into chore/flow-type-checking 2017-02-25 17:18:44 +01:00
squidfunk 2823b2b53d Make githook less chatty 2017-02-25 17:15:18 +01:00
squidfunk 22a2f084a1 Integrated static type-checking via JSDoc and Flow 2017-02-25 17:13:50 +01:00
squidfunk 672a39b697 Fixed issues with JSX.createElement definitions 2017-02-25 14:49:49 +01:00
squidfunk 8f48f0bce6 Fixed inconsistencies in table-styling 2017-02-25 11:36:10 +01:00
squidfunk de3bd8d665 Added disqus integration 2017-02-24 22:58:30 +01:00
squidfunk ad39b98734 Updated badges [ci skip] 2017-02-24 22:05:49 +01:00
squidfunk 26b83b0365 Fixed yarn install routine 2017-02-24 21:33:14 +01:00
squidfunk 0c7f500c41 Fixed before_install routine 2017-02-24 21:33:14 +01:00
squidfunk e55aa3bc77 Polished .travis.yml 2017-02-24 21:33:14 +01:00
squidfunk 43a994245e Restructure install procedure for Travis build 2017-02-24 21:33:14 +01:00
squidfunk bf439d34b7 Install wheel as a dependency for build 2017-02-24 21:33:14 +01:00
squidfunk 604be71a37 Remove branch check temporary to test build 2017-02-24 21:33:14 +01:00
squidfunk 309a951b93 Fixed parse errors in Travis pre-install script 2017-02-24 21:33:14 +01:00
squidfunk 0f7782a321 Updated yarn lock file 2017-02-24 21:33:14 +01:00
squidfunk 521ef0b8ee Fixed parse errors in .travis.yml 2017-02-24 21:33:14 +01:00
squidfunk a9e7a5d421 Added support for automatic builds and releases 2017-02-24 21:33:14 +01:00
squidfunk 7908140dc5 Fixed flow in build process 2017-02-20 23:26:51 +01:00
squidfunk 07e2eb4f85 Tried to rework type safety 2017-02-19 23:33:52 +01:00
squidfunk af4db15a27 Play with flow type checker 2017-02-19 17:19:30 +01:00
squidfunk 3e50c3394a Added support for definition lists 2017-02-19 16:20:39 +01:00
squidfunk 5765619416 Prepare 1.0.5 release 2017-02-18 15:10:19 +01:00
squidfunk 6fcf8d2ec1 Pinned frontend dependencies 2017-02-18 14:57:58 +01:00
squidfunk 5b92b29dc4 Refactored output of git hooks 2017-02-18 14:50:17 +01:00
squidfunk c59d776031 Added removed license text 2017-02-18 14:08:00 +01:00
squidfunk dccfcb8732 Fixed overflowing sidebar and footer scrolling bug 2017-02-18 14:08:00 +01:00
greenkeeper[bot] 281449f418 chore(package): update gulp-changed to version 2.0.0
https://greenkeeper.io/
2017-02-18 13:52:48 +01:00
greenkeeper[bot] b7fa2448a4 chore(package): update stylelint-order to version 0.3.0
https://greenkeeper.io/
2017-02-18 12:55:18 +01:00
squidfunk 8f5aa8ad5f Prepare 1.0.4 release 2017-02-16 23:19:32 +01:00
squidfunk 4927e57c88 Fixed source build for pypi 2017-02-16 23:01:59 +01:00
greenkeeper[bot] 9b471c682f chore(package): update postcss-pseudo-classes to version 0.2.0
https://greenkeeper.io/
2017-02-16 10:06:34 +01:00
squidfunk 18262ce8d2 Disable visual regression tests until less flaky 2017-02-16 09:59:27 +01:00
greenkeeper[bot] 769727e886 chore(package): update autoprefixer to version 6.7.3
https://greenkeeper.io/
2017-02-16 09:59:27 +01:00
greenkeeper[bot] 99bc558d5c chore(package): update babel-loader to version 6.3.1
https://greenkeeper.io/
2017-02-16 09:59:27 +01:00
greenkeeper[bot] b33a92e37b chore(package): update babel-register to version 6.23.0
https://greenkeeper.io/
2017-02-16 09:59:27 +01:00
Martin Donath eadce61e75 Merge pull request #151 from squidfunk/test/missing-navigation-testcases
Added missing navigation testcases
2017-02-12 19:11:29 +01:00
squidfunk 13ab32f631 Updated failing admonition tests 2017-02-12 18:57:55 +01:00
squidfunk e483055e17 Fixed build errors 2017-02-12 18:44:44 +01:00
squidfunk c890255c39 Merge branch 'master' into test/missing-navigation-testcases 2017-02-12 18:36:35 +01:00
squidfunk 5e5b680fa0 Added final tests for navigation 2017-02-12 18:31:05 +01:00
squidfunk 0975c7d1be Added further tests for navigation 2017-02-12 17:10:05 +01:00
squidfunk 31836391e1 Added further tests for navigation 2017-02-12 16:53:04 +01:00
squidfunk 6a68347a87 Merge branch 'master' into refactor/sidebar-height-spacing 2017-02-11 23:02:12 +01:00
squidfunk c9a7019333 Added SauceLabs test results integration 2017-02-11 21:34:16 +01:00
squidfunk b6b5904a7a Restructure package.json to separate test deps from dev deps 2017-02-11 16:26:23 +01:00
squidfunk 80fe7e010d Migrate build pipeline to Webpack 2 2017-02-11 16:26:23 +01:00
greenkeeper[bot] 7c36b5c4ef chore(package): update webpack to version 2.2.1
https://greenkeeper.io/
2017-02-11 14:52:13 +01:00
Martin Donath 099799cdf5 Merge pull request #147 from squidfunk/chore/setup-gemini-test-environment
Setup visual regression testing
2017-02-11 14:37:03 +01:00
squidfunk 854663ff03 Update baseline for Edge and adjust run script 2017-02-11 14:22:37 +01:00
squidfunk 885053bfbd Removed webfonts for visual tests 2017-02-10 16:43:32 +01:00
squidfunk 0cfee35151 Disable artifacts debug 2017-02-10 16:01:38 +01:00
squidfunk 89c68b03f0 Debug travis build 2017-02-10 15:35:34 +01:00
squidfunk ee198dd6d2 Debug travis build 2017-02-10 15:27:05 +01:00
squidfunk 401b512dda Debug travis build 2017-02-10 15:19:39 +01:00
squidfunk 4fc2a6c02e Enable HTML report in Travis build 2017-02-10 15:06:23 +01:00
squidfunk 7199f7ad6c Try to fix artifact paths 2017-02-10 14:54:57 +01:00
squidfunk 8792079cb3 Test upload of build artifacts 2017-02-10 14:44:43 +01:00
squidfunk 26d2ae36e3 Set retries to 0 2017-02-10 14:20:34 +01:00
squidfunk 2b0b90c5e9 Increase CIEDE2000 tolerance for edge 2017-02-10 13:59:36 +01:00
squidfunk c8ffa5203a Travis must build non-optimized assets due to pseudo classes 2017-02-10 10:50:34 +01:00
squidfunk f1ee7add1c Force travis to rebuild 2017-02-10 10:36:20 +01:00
squidfunk 78d7cdaf0b Updated visual test baseline 2017-02-10 10:30:14 +01:00
squidfunk 9028461c72 Removed IE10 from test matrix, as it doesn't support dataset 2017-02-09 19:40:32 +01:00
squidfunk d75aec1b7e Make tests run on Node.js 5 2017-02-09 19:01:23 +01:00
squidfunk 0beec63367 Ensure Gemini terminates with exit status 1 on failing build 2017-02-09 18:28:33 +01:00
squidfunk 57871449ea Fixed missing yarn in Travis 2017-02-09 18:10:27 +01:00
squidfunk 038288d489 Try to speed up build 2017-02-09 18:07:11 +01:00
squidfunk 3e2fa37250 Fixed case where there were no states defined 2017-02-09 17:49:13 +01:00
squidfunk 7e601d485a Refactored test filtering via grep CLI option 2017-02-09 17:35:50 +01:00
squidfunk 0bff78cd1b Added script to open a SauceConnect tunnel for manual testing 2017-02-09 11:12:56 +01:00
squidfunk 1fc01efe8b Fixed Edge specification in Gemini configuration 2017-02-09 10:35:06 +01:00
squidfunk 641b4ca13d Added visual test baseline for missing browsers 2017-02-09 10:34:28 +01:00
squidfunk cbb8567c76 Added visual test baseline for Firefox 2017-02-09 09:51:46 +01:00
squidfunk 70154b6047 Only build on Node.js 7 once 2017-02-09 00:51:53 +01:00
squidfunk d78e4e6a0b Integrate Gemini tests into Travis 2017-02-09 00:45:01 +01:00
squidfunk 52a3761d65 Added further tests for navigation 2017-02-09 00:02:07 +01:00
squidfunk 07329f4304 Merge branch 'master' into chore/setup-gemini-test-environment 2017-02-08 23:30:46 +01:00
squidfunk f40585f528 Fixed Jinja error for raw HTML header tags 2017-02-08 23:17:37 +01:00
squidfunk 9e3403ee4f Fixed stylelint deprecations 2017-02-05 23:51:32 +01:00
squidfunk 76a383fb1b Set minimal node version to 5 because of css-mqpacker 2017-02-05 23:51:32 +01:00
squidfunk d4c796c73e Switch Travis to yarn 2017-02-05 23:51:32 +01:00
squidfunk 64bd1d141a Pin dependencies by switching to yarn 2017-02-05 23:51:32 +01:00
squidfunk 551138e7c1 Setup SauceConnect tunnel for Gemini testing 2017-02-05 22:46:45 +01:00
squidfunk 7d94975960 Fixed navigation tests 2017-02-02 00:40:36 +01:00
squidfunk 8a7d9001fd Added tests for navigation and improved test generation logic 2017-02-01 23:56:57 +01:00
Martin Donath 55cae2d1f1 Merge pull request #134 from squidfunk/greenkeeper/selenium-standalone-6.0.0
Update selenium-standalone to the latest version 🚀
2017-01-29 22:05:27 +01:00
greenkeeper[bot] 4fe26f24db chore(package): update selenium-standalone to version 6.0.0
https://greenkeeper.io/
2017-01-29 17:34:15 +00:00
squidfunk 87c440c003 Remove JSDoc warning for now 2017-01-28 23:52:07 +01:00
squidfunk ef7b07a90e Linter warnings should fail pre-commit hook 2017-01-28 23:51:34 +01:00
squidfunk 17808d964d Visual test setup up and running 2017-01-28 23:50:33 +01:00
squidfunk 7d46ed2a85 Set PyMdown requirement to 1.2 2017-01-28 20:32:13 +01:00
squidfunk 3783eceb09 Implemented Gemini screenshot testing base 2017-01-28 20:25:30 +01:00
squidfunk 8f46cc6f09 Removed static test fixtures 2017-01-28 19:18:15 +01:00
squidfunk 0eb24a04ae Merge branch 'master' into chore/setup-gemini-test-environment 2017-01-28 17:57:37 +01:00
squidfunk c4ba189c05 Only show active subsection on screen when tabs are active 2017-01-28 17:56:34 +01:00
squidfunk 79f277c8fe Activate root tab when there'e an active page on the root level 2017-01-27 23:54:52 +01:00
squidfunk 9a36dd67b2 Remove headerlink on top-level headline again 2017-01-27 23:37:24 +01:00
squidfunk 82a98ae9d3 Reduce repaints on scroll with new tabs 2017-01-27 23:21:41 +01:00
squidfunk c994ce1dd9 Fixed a bug with breakpoints and sidebar height 2017-01-27 23:09:31 +01:00
squidfunk 1655f18a20 Merge branch 'master' into refactor/sidebar-height-spacing 2017-01-27 22:45:22 +01:00
squidfunk 4c4edff9cb Cleaned up and refactored tabs implementation 2017-01-27 22:41:55 +01:00
Martin Donath 4997d1f63c Merge pull request #133 from squidfunk/greenkeeper/node-notifier-5.0.0
Update node-notifier to the latest version 🚀
2017-01-27 22:41:26 +01:00
squidfunk fc900aa4b5 Speed up build by lazy-loading Gulp 2017-01-27 22:40:09 +01:00
greenkeeper[bot] cae45a60b3 chore(package): update node-notifier to version 5.0.0
https://greenkeeper.io/
2017-01-27 19:43:51 +00:00
squidfunk 53e1977c65 Only directly show shadow on header, in case JS is not available 2017-01-26 23:20:38 +01:00
squidfunk 33616c7deb Merge branch 'master' into refactor/sidebar-height-spacing 2017-01-26 23:08:31 +01:00
squidfunk 25e1960511 Added dynamic box shadow on header 2017-01-26 22:58:24 +01:00
squidfunk 758ae36c92 Fixed offsets of targetted headlines 2017-01-26 22:39:42 +01:00
squidfunk e9af74f3df Merge branch 'master' of github.com:squidfunk/mkdocs-material into refactor/sidebar-height-spacing 2017-01-26 21:33:49 +01:00
squidfunk c3231f1a9e Increased sidebar font size 2017-01-26 21:30:19 +01:00
squidfunk fc71fd4c71 Added style for tabs 2017-01-26 21:18:31 +01:00
squidfunk 71b300aaa1 Added possibility to add tabs 2017-01-26 21:10:52 +01:00
squidfunk 2c3ae17131 Refactored sidebar/container spacing for arbitrary height elements above content 2017-01-26 14:20:40 +01:00
squidfunk 8b28c1f5a1 Proof-of-concept search highlighting 2017-01-25 00:43:01 +01:00
squidfunk f474f63d6b Merge master into HEAD 2017-01-24 23:29:22 +01:00
squidfunk aa8b3a6cf7 Added string pre-processing step to indexing 2017-01-24 23:25:49 +01:00
squidfunk b04c3d1354 Merge branch 'master' into chore/setup-gemini-test-environment 2017-01-22 14:10:43 +01:00
squidfunk b09e334f3f Fix requirement for Math.sign 2017-01-22 13:59:23 +01:00
squidfunk f71359ce65 Prepare 1.0.3 release 2017-01-22 13:42:44 +01:00
squidfunk 80be8bb1ec Added mkdocs.yml as a requirement to issue template 2017-01-22 13:37:46 +01:00
Martin Donath 38f0099fc8 Merge pull request #123 from squidfunk/greenkeeper/babel-preset-es2015-6.22.0
Update babel-preset-es2015 to version 6.22.0
2017-01-22 13:22:01 +01:00
Martin Donath 4186b7b7f8 Merge branch 'master' into greenkeeper/babel-preset-es2015-6.22.0 2017-01-22 13:16:06 +01:00
greenkeeper[bot] bb9e1eb3df chore(package): update eslint to version 3.14.0
https://greenkeeper.io/
2017-01-22 13:15:42 +01:00
squidfunk 32ffc58d12 Track scroll direction to reset index cache 2017-01-22 13:05:12 +01:00
greenkeeper[bot] 2e228af92d chore(package): update babel-preset-es2015 to version 6.22.0
https://greenkeeper.io/
2017-01-20 00:45:17 +00:00
squidfunk 28d024af2f Try to fix travis 2017-01-18 23:32:56 +01:00
squidfunk 21f2617c9c Remove ... on hooks 2017-01-18 23:26:22 +01:00
squidfunk 203087bcb1 Initial setup of Gemini and first testcases 2017-01-18 23:23:45 +01:00
squidfunk 680725ed3a Revert last PR - still some problems to tackle 2017-01-16 00:35:00 +01:00
Martin Donath 1e61603b4e Merge pull request #115 from squidfunk/refactor/remove-unnecessary-sidebar-logic-and-styles
Remove unnecessary sidebar logic and styles
2017-01-16 00:22:46 +01:00
squidfunk f51f3c453d Re-add content of index page 2017-01-16 00:19:45 +01:00
squidfunk 61533af0ef No more need for csscalc and container height adjustment logic 2017-01-16 00:18:21 +01:00
Martin Donath 62ff9d0ac0 Merge pull request #114 from squidfunk/fix/drawer-not-opening-on-mobile
Scrollwrap must be stretched to full height for mobile
2017-01-15 15:17:40 +01:00
squidfunk 460164b560 Scrollwrap must be stretched to full height for mobile 2017-01-15 15:14:08 +01:00
Martin Donath 9d24e6880b Merge pull request #113 from squidfunk/refactor/reduce-repaints-for-sidebar
Reduce repaints for sidebar
2017-01-15 15:04:08 +01:00
squidfunk ceea88e066 Only set shadow on search results when active 2017-01-15 15:00:38 +01:00
squidfunk ed1ae7226a Further reduction of repaints by refactoring sidebar 2017-01-15 14:57:06 +01:00
Martin Donath f81a0c578a Merge pull request #112 from squidfunk/chore/prepare-1-0-2-release
Prepare 1.0.2 release
2017-01-15 11:30:23 +01:00
squidfunk 96168d05d8 Added 1.0.2 to changelog and release notes 2017-01-15 11:27:48 +01:00
squidfunk c691fff501 Prepare 1.0.2 release 2017-01-15 11:24:32 +01:00
Martin Donath c101debc8c Merge pull request #111 from squidfunk/chore/centralize-package-specs
Load package specs in setup.py from package.json
2017-01-14 23:09:11 +01:00
squidfunk 65d725f260 Load package specs in setup.py from package.json 2017-01-14 23:05:18 +01:00
Martin Donath 040d3a303c Merge pull request #110 from squidfunk/fix/scrollbar-appears-while-animating-repo-facts
Setting overflow to hidden removes appearing scrollbar
2017-01-14 22:58:46 +01:00
squidfunk 823b24aa9c Setting overflow to hidden removes appearing scrollbar 2017-01-14 22:55:58 +01:00
Martin Donath e3ac58a7c6 Merge pull request #109 from squidfunk/fix/horizontal-scrollbar-in-content-area
Remove float on inner content area
2017-01-14 22:45:06 +01:00
squidfunk e0855d4002 Remove float on inner content area 2017-01-14 22:40:55 +01:00
Martin Donath b54813ffd8 Merge pull request #107 from squidfunk/chore/prepare-1.0.1-release
Prepare 1.0.1 release
2017-01-14 20:26:50 +01:00
squidfunk 5593f99c14 Prepare 1.0.1 release 2017-01-14 20:22:09 +01:00
Martin Donath a463798593 Merge pull request #106 from squidfunk/fix/logo-not-hidden-on-mobile
Hide logo on mobile
2017-01-14 20:19:39 +01:00
squidfunk c55cf5cba9 Hide logo on mobile 2017-01-14 20:13:10 +01:00
Martin Donath 5257fe67a6 Merge pull request #105 from squidfunk/fix/only-show-scrollbars-on-overflow
Set overflow property to auto
2017-01-14 19:50:55 +01:00
squidfunk 180da60770 Set overflow property to auto 2017-01-14 19:48:00 +01:00
Martin Donath 7fd5811bf1 Merge pull request #104 from squidfunk/chore/dockerize
Updated Dockerfile and added documentation
2017-01-14 19:33:48 +01:00
squidfunk eea4ebdaf4 Updated Dockerfile and added documentation 2017-01-14 19:24:07 +01:00
Martin Donath 7b653fac4e Merge pull request #102 from squidfunk/fix/footnote-back-reference-position
Fixed footer back reference positions
2017-01-14 18:46:21 +01:00
squidfunk 7178bb4180 Fixed footer back reference positions 2017-01-14 18:42:07 +01:00
Martin Donath 87bc1c8ef9 Merge pull request #101 from squidfunk/chore/pre-commit-hook-for-branch-check
Forbid commits on master branch
2017-01-14 18:17:29 +01:00
squidfunk 99b057a9ae Use $(..) instead of `` 2017-01-14 18:12:57 +01:00
squidfunk 9633f69b74 Forbid commits on master branch 2017-01-14 18:06:03 +01:00
Martin Donath 7661631e3e Merge pull request #100 from squidfunk/fix/massive-repaints-when-scrolling
Massive repaints when scrolling
2017-01-14 13:59:44 +01:00
squidfunk 2ba776bb0e Added compiled output 2017-01-14 13:56:33 +01:00
Martin Donath e37f517240 Merge pull request #99 from squidfunk/docs/format-notes-on-chocolatey
Format notes on Chocolatey installation
2017-01-14 13:48:46 +01:00
squidfunk c0fe88004a Fix link reference 2017-01-14 13:44:23 +01:00
squidfunk 6f324afb37 Put choco under general installation procedures 2017-01-14 13:43:19 +01:00
Martin Donath cf17f3b71e Merge pull request #98 from pascalberger/chocolatey
Add documentation how to install using Chocolatey
2017-01-14 12:53:42 +01:00
Pascal Berger 9ecc9aa8c9 Add documentation how to install using Chocolatey 2017-01-14 12:48:56 +01:00
squidfunk e68f54c79f Setup Gemini for visual regression testing 2017-01-13 17:34:39 +01:00
squidfunk 4086c2c973 Fixed massive repaints when scrolling 2017-01-13 13:02:28 +01:00
squidfunk 364309d47a Restructured partials 2017-01-13 00:31:37 +01:00
squidfunk f850641437 Fixed IE bug leading to non-expanding navigation 2017-01-13 00:09:16 +01:00
squidfunk 0a08b2b1cd Link image to demo [ci skip] 2017-01-12 22:43:52 +01:00
squidfunk 57d2a4e4a5 Updated README and landing page 2017-01-12 22:39:18 +01:00
squidfunk 23be61a803 Prepare Dockerfile for official container 2017-01-12 21:01:47 +01:00
squidfunk b894452360 Updated README [ci skip] 2017-01-12 20:58:19 +01:00
squidfunk c7ace3eba9 Updated dependencies to latest stable releases 2017-01-12 20:54:20 +01:00
Martin Donath 6e0f5799b4 Merge pull request #93 from squidfunk/rework
Merge rework into master for 1.0.0 release
2017-01-12 20:36:29 +01:00
squidfunk a4b8bba3e0 Prevent pre-commit hook from triggering on JSON 2017-01-12 20:20:56 +01:00
squidfunk e5831239e2 Merge branch 'master' into rework
Conflicts:
	package.json
2017-01-12 20:17:33 +01:00
squidfunk c61a6179f0 Updated documentation 2017-01-12 20:15:30 +01:00
squidfunk ce9ca56142 Update README and index page 2017-01-12 00:49:28 +01:00
squidfunk 1a32e9b7e3 Remove icon ligatures from HTML to fix search indexing 2017-01-11 23:49:36 +01:00
squidfunk b32084bf8b Fix typo in CodeHilite [ci skip] 2017-01-11 23:31:36 +01:00
squidfunk 2dbf60affd Don't break links inside tables 2017-01-10 00:19:51 +01:00
squidfunk cecd1f1d7c Drop 'with' in templates to be compatible with Jinja < 2.9 2017-01-10 00:15:44 +01:00
squidfunk 6033519d15 Added max-width for iframe and svg 2017-01-10 00:02:37 +01:00
squidfunk 6696f09444 Fix documentation on CodeHilite 2017-01-09 23:55:04 +01:00
squidfunk bfca02762d Fix target offset for footnotes 2017-01-09 23:43:11 +01:00
squidfunk 7a6db53801 Set SVGs to inherit fill color for easier styling 2017-01-09 22:51:18 +01:00
squidfunk fcbe7f6384 Improved contrast for code blocks 2017-01-09 22:46:19 +01:00
squidfunk a2ff959ab3 Added disclaimer for EmojiOne 2017-01-09 22:34:04 +01:00
squidfunk 7fd950872c Replace GitHubEmoji with Emoji 2017-01-09 22:25:15 +01:00
squidfunk cb9a563a78 Add access key attribute to search input 2017-01-09 22:13:13 +01:00
squidfunk 3568043dea Added block styles for critic extension 2017-01-09 22:10:09 +01:00
squidfunk 6136fc905f Fixed MathJax configuration example 2017-01-09 21:58:29 +01:00
squidfunk cb5d51e7c1 Fix wrong customization documentation on MathJax 2017-01-09 21:52:04 +01:00
squidfunk 82b8c71059 Removed automatic MathJax inclusion 2017-01-09 21:41:30 +01:00
squidfunk 660844cb3c Adjusted ignored files for ESLint 2017-01-09 20:33:25 +01:00
squidfunk 8a8fe982e2 Updated changelog and added release notes 2017-01-08 23:21:45 +01:00
Martin Donath b5a7759b0a Merge pull request #89 from squidfunk/greenkeeper/gulp-sourcemaps-2.2.2
Update gulp-sourcemaps to the latest version 🚀
2017-01-08 20:43:39 +01:00
squidfunk 0258fe6bcf Merge branch 'master' into rework
Conflicts:
	.travis.yml
2017-01-08 20:41:56 +01:00
squidfunk 07f3440f42 Remove node 0.11 from Travis build matrix 2017-01-08 20:37:09 +01:00
greenkeeper[bot] 59605d0e0c chore(package): update gulp-sourcemaps to version 2.2.2
https://greenkeeper.io/
2017-01-08 19:30:44 +00:00
squidfunk 6d01f17193 Fix icons and build due to jinja changes 2017-01-08 18:27:01 +01:00
squidfunk 03604c5e27 Added some inline documentation fixes 2017-01-07 20:23:04 +01:00
squidfunk 46474cc7c0 Update contribution guidelines for GitHub 2017-01-07 20:08:49 +01:00
squidfunk efff866b62 Added documentation on contribution + some formatting 2017-01-07 20:07:41 +01:00
squidfunk aca699f2cb Added documentation on localization 2017-01-07 18:54:03 +01:00
squidfunk ebff8b795b Fix widths for media queries in JavaScript 2017-01-07 18:02:21 +01:00
squidfunk d53945a89a Fix search bar offset when there's no repository information 2017-01-06 19:31:56 +01:00
squidfunk 60624bfa82 Localize edit button and hide on print 2017-01-06 19:18:17 +01:00
squidfunk f37bb76d18 Update copyright 2017-01-06 19:11:18 +01:00
squidfunk fde28c3f47 Put repo block definition in source.html 2017-01-06 19:08:09 +01:00
squidfunk 56207162fe Adjust maximum grid width so 80 char code fits without overflow 2017-01-06 19:04:52 +01:00
squidfunk 41121cf582 Keep colors when printing 2017-01-06 18:57:43 +01:00
squidfunk 4d4e869f02 Add titles to links in footer 2017-01-06 18:52:12 +01:00
squidfunk 42d6525c50 Bring back i18n 2017-01-06 18:48:32 +01:00
squidfunk b273c429d9 Fixed basic authentication for search index retrieval 2017-01-06 18:19:15 +01:00
squidfunk 33c183754c Added iOS overflow scrolling to MathJax integration 2017-01-05 08:37:54 +01:00
squidfunk 45208dea73 Fixed: admonition codes did not match those of RTD theme 2017-01-05 08:31:58 +01:00
squidfunk f56b070909 Fixed: Failing MkDocs build does not result in build error 2017-01-05 08:20:40 +01:00
squidfunk 01054414c8 Fixed #79: Modularized social links integration 2017-01-04 20:16:12 +01:00
squidfunk 0198e5e98e Fixes #84: Icon overlaps text in mobile menu 2017-01-04 19:47:41 +01:00
Martin Donath e3fa0ebd87 Merge pull request #83 from brendo/fix-metadata
Remove metadata from mkdocs.yml, allow mkdocs to build again
2017-01-04 07:47:29 +01:00
Brendan Abbott 29f96ca61f Remove metadata from mkdocs.yml, allow mkdocs to build again 2017-01-04 11:20:47 +10:00
squidfunk ddd7e33581 Correct text alignment in tables 2017-01-03 22:22:30 +01:00
squidfunk 9617716652 Fix broken selectors for numeric anchors 2017-01-03 22:12:49 +01:00
squidfunk b22e571f31 Fixes #77: Replace linebreak in footer with CSS solution 2017-01-03 20:57:59 +01:00
squidfunk 06076d2ab5 Removed empty metadata description from docs 2017-01-03 20:47:00 +01:00
squidfunk 510c0fdf5e Added styles for abbreviations 2017-01-03 20:45:40 +01:00
squidfunk 6806139d38 Fixed #82: Long links don't break 2017-01-03 20:23:11 +01:00
squidfunk c6946350a9 Merged master into rework 2017-01-02 23:22:16 +01:00
squidfunk 5f5a82e718 Remove unfinished test infrastructure until after release 2017-01-02 23:18:44 +01:00
squidfunk 1e590ba872 Updated documentation for 1.0.0 2017-01-02 23:11:32 +01:00
squidfunk 983e5bbf72 Simplify table styles 2017-01-02 22:41:15 +01:00
squidfunk 344ce1f4fa Make theme installable 2017-01-02 08:58:18 +01:00
squidfunk 9e6d347db0 Fix deprecation warning 2017-01-02 08:57:19 +01:00
squidfunk 232e997ddc Replaced SASS Lint with Stylelint 2017-01-01 15:59:44 +01:00
squidfunk 425daf1156 Test caching in Travis 2016-12-31 18:05:31 +01:00
squidfunk 3bc52f0b53 Test caching of dependencies on Travis 2016-12-31 18:01:59 +01:00
Martin Donath 662a2d3343 Merge pull request #75 from squidfunk/greenkeeper/update-all
Update dependencies to enable Greenkeeper 🌴
2016-12-31 17:55:04 +01:00
greenkeeper[bot] 59281d63f2 chore(package): update dependencies
https://greenkeeper.io/
2016-12-31 16:52:27 +00:00
squidfunk 9f71d0a220 Merge branch 'rework' of github.com:squidfunk/mkdocs-material into rework 2016-12-30 21:12:51 +01:00
squidfunk ca0de52b45 Fix rendering of empty pane in mobile navigation when no headlines are given 2016-12-30 21:11:05 +01:00
Martin Donath 8e51451366 Correct typo in contribution guidelines [ci skip] 2016-12-29 19:06:47 +01:00
squidfunk 6e69387b3d Merge branch 'master' into rework 2016-12-29 18:36:02 +01:00
squidfunk 313424a521 Add contribution guidelines 2016-12-29 18:35:07 +01:00
squidfunk d7ba0134a0 Fix link reference in codehilite documentation [ci skip] 2016-12-29 17:58:36 +01:00
squidfunk dc48b06500 Remove non-sense front matter from getting started guide 2016-12-29 17:57:02 +01:00
squidfunk 1248237d60 Updated getting started guide [ci skip] 2016-12-29 17:55:08 +01:00
squidfunk 763c23eebb Fix footnotes pseudo elements for offsets 2016-12-29 17:43:22 +01:00
squidfunk 67b2d84519 Ensure non-conflicting cache entries for loading data from GitHub 2016-12-29 15:31:56 +01:00
squidfunk db4a8340d8 Fix sizing of logo in drawer 2016-12-29 15:03:18 +01:00
squidfunk 5ef3ec7aa3 Add scrollfix for iOS 2016-12-29 14:19:26 +01:00
squidfunk 9edf730873 Close search modal on anchor click 2016-12-29 12:49:45 +01:00
squidfunk 9f8ef33545 Add scroll shadow to drawer 2016-12-29 12:10:51 +01:00
squidfunk a1105b81f1 CSS fixes for Firefox 2016-12-29 11:48:59 +01:00
squidfunk 9f3dde3957 Polyfill custom event creation for IE9-11 2016-12-29 10:50:19 +01:00
squidfunk acece94694 Fix output of HTML minifier 2016-12-29 10:27:25 +01:00
squidfunk 584a59ef8b Remove 'x' on search input in IE 2016-12-28 19:00:04 +01:00
squidfunk db73d4863a Compatibility update for Internet Explorer 2016-12-28 18:54:26 +01:00
squidfunk 3f5957bd01 Fix source repository SVG sizing in IE/Edge 2016-12-28 17:59:29 +01:00
squidfunk 4ed0b1328f Add ESC handler to search modal 2016-12-28 17:32:56 +01:00
squidfunk 9d4a8409f9 Fix search mode 2016-12-28 17:13:07 +01:00
squidfunk 5ee95e4fe2 Better tints for source inside drawer + lighter footer credits 2016-12-28 16:54:59 +01:00
squidfunk 3222ec5a6e Truncate search results only for display 2016-12-28 16:37:50 +01:00
squidfunk 5e97b74471 Hide nav titles in collapsible navigation 2016-12-28 16:28:40 +01:00
squidfunk f4c5344116 Finishing touches on drawer 2016-12-28 16:20:52 +01:00
squidfunk b3fcd629a3 Make logo configurable via mkdocs.yml 2016-12-28 15:32:26 +01:00
squidfunk 27808a4899 Keep SVG optimizer from removing IDs 2016-12-28 14:58:42 +01:00
squidfunk 1e35478b44 Add config.extra.repo_icon option for source icon 2016-12-28 14:50:11 +01:00
squidfunk 6364de1a2d Inline source repository SVGs 2016-12-28 14:47:53 +01:00
squidfunk 113ba5fd8b Fix initialization logic of toc blurring 2016-12-28 12:32:03 +01:00
squidfunk 96ae06f25c Fix initialization logic of sidebar 2016-12-28 12:24:42 +01:00
squidfunk 84dd88af69 Re-add edit link 2016-12-28 12:11:04 +01:00
squidfunk e1310aa9ee Add -webkit-overflow-scrolling via JavaScript on navigation 2016-12-28 11:49:57 +01:00
squidfunk be5c94128d Replace icons in mobile navigation with right chevrons 2016-12-28 10:21:25 +01:00
squidfunk dd59ed1f00 Remove anchor on h1, as it doesn't make any sense 2016-12-27 16:20:55 +01:00
squidfunk 36ac36c56a Fix anchor offsets for nav blurring 2016-12-27 16:10:06 +01:00
squidfunk 64874a9583 Correct wrong value for background-color 2016-12-27 12:46:07 +01:00
squidfunk 02296f6605 Full integration with PyMdown extensions 2016-12-27 12:26:25 +01:00
squidfunk 124a6b2438 Put webfonts into separate template block and init fonts 2016-12-27 10:56:13 +01:00
squidfunk fc024da6e1 Refactored githook for pre-commit linting 2016-12-27 10:32:02 +01:00
squidfunk b812c54f66 All dependencies are dev dependencies 2016-12-27 10:20:35 +01:00
squidfunk 5b5bc03600 Set required mkdocs version to >= 0.16 2016-12-27 10:19:35 +01:00
squidfunk 127b98b009 Merge branch 'rework' of github.com:squidfunk/mkdocs-material into rework 2016-12-26 23:13:29 +01:00
squidfunk e627f40b11 Replace-merge master into rework 2016-12-26 23:11:37 +01:00
squidfunk fd6ddc7eb8 Remove unavailable accent color buttons from docs [ci skip] 2016-12-26 19:46:55 +01:00
squidfunk 2cb7e30568 Perform line break only when there is a copyright banner 2016-12-26 18:52:25 +01:00
squidfunk 457315315b Small visual fixes for new footer meta section 2016-12-26 18:34:42 +01:00
squidfunk c0fcd8f8c5 Integrated social icons and moved copyright banner below footer navigation 2016-12-26 18:26:34 +01:00
squidfunk e08802aed1 Correct footer padding so that it matches header padding 2016-12-26 14:54:10 +01:00
squidfunk f6d9a91995 Unify access via data attributes 2016-12-26 14:47:50 +01:00
squidfunk 72cfa5b7bc Credit source for variable-height sticky footers [ci skip] 2016-12-26 14:34:17 +01:00
squidfunk 5000e3ee8d Refactored wrapper structure to allow variable-sized sticky footer 2016-12-26 14:31:16 +01:00
squidfunk de177ca0c5 Corrected formatting of transition definitions 2016-12-24 15:16:21 +01:00
squidfunk d86dadf4bd Fix height when main content is shorter than sidebar 2016-12-24 08:10:55 +01:00
squidfunk 13b55fa165 Fix off-by-one error in anchor blurring logic 2016-12-24 07:24:42 +01:00
squidfunk 7702904526 Set max-width for images in typesetted content 2016-12-19 18:32:48 +01:00
Martin Donath f2662fad38 Merge pull request #70 from brendo/fix-no-repo-header
Handle when no config.repo_url is available
2016-12-19 18:18:23 +01:00
Martin Donath df4351e6bc Merge pull request #72 from brendo/easier-templating
Add a 'header' template block for easier customisation
2016-12-19 18:17:30 +01:00
Martin Donath 101078f313 Merge pull request #71 from brendo/better-responsive-meta
Allow a user to scale the site if they'd like
2016-12-19 18:16:36 +01:00
Brendan Abbott 5783e9de08 Add a 'header' template block for easier customisation 2016-12-19 16:20:09 +10:00
Brendan Abbott bf98f49819 Allow a user to scale the site if they'd like 2016-12-19 15:44:52 +10:00
Brendan Abbott 6dd7789a2a Only request facts if a repo is present 2016-12-19 14:08:40 +10:00
Brendan Abbott 66f8aae310 Handle when no config.repo_url is available 2016-12-19 13:57:45 +10:00
squidfunk d2285b4d92 Prepare 1.0.0-beta release 2016-12-18 19:42:08 +01:00
squidfunk 91c4926fe3 Fix highlight colors for navigation links 2016-12-18 14:22:08 +01:00
squidfunk 2ae22c2e3b Added pandoc table styles to specimen 2016-12-18 14:02:20 +01:00
squidfunk 2c8a324324 Integrated data table styles from 0.2.x 2016-12-18 13:29:03 +01:00
squidfunk be2532d47f Rename bin to scripts to avoid confusion 2016-12-17 13:04:57 +01:00
squidfunk bb9a4a752d Fix specificity problem for permalinks color 2016-12-17 13:00:15 +01:00
squidfunk 41fb9cd97a Integrated palettes from 0.2.x 2016-12-17 12:53:24 +01:00
squidfunk b44c503008 Refactored search result styles 2016-12-16 09:21:31 +01:00
Martin Donath a74a025f47 Merge pull request #68 from brendo/fix-edit-uri
Build the assets so the edit link work
2016-12-16 09:01:43 +01:00
Brendan Abbott c31f1c6125 Build the assets so the edit link work, change base to 'rework' branch (for now) 2016-12-16 10:46:52 +10:00
squidfunk ee36e2368f Remove gcc/g++ dependency from CI build 2016-12-15 20:12:45 +01:00
squidfunk 3a73abad08 Added breadcrumbs in header 2016-12-15 20:04:30 +01:00
squidfunk 420b841ecf Bring back h1 headline handling from 0.2.4 2016-12-15 18:29:46 +01:00
Martin Donath 5e6f5d9089 Merge pull request #66 from brendo/specimen-updates
Specimen updates
2016-12-15 16:52:06 +01:00
Martin Donath ab99591d76 Merge branch 'rework' into specimen-updates 2016-12-15 16:48:42 +01:00
squidfunk fe12548f8e Merge pull request #65 from brendo:issue-63-mkdocs-016-compatible 2016-12-15 16:43:40 +01:00
squidfunk 49020c51ae Remove unused import 2016-12-15 15:58:53 +01:00
squidfunk 2fcfb551be Refactored JavaScript architecture 2016-12-15 15:55:40 +01:00
Brendan Abbott 9eae3956b7 Correct table styles, fix inline code link style 2016-12-03 15:17:42 +10:00
Brendan Abbott e1a24279a7 Update specimen, add inlinehilite content 2016-12-03 14:54:08 +10:00
squidfunk 65f23355c8 Added support for tasklist and critic extension + em fixes 2016-11-05 23:26:07 +01:00
Martin Donath 406883a236 Merge pull request #61 from tusbar/add-search-i18n
Allow translating search bar placeholder
2016-11-05 14:54:49 +01:00
Bertrand Marron 34a5779628 Allow translating search bar placeholder
Add `extra.i18n.search` variable.
2016-11-05 13:59:47 +01:00
squidfunk 528afd7d7f Remove unused import from mkdocs task 2016-11-02 19:33:49 +01:00
squidfunk 0d5e66d9a5 Refactored JavaScript into components 2016-11-02 19:21:14 +01:00
squidfunk 21720f1283 Switch to /Volumes/Shipwreck/github/squidfunk/mkdocs-material-experimental/node_modules/.bin 2016-11-02 09:18:00 +01:00
squidfunk 18fd27024c Added lighter and smoother styles for admonition 2016-11-01 21:38:06 +01:00
squidfunk 971aa3de0b Keep colored output of mkdocs server 2016-11-01 20:57:30 +01:00
squidfunk 2e9b339d84 Set expanded variables to backticks [ci skip] 2016-11-01 20:32:28 +01:00
squidfunk 2cd7f3de6e Make paths in bin absolute 2016-11-01 20:30:28 +01:00
squidfunk 23ebd31b30 Added missing return into task load helper 2016-10-31 17:10:31 +01:00
squidfunk ee91b92c4a Fix wrong path in scripts + try user-level install for pip 2016-10-31 10:16:26 +01:00
squidfunk 00b289bc0e Added double brackets to scripts 2016-10-31 10:06:50 +01:00
squidfunk cedc65d9fa Fix linter errors and warnings 2016-10-31 09:58:43 +01:00
squidfunk bcf634faa8 Added mkdocs to requirements.txt 2016-10-31 09:32:05 +01:00
squidfunk 3fbb56d9cf Moved scripts into bin 2016-10-30 19:30:55 +01:00
squidfunk 1bb5eb631c Add sudo to fix issues with system-wide Python installation on Travis 2016-10-30 14:15:09 +01:00
squidfunk a0c10d868a Build with node 4, 5 and 6 and install requirements 2016-10-30 14:10:44 +01:00
squidfunk 738177d5a3 Forgot to update mkdocs.yml [ci skip] 2016-10-30 11:29:24 +01:00
squidfunk e76be3b704 Removed unnecessary docs 2016-10-30 11:28:21 +01:00
squidfunk cb215d0da4 Added documentation for Permalinks extension [ci skip] 2016-10-30 11:26:55 +01:00
squidfunk f1af230918 Finished footnotes integration 2016-10-30 11:02:18 +01:00
squidfunk 8cac945757 Finished full integration for CodeHilite 2016-10-30 10:36:18 +01:00
squidfunk 669d7cbc19 Added print styles for links 2016-10-25 10:14:55 +02:00
squidfunk d3ed8ccec6 Added basic styles for @media print 2016-10-24 18:02:53 +02:00
squidfunk 26b1de049b Removed temporary rules in shame 2016-10-23 19:32:27 +02:00
squidfunk 83c5c7512b Cleaned up search modal styles 2016-10-23 19:31:54 +02:00
Martin Donath e61f12d429 Merge pull request #58 from brendo/dynamic-source-version
Use `extra.version` if it is available when generating source partial
2016-10-23 16:55:46 +02:00
Martin Donath 60f48d71d1 Merge pull request #59 from brendo/github-source-facts
Abstracts fact fetching for Github sources
2016-10-23 16:55:05 +02:00
Brendan Abbott 3537235d78 Add GithubSourceFacts, which abstracts fact fetching for Github sources 2016-10-23 19:49:22 +10:00
squidfunk 95435e7035 Implemented basic search modal functionality 2016-10-23 10:21:37 +02:00
Brendan Abbott d5a78ce396 Use extra.version if it is available when generating source partial 2016-10-23 18:11:44 +10:00
squidfunk 46b7e0f5fe Refactored admonition styles to be slightly lighter 2016-10-21 21:15:35 +02:00
squidfunk 130bd9fe0b Resolved double-clean from build process 2016-10-21 21:13:47 +02:00
squidfunk 507e98871e Improve performance by reducing compound repaints 2016-10-18 20:53:08 +02:00
squidfunk a18eb4f982 Add extra.repo_type config option to override link parser 2016-10-16 18:22:07 +02:00
squidfunk eaeba59dd8 Added guards for repository banner 2016-10-16 17:08:34 +02:00
squidfunk 4dbd2978a8 Added signal handler for karma 2016-10-16 17:06:29 +02:00
Martin Donath 1d637134b2 Merge pull request #56 from brendo/doc-updates
Minor documentation updates
2016-10-12 10:03:13 +02:00
squidfunk c814cc1584 Remove Gemini again from package.json 2016-10-12 09:46:47 +02:00
Brendan Abbott 1b58bba115 Update documentation for installation 2016-10-12 17:45:44 +10:00
squidfunk 4dbb6095bc Update GCC to 4.8 in Travis build environment 2016-10-12 09:40:23 +02:00
squidfunk e7160cb85c Remove gemini for now as it breaks the build 2016-10-12 09:28:30 +02:00
squidfunk 7b585f191a Added full JSX support to build pipeline 2016-10-10 12:35:25 +02:00
squidfunk 68b1800d38 Merge branch 'master' of github.com:squidfunk/mkdocs-material 2016-10-10 09:44:01 +02:00
squidfunk 50be5f8712 Added issue template for GitHub 2016-10-10 09:43:30 +02:00
squidfunk 3e47149fe4 Restructure package.json according to npm guidelines 2016-10-07 21:27:29 +02:00
squidfunk 82eef9340f Integrated karma for unit tests 2016-10-07 16:38:13 +02:00
squidfunk cc302a70fc Added editor configuration 2016-10-07 11:17:00 +02:00
squidfunk 57822b1290 Updated changelog 2016-10-06 19:26:49 +02:00
squidfunk 2159c730c5 Introduced post-merge hook to update dependencies 2016-10-06 15:45:41 +02:00
squidfunk d5ddc1ab8f Added npm-debug.log to .gitignore 2016-10-06 15:16:57 +02:00
squidfunk ccfdbf040f Introduced pre-commit hook for linting 2016-10-06 15:14:03 +02:00
squidfunk 48dc0527c8 Added babel-register as a dependency 2016-10-06 12:20:48 +02:00
squidfunk 914ccc4550 Rewrite of Gulp asset pipeline in ES6 and separation of tasks 2016-10-06 12:14:33 +02:00
Martin Donath 0dec429a9a Update README.md 2016-09-30 13:37:21 +02:00
squidfunk 46f45bb8a9 Introduced ESLint for code style checks 2016-09-30 13:29:45 +02:00
squidfunk 02915210f4 Fix jittery scroll bouncing 2016-09-24 19:12:05 +02:00
squidfunk fc7fb28edb Prototyped animation for navigation on desktop 2016-09-24 18:52:37 +02:00
squidfunk e32562fb1e Repair build 2016-09-23 20:58:55 +02:00
squidfunk ffe06939a7 Refactored code container 2016-09-23 20:26:27 +02:00
squidfunk 71d022ef39 Refactored repository view and integrated into drawer 2016-09-23 17:46:16 +02:00
squidfunk 2fd1740f3d Fixed bug in scrollspy 2016-09-23 12:39:47 +02:00
squidfunk 9338045887 Refactored navigation and drawer 2016-09-23 11:56:25 +02:00
Martin Donath e21949edc5 Update README.md 2016-09-20 09:27:42 +02:00
squidfunk 854fed7fb9 Add compiled files 2016-09-18 15:19:27 +02:00
squidfunk 4ee1ee8c04 Fixed #44: Invalid left-hand side in assignment 2016-09-18 15:19:08 +02:00
squidfunk b387f2abee Corrected BEM nesting depths 2016-09-13 20:58:28 +02:00
squidfunk 0111478b65 Added icons for GitHub, GitLab and BitBucket integrations 2016-09-11 19:58:22 +02:00
squidfunk 37310eb52d Refactored Gulp workflow and added styles for extensions 2016-09-11 19:00:53 +02:00
squidfunk 841b493df6 Adjusted error handling in px2em 2016-09-08 22:29:26 +02:00
squidfunk f5ad733181 General refactoring of rework 2016-09-08 19:43:23 +02:00
squidfunk 6ac4b0f749 Updated resets 2016-09-04 18:13:17 +02:00
squidfunk adf6f50c3e Exclude _shame.scss from linting [ci skip] 2016-09-04 17:39:16 +02:00
squidfunk ba788dcaba Fix errors in generated SassDoc 2016-09-04 17:32:12 +02:00
squidfunk 5e838ecf4f Introduced SassLint for code style checks 2016-09-04 17:11:58 +02:00
squidfunk 72c7841808 Updated changelog 2016-09-03 16:05:10 +02:00
squidfunk 2eed3bdb4f Added support for footnotes 2016-09-02 22:59:14 +02:00
squidfunk 930c206132 Fix material color library in package.json 2016-09-02 00:59:49 +02:00
squidfunk 1a92f01c41 Fix ci build script 2016-09-02 00:44:49 +02:00
squidfunk d7d7ef566c Fix indent 2016-09-02 00:44:04 +02:00
squidfunk fec7e13bea Admonition styles and removed bower as dependency 2016-09-02 00:33:45 +02:00
squidfunk c3e10c25f3 Add target support for permalinks 2016-08-10 23:01:31 +02:00
squidfunk c534800ab9 Added search bar to screen header 2016-08-08 23:33:06 +02:00
squidfunk 7f2444174f Initial commit of rework 2016-08-07 18:01:56 +02:00
Martin Donath 7032b7de4b Merge pull request #36 from brocaar/gh_release_download
Add option to link to GitHub release
2016-07-02 13:54:23 +02:00
Orne Brocaar 51549c61ee Fix error when github options does not exist. 2016-06-29 18:32:11 +02:00
Orne Brocaar 56d252c6bb Add option to link to GitHub release. 2016-06-29 18:18:12 +02:00
squidfunk 57f51f3a3d Prepare 0.2.4 release 2016-06-26 14:16:59 +02:00
squidfunk fc6b086db4 Fixed #35: Add styling for blockquotes 2016-06-26 14:10:13 +02:00
squidfunk 2784a4f781 Fixed #33: Protocol relative URL for webfonts doesn't work with file:// 2016-06-26 13:50:24 +02:00
squidfunk 62dc4c111e Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag 2016-06-26 13:45:14 +02:00
squidfunk 1a4490a39c Default favicon not properly set 2016-06-24 13:12:20 +02:00
245 changed files with 21183 additions and 5934 deletions
+7
View File
@@ -0,0 +1,7 @@
{
"presets": ["es2015"],
"plugins": [
"add-module-exports",
"root-import"
]
}
+31
View File
@@ -0,0 +1,31 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Top-level config
root = true
# All files
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
+28
View File
@@ -0,0 +1,28 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Files generated by build
/build
/material
/site
# Files used and generated by flow
/lib/declarations
/tmp
+199
View File
@@ -0,0 +1,199 @@
{
"extends": "eslint:recommended",
"env": {
"browser": true,
"es6": true,
"node": true
},
"globals": {
"Modernizr": true,
"navigator": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": true,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": true,
"generators": true,
"globalReturn": true,
"modules": true,
"objectLiteralComputedProperties": true,
"objectLiteralDuplicateProperties": true,
"objectLiteralShorthandMethods": true,
"objectLiteralShorthandProperties": true,
"octalLiterals": true,
"regexUFlag": true,
"regexYFlag": true,
"spread": true,
"superInFunctions": false,
"templateStrings": true,
"unicodeCodePointEscapes": true
},
"impliedStrict": true,
"sourceType": "module"
},
"plugins": [],
"rules": {
"array-callback-return": 2,
"array-bracket-spacing": 2,
"arrow-parens": [2, "as-needed"],
"arrow-spacing": 2,
"block-scoped-var": 2,
"block-spacing": 2,
"brace-style": 2,
"camelcase": [2, {
"properties": "always"
}],
"comma-dangle": [2, "never"],
"comma-style": [2, "last"],
"complexity": 2,
"computed-property-spacing": 2,
"consistent-this": 2,
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": 2,
"func-call-spacing": 2,
"func-names": [2, "never"],
"func-style": 2,
"generator-star-spacing": 2,
"indent": [2, 2, {
"FunctionDeclaration": {
"body": 1,
"parameters": 2
},
"FunctionExpression": {
"body": 1,
"parameters": 2
},
"MemberExpression": 1,
"VariableDeclarator": {
"var": 2,
"let": 2,
"const": 3
},
"SwitchCase": 1
}],
"init-declarations": 2,
"key-spacing": 2,
"keyword-spacing": 2,
"linebreak-style": 2,
"lines-around-comment": 2,
"lines-around-directive": 2,
"max-depth": 2,
"max-len": [1, {
"ignorePattern": "\/\/ TODO"
}],
"max-nested-callbacks": 2,
"max-params": 2,
"max-statements-per-line": 2,
"new-cap": 2,
"newline-per-chained-call": 2,
"no-array-constructor": 2,
"no-alert": 2,
"no-caller": 2,
"no-confusing-arrow": [2, {
"allowParens": false
}],
"no-console": 1,
"no-duplicate-imports": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-floating-decimal": 2,
"no-global-assign": 2,
"no-invalid-this": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-multiple-empty-lines": [1, {
"max": 1
}],
"no-nested-ternary": 2,
"no-new": 0,
"no-new-object": 2,
"no-param-reassign": 2,
"no-prototype-builtins": 2,
"no-shadow": 2,
"no-tabs": 2,
"no-template-curly-in-string": 2,
"no-throw-literal": 2,
"no-trailing-spaces": 2,
"no-undefined": 2,
"no-underscore-dangle": [2, {
"allowAfterThis": true,
"allowAfterSuper": true
}],
"no-unneeded-ternary": 2,
"no-unsafe-negation": 2,
"no-unused-expressions": 2,
"no-unused-vars": 1,
"no-use-before-define": 2,
"no-useless-call": 2,
"no-useless-computed-key": 2,
"no-useless-constructor": 2,
"no-useless-rename": 2,
"no-var": 2,
"no-whitespace-before-property": 2,
"no-with": 2,
"object-curly-spacing": [2, "always"],
"object-shorthand": 2,
"one-var-declaration-per-line": 2,
"operator-assignment": 2,
"prefer-arrow-callback": 2,
"prefer-const": 2,
"prefer-numeric-literals": 2,
"prefer-spread": 2,
"prefer-template": 2,
"quotes": [2, "double"],
"radix": 2,
"require-jsdoc": [1, {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": false
}
}],
"rest-spread-spacing": 2,
"semi": [2, "never"],
"semi-spacing": 2,
"space-before-function-paren": [2, "never"],
"space-in-parens": 2,
"space-infix-ops": 2,
"space-unary-ops": 2,
"spaced-comment": [2, "always", {
"line": {
"markers": ["/", ":"],
"exceptions": ["-", "+"]
},
"block": {
"markers": ["!"],
"exceptions": ["*"],
"balanced": true
}
}],
"strict": 2,
"template-curly-spacing": 2,
"unicode-bom": 2,
"valid-jsdoc": [1, {
"prefer": {
"arg": "param",
"argument": "param",
"class": "constructor",
"returns": "return",
"virtual": "abstract"
},
"requireParamDescription": true,
"requireReturn": false,
"requireReturnDescription": true
}],
"yield-star-spacing": 2
},
"root": true
}
+5
View File
@@ -0,0 +1,5 @@
[ignore]
.*/node_modules/.*
[libs]
lib/declarations/
+54
View File
@@ -0,0 +1,54 @@
#!/bin/bash
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Exit, if there's no .travisignore file
if [[ ! -a .travisignore ]]; then
exit
fi
# Filter relevant files for linting
FILES=$(git diff --cached --name-only)
# Resolve the patterns we want to skip
BLACKLIST=$(< .travisignore)
# Remove the pattern from the list of changes
for f in $BLACKLIST; do
FILES=( ${FILES[@]/$f/} )
# If we've exhausted the list of changes before we've finished going
# through patterns, that's okay, just quit the loop
if [[ ${#FILES[@]} -eq 0 ]]; then
break
fi
done
# If there's changes left, then we have stuff to build, leave the commit alone
if [[ ${#FILES[@]} -gt 0 ]]; then
exit
fi
# Don't build this commit
sed -i '' '1s/$/ [ci skip]/' "$1"
# We're good
exit 0
+30
View File
@@ -0,0 +1,30 @@
#!/bin/bash
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Check, if all changes are added to the index
CHANGED="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
# Perform install and prune of NPM dependencies if package.json changed
if $(echo "$CHANGED" | grep --quiet package.json); then
echo -e "\x1B[33m!\x1B[0m Updating dependencies"
yarn install
fi
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Determine current branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
MESSAGE="Commits on master are only allowed via Pull Requests. Aborting."
# If we're on master, abort commit
if [[ "$BRANCH" == "master" ]]; then
echo -e "\x1B[31m✗\x1B[0m Branch: $BRANCH - \x1B[31m$MESSAGE\x1B[0m"
exit 1
else
echo -e "\x1B[32m✓\x1B[0m Branch: $BRANCH"
fi
# We're good
exit 0
+70
View File
@@ -0,0 +1,70 @@
#!/bin/bash
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Patch file to store unindexed changes
PATCH_FILE=".working-tree.patch"
MESSAGE="Terminated with errors"
# Revert changes that have been registered in the patch file
function cleanup {
EXIT_CODE=$?
if [ -f "$PATCH_FILE" ]; then
git apply "$PATCH_FILE" 2> /dev/null
rm "$PATCH_FILE"
fi
exit $EXIT_CODE
}
# Register signal handlers
trap cleanup EXIT SIGINT SIGHUP
# Cancel any changes to the working tree that are not going to be committed
git diff > "$PATCH_FILE"
git checkout -- .
# Filter relevant files for linting
FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
grep "\.\(js\|jsx\|scss\)$")
# Run check and print indicator
if [ "$FILES" ]; then
# If linter terminated with errors, abort commit
if [ $? -gt 0 ]; then
echo -e "\x1B[31m✗\x1B[0m Linter - \x1B[31m$MESSAGE\x1B[0m"
exit 1
else
echo -e "\x1B[32m✓\x1B[0m Linter"
fi
# If flow terminated with errors, abort commit
yarn run flow --silent
if [ $? -gt 0 ]; then
echo -e "\x1B[31m✗\x1B[0m Flow - \x1B[31m$MESSAGE\x1B[0m"
exit 1
else
echo -e "\x1B[32m✓\x1B[0m Flow"
fi
fi
# We're good
exit 0
+34
View File
@@ -0,0 +1,34 @@
## Description
[Description of the bug]
### Expected behavior
[What you expected to happen]
### Actual behavior
[What is actually happening]
### Steps to reproduce the bug
1. [First step]
2. [Second step]
3. [and so on...]
### Package versions
* Python: `python --version`
* MkDocs: `mkdocs --version`
* Material: `pip show mkdocs-material | grep -E ^Version`
### Project configuration
``` yaml
The contents of your mkdocs.yml
```
### System information
* OS: [The operating system you're running]
* Browser: [The browser used, if relevant]
+16 -11
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
@@ -18,18 +18,23 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Mac OS X internals
# macOS internals
.DS_Store
# Bower and NPM libraries
bower_components
node_modules
# NPM-related
/node_modules
/npm-debug.log*
/yarn-error.log
# Build files
build
MANIFEST
site
# Files generated by build
/build
/manifest.json
/MANIFEST
/site
# Files generated by flow typechecker
/tmp
# Distribution files
dist
mkdocs_material.egg-info
/dist
/mkdocs_material.egg-info
+22
View File
@@ -0,0 +1,22 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Don't line shame
src/assets/stylesheets/_shame.scss
+191
View File
@@ -0,0 +1,191 @@
{
"extends": "stylelint-config-standard",
"plugins": [
"stylelint-order",
"stylelint-scss"
],
"rules": {
"at-rule-empty-line-before": null,
"at-rule-no-unknown": null,
"at-rule-no-vendor-prefix": true,
"block-opening-brace-space-before": null,
"block-closing-brace-newline-after": ["always", {
"ignoreAtRules": [
"if",
"else",
"elseif"
]
}],
"color-hex-case": "upper",
"color-hex-length": "long",
"color-named": "never",
"comment-empty-line-before": ["always", {
"ignore": ["stylelint-commands"]
}],
"font-family-name-quotes": "always-where-recommended",
"font-weight-notation": "numeric",
"function-url-quotes": "always",
"no-unknown-animations": true,
"order/order": [
"custom-properties",
"declarations"
],
"order/properties-order": [
"display",
"position",
"top",
"right",
"bottom",
"left",
"flex",
"flex-basis",
"flex-direction",
"flex-flow",
"flex-grow",
"flex-shrink",
"flex-wrap",
"align-content",
"align-items",
"align-self",
"justify-content",
"order",
"width",
"min-width",
"max-width",
"height",
"min-height",
"max-height",
"margin",
"margin-top",
"margin-right",
"margin-bottom",
"margin-left",
"padding",
"padding-top",
"padding-right",
"padding-bottom",
"padding-left",
"float",
"clear",
"clip",
"columns",
"column-gap",
"column-fill",
"column-rule",
"column-span",
"column-count",
"column-width",
"transform",
"transform-box",
"transform-origin",
"transform-style",
"transition",
"transition-delay",
"transition-duration",
"transition-property",
"transition-timing-function",
"border",
"border-top",
"border-right",
"border-bottom",
"border-left",
"border-width",
"border-top-width",
"border-right-width",
"border-bottom-width",
"border-left-width",
"border-style",
"border-top-style",
"border-right-style",
"border-bottom-style",
"border-left-style",
"border-radius",
"border-top-left-radius",
"border-top-right-radius",
"border-bottom-left-radius",
"border-bottom-right-radius",
"border-color",
"border-top-color",
"border-right-color",
"border-bottom-color",
"border-left-color",
"outline",
"outline-color",
"outline-offset",
"outline-style",
"outline-width",
"background",
"background-attachment",
"background-clip",
"background-color",
"background-image",
"background-repeat",
"background-position",
"background-size",
"color",
"font",
"font-family",
"font-size",
"font-smoothing",
"font-style",
"font-variant",
"font-weight",
"letter-spacing",
"line-height",
"list-style",
"text-align",
"text-decoration",
"text-indent",
"text-overflow",
"text-rendering",
"text-shadow",
"text-transform",
"text-wrap",
"white-space",
"word-spacing",
"border-collapse",
"border-spacing",
"box-shadow",
"caption-side",
"content",
"cursor",
"empty-cells",
"opacity",
"overflow",
"quotes",
"speak",
"table-layout",
"vertical-align",
"visibility",
"z-index"
],
"property-no-vendor-prefix": true,
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
"selector-descendant-combinator-no-non-space": null,
"string-quotes": "double",
"unit-whitelist": ["rem", "em", "deg", "s", "%", "mm", "vh"],
"value-keyword-case": "lower",
"value-no-vendor-prefix": true
}
}
+31 -15
View File
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2016 Martin Donath <martin.donath@squidfunk.com>
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
@@ -19,21 +19,37 @@
# IN THE SOFTWARE.
language: node_js
sudo: false
# Node.js versions
node_js:
- '4.1'
- '0.11'
# -----------------------------------------------------------------------------
# Regular builds
# -----------------------------------------------------------------------------
# Node.js version and necessary services
node_js: 5
services:
- docker
# Limit clone depth to 5, to speed up build
git:
depth: 5
# Cache dependencies
cache:
pip: true
yarn: true
directories:
- node_modules
# Install yarn as Travis doesn't support it out of the box
before_install:
- npm install -g yarn@v0.22.0
# Install dependencies
before_script:
install:
- yarn install --ignore-optional
- pip install --user -r requirements.txt
# Install bower
- npm install -g bower
# Install project dependencies
- npm install
- bower install
# Perform build and tests
script: gulp build --production
# Perform build and release
script:
- yarn run travis
+8
View File
@@ -0,0 +1,8 @@
.github/*
material/*
.editorconfig
.gitignore
CHANGELOG
LICENSE
*.md
git
+278 -4
View File
@@ -1,3 +1,277 @@
mkdocs-material-1.11.0 (2017-10-19)
* Added localization to clipboard
* Refactored i18n localization logic
mkdocs-material-1.10.4 (2017-10-18)
* Improved print styles of code blocks
* Improved search UX (don't close on enter if no selection)
* Fixed #495: Vertical scrollbar on short pages
mkdocs-material-1.10.3 (2017-10-11)
* Fixed #484: Vertical scrollbar on some MathJax formulas
* Fixed #483: Footnote backref target offset regression
mkdocs-material-1.10.2 (2017-10-06)
* Fixed #468: Sidebar shows scrollbar if content is shorter (in Safari)
mkdocs-material-1.10.1 (2017-09-14)
* Fixed #455: Bold code blocks rendered with normal font weight
mkdocs-material-1.10.0 (2017-09-01)
* Added support to make logo default icon configurable
* Fixed uninitialized overflow scrolling on main pane for iOS
* Fixed error in mobile navigation in case JavaScript is not available
* Fixed incorrect color transition for nested panes in mobile navigation
* Improved checkbox styles for Tasklist from PyMdown Extension package
mkdocs-material-1.9.0 (2017-08-29)
* Added info (synonym: todo) style for Admonition
* Added question (synonym: help, faq) style for Admonition
* Added support for Details from PyMdown Extensions package
* Improved Admonition styles to match Details
* Improved styles for social links in footer
* Replaced ligatures with Unicode code points to avoid broken layout
* Upgraded PyMdown Extensions package dependency to >= 3.4
mkdocs-material-1.8.1 (2017-08-07)
* Fixed #421: Missing pagination for GitHub API
mkdocs-material-1.8.0 (2017-08-02)
* Added support for lazy-loading of search results for better performance
* Added support for customization of search tokenizer/separator
* Fixed #424: Search doesn't handle capital letters anymore
* Fixed #419: Search doesn't work on whole words
mkdocs-material-1.7.5 (2017-07-25)
* Fixed #398: Forms broken due to search shortcuts
* Improved search overall user experience
* Improved search matching and highlighting
* Improved search accessibility
mkdocs-material-1.7.4 (2017-06-21)
* Fixed functional link colors in table of contents for active palette
* Fixed #368: Compatibility issues with IE11
mkdocs-material-1.7.3 (2017-06-07)
* Fixed error when setting language to Japanese for site search
mkdocs-material-1.7.2 (2017-06-06)
* Fixed offset of search box when repo_url is not set
* Fixed non-disappearing tooltip
mkdocs-material-1.7.1 (2017-06-01)
* Fixed wrong z-index order of header, overlay and drawer
* Fixed wrong offset of targeted footnote back references
mkdocs-material-1.7.0 (2017-06-01)
* Added "copy to clipboard" buttons to code blocks
* Added support for multilingual site search
* Fixed search term highlighting for non-latin languages
mkdocs-material-1.6.4 (2017-05-24)
* Fixed #337: JavaScript error for GitHub organization URLs
mkdocs-material-1.6.3 (2017-05-16)
* Fixed #329: Broken source stats for private or unknown GitHub repos
mkdocs-material-1.6.2 (2017-05-15)
* Fixed #316: Fatal error for git clone on Windows
* Fixed #320: Chrome 58 creates double underline for abbr tags
* Fixed #323: Ligatures rendered inside code blocks
* Fixed miscalculated sidebar height due to missing margin collapse
* Changed deprecated MathJax CDN to Cloudflare
mkdocs-material-1.6.1 (2017-04-23)
* Fixed following of active/focused element if search input is focused
* Fixed layer order of search component elements
mkdocs-material-1.6.0 (2017-04-22)
* Added build test for Docker image on Travis
* Added search overlay for better user experience (focus)
* Added language from localizations to html tag
* Fixed #270: Source links broken for absolute URLs
* Fixed missing top spacing for first targeted element in content
* Fixed too small footnote divider when using larger font sizes
mkdocs-material-1.5.5 (2017-04-20)
* Fixed #282: Browser search (META+F) is hijacked
mkdocs-material-1.5.4 (2017-04-08)
* Fixed broken highlighting for two or more search terms
* Fixed missing search results when only a h1 is present
* Fixed unresponsive overlay on Android
mkdocs-material-1.5.3 (2017-04-07)
* Fixed deprecated calls for template variables
* Fixed wrong palette color for focused search result
* Fixed JavaScript errors on 404 page
* Fixed missing top spacing on 404 page
* Fixed missing right spacing on overflow of source container
mkdocs-material-1.5.2 (2017-04-05)
* Added requirements as explicit dependencies in setup.py
* Fixed non-synchronized transitions in search form
mkdocs-material-1.5.1 (2017-03-30)
* Fixed rendering and offset of targetted footnotes
* Fixed #238: Link on logo is not set to site_url
mkdocs-material-1.5.0 (2017-03-24)
* Added support for localization of search placeholder
* Added keyboard events for quick access of search
* Added keyboard events for search control
* Added opacity on hover for search buttons
* Added git hook to skip CI build on non-src changes
* Fixed non-resetting search placeholder when input is cleared
* Fixed error for unescaped parentheses in search term
* Fixed #229: Button to clear search missing
* Fixed #231: Escape key doesn't exit search
* Removed old-style figures from font feature settings
mkdocs-material-1.4.1 (2017-03-16)
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
mkdocs-material-1.4.0 (2017-03-16)
* Added support for grouping searched sections by documents
* Added support for highlighting of search terms
* Added support for localization of search results
* Fixed #216: table of contents icon doesn't show if h1 is not present
* Reworked style and layout of search results for better usability
mkdocs-material-1.3.0 (2017-03-11)
* Added support for page-specific title and description using metadata
* Added support for linking source files to documentation
* Fixed jitter and offset of sidebar when zooming browser
* Fixed incorrectly initialized tablet sidebar height
* Fixed regression for #1: GitHub stars break if the repo_url ends with a '/'
* Fixed undesired white line below copyright footer due to base font scaling
* Fixed issue with whitespace in path for scripts
* Fixed #205: support non-fixed (static) header
* Refactored footnote references for better visibility
* Reduced repaints to a minimum for non-tabs configuration
* Reduced contrast of edit button (slightly)
mkdocs-material-1.2.0 (2017-03-03)
* Added quote (synonym: cite) style for Admonition
* Added help message to build pipeline
* Fixed wrong navigation link colors when applying palette
* Fixed #197: Link missing in tabs navigation on deeply nested items
* Removed unnecessary dev dependencies
mkdocs-material-1.1.1 (2017-02-26)
* Fixed incorrectly displayed nested lists when using tabs
mkdocs-material-1.1.0 (2017-02-26)
* Added tabs navigation feature (optional)
* Added Disqus integration (optional)
* Added a high resolution Favicon with the new logo
* Added static type checking using Facebook's Flow
* Fixed #173: Dictionary elements have no bottom spacing
* Fixed #175: Tables cannot be set to 100% width
* Fixed race conditions in build related to asset revisioning
* Fixed accidentally re-introduced Permalink on top-level headline
* Fixed alignment of logo in drawer on IE11
* Refactored styles related to tables
* Refactored and automated Docker build and PyPI release
* Refactored build scripts
mkdocs-material-1.0.5 (2017-02-18)
* Fixed #153: Sidebar flows out of constrained area in Chrome 56
* Fixed #159: Footer jitter due to JavaScript if content is short
mkdocs-material-1.0.4 (2017-02-16)
* Fixed #142: Documentation build errors if h1 is defined as raw HTML
* Fixed #164: PyPI release does not build and install
* Fixed offsets of targeted headlines
* Increased sidebar font size by 0.12rem
mkdocs-material-1.0.3 (2017-01-22)
* Fixed #117: Table of contents items don't blur on fast scrolling
* Refactored sidebar positioning logic
* Further reduction of repaints
mkdocs-material-1.0.2 (2017-01-15)
* Fixed #108: Horizontal scrollbar in content area
mkdocs-material-1.0.1 (2017-01-14)
* Fixed massive repaints happening when scrolling
* Fixed footer back reference positions in case of overflow
* Fixed header logo from showing when the menu icon is rendered
* Changed scrollbar behavior to only show when content overflows
mkdocs-material-1.0.0 (2017-01-13)
* Introduced Webpack for more sophisticated JavaScript bundling
* Introduced ESLint and Stylelint for code style checks
* Introduced more accurate Material Design colors and shadows
* Introduced modular scales for harmonic font sizing
* Introduced git-hooks for better development workflow
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
* Rewrite of JavaScript using ES6 and Babel as a transpiler
* Rewrite of Admonition, Permalinks and CodeHilite integration
* Rewrite of the complete typographical system
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
* Removed Bower as a dependency in favor of NPM
* Removed custom icon build in favor of the Material Design iconset
* Removed _blank targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
* Removed unversioned assets from build directory
* Restructured templates into base templates and partials
* Added build and watch scripts in package.json
* Added support for Metadata and Footnotes Markdown extensions
* Added support for PyMdown Extensions package
* Added support for collapsible sections in navigation
* Added support for separate table of contents
* Added support for better accessibility through REM-based layout
* Added icons for GitHub, GitLab and BitBucket integrations
* Added more detailed documentation on specimen, extensions etc.
* Added a 404.html error page for deployment on GitHub Pages
* Fixed live reload chain in watch mode when saving a template
* Fixed variable references to work with MkDocs 0.16
mkdocs-material-0.2.4 (2016-06-26)
* Fixed improperly set default favicon
* Fixed #33: Protocol relative URL for webfonts doesn't work with file://
* Fixed #34: IE11 on Windows 7 doesn't honor max-width on main tag
* Fixed #35: Add styling for blockquotes
mkdocs-material-0.2.3 (2016-05-16)
* Fixed #25: Highlight inline fenced blocks
@@ -6,7 +280,7 @@ mkdocs-material-0.2.3 (2016-05-16)
mkdocs-material-0.2.2 (2016-03-20)
* Fixed #15: Document pygments dependency for codehilite
* Fixed #15: Document Pygments dependency for CodeHilite
* Fixed #16: Favicon could not be set through mkdocs.yml
* Fixed #17: Put version into own container for styling
* Fixed #20: Fix rounded borders for tables
@@ -46,11 +320,11 @@ mkdocs-material-0.1.2 (2016-02-16)
mkdocs-material-0.1.1 (2016-02-11)
* Fixed #1: GitHub stars don't work if the repo_url ends with a '/'
* Updated npm and bower dependencies to most recent versions
* Updated NPM and Bower dependencies to most recent versions
* Changed footer/copyright link to Material theme to GitHub pages
* Made MkDocs building/serving in build process optional
* Set up continuous integration with travis-ci.org
* Set up continuous integration with Travis
mkdocs-material-0.1.0 (2016-02-09)
* Initial release
* Initial release
+46
View File
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at https://gitter.im/squidfunk/mkdocs-material. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+82
View File
@@ -0,0 +1,82 @@
# Contributing
Interested in contributing to the Material theme? Want to report a bug? Before
you do, please read the following guidelines.
## Submission context
### Got a question or problem?
For quick questions there's no need to open an issue as you can reach us on
[gitter.im][1].
[1]: https://gitter.im/squidfunk/mkdocs-material
### Found a bug?
If you found a bug in the source code, you can help us by submitting an issue
to the [issue tracker][2] in our GitHub repository. Even better, you can submit
a Pull Request with a fix. However, before doing so, please read the
[submission guidelines][3].
[2]: https://github.com/squidfunk/mkdocs-material/issues
[3]: #submission-guidelines
### Missing a feature?
You can request a new feature by submitting an issue to our GitHub Repository.
If you would like to implement a new feature, please submit an issue with a
proposal for your work first, to be sure that it is of use for everyone, as
the Material theme is highly opinionated. Please consider what kind of change
it is:
* For a **major feature**, first open an issue and outline your proposal so
that it can be discussed. This will also allow us to better coordinate our
efforts, prevent duplication of work, and help you to craft the change so
that it is successfully accepted into the project.
* **Small features and bugs** can be crafted and directly submitted as a Pull
Request. However, there is no guarantee that your feature will make it into
the master, as it's always a matter of opinion whether if benefits the
overall functionality of the theme.
## Submission guidelines
### Submitting an issue
Before you submit an issue, please search the issue tracker, maybe an issue for
your problem already exists and the discussion might inform you of workarounds
readily available.
We want to fix all the issues as soon as possible, but before fixing a bug we
need to reproduce and confirm it. In order to reproduce bugs we will
systematically ask you to provide a minimal reproduction scenario using the
custom issue template. Please stick to the issue template.
Unfortunately we are not able to investigate / fix bugs without a minimal
reproduction scenario, so if we don't hear back from you we may close the issue.
### Submitting a Pull Request (PR)
Search GitHub for an open or closed PR that relates to your submission. You
don't want to duplicate effort. If you do not find a related issue or PR,
go ahead.
1. **Development**: Fork the project, set up the [development environment][4],
make your changes in a separate git branch and add descriptive messages to
your commits.
2. **Build**: Before submitting a pull requests, [build the theme][5]. This is
a mandatory requirement for your PR to get accepted, as the theme should at
all times be installable through GitHub.
3. **Pull Request**: After building the theme, commit the compiled output, push
your branch to GitHub and send a PR to `mkdocs-material:master`. If we
suggest changes, make the required updates, rebase your branch and push the
changes to your GitHub repository, which will automatically update your PR.
After your PR is merged, you can safely delete your branch and pull the changes
from the main (upstream) repository.
[4]: http://squidfunk.github.io/mkdocs-material/customization/#environment-setup
[5]: http://squidfunk.github.io/mkdocs-material/customization/#build-process
+47
View File
@@ -0,0 +1,47 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
FROM jfloff/alpine-python:2.7-slim
MAINTAINER Martin Donath <martin.donath@squidfunk.com>
# Set build directory
WORKDIR /tmp
# Copy files necessary for build
COPY material material
COPY MANIFEST.in MANIFEST.in
COPY package.json package.json
COPY requirements.txt requirements.txt
COPY setup.py setup.py
# Perform build and cleanup artifacts
RUN \
python setup.py install 2>/dev/null && \
rm -rf /tmp/*
# Set working directory
WORKDIR /docs
# Expose MkDocs development server port
EXPOSE 8000
# Start development server by default
ENTRYPOINT ["mkdocs"]
CMD ["serve", "--dev-addr=0.0.0.0:8000"]
+427
View File
@@ -0,0 +1,427 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import chalk from "chalk"
import gulp from "gulp"
import notifier from "node-notifier"
import plumber from "gulp-plumber"
import util from "gulp-util"
import yargs from "yargs"
/* ----------------------------------------------------------------------------
* Configuration and arguments
* ------------------------------------------------------------------------- */
/* General configuration */
const config = {
assets: {
src: "src/assets", /* Source directory for assets */
build: "material/assets" /* Target directory for assets */
},
lib: "lib", /* Libraries and tasks */
views: {
src: "src", /* Source directory for views */
build: "material" /* Target directory for views */
}
}
/* Commandline arguments */
let args = yargs
.locale("en")
.usage(`\n${chalk.yellow("Usage:")} yarn run <command> -- [options]`)
.wrap(84)
.updateStrings({
"Commands:": chalk.yellow("Commands:"),
"Examples:": chalk.yellow("Examples:")
})
/* Commands */
.command("build", chalk.grey("build assets and views"))
.command("clean", chalk.grey("clean build artifacts"))
.command("flow", chalk.grey("type check with flow"))
.command("help", chalk.grey("display this message"))
.command("lint", chalk.grey("lint sources"))
.command("start", chalk.grey("start development server"))
/* Options */
.group([
"help", "clean"
], chalk.yellow("Options:"))
.help("help", chalk.grey("display this message"))
.option("clean", {
describe: chalk.grey("clean artifacts before command"),
default: false,
global: true
})
/* Build options */
.group([
"lint", "optimize", "revision", "sourcemaps", "mkdocs"
], chalk.yellow("Build Options:"))
.option("lint", {
describe: chalk.grey("lint sources before build"),
default: true,
global: true
})
.option("optimize", {
describe: chalk.grey("optimize and minify assets"),
default: false,
global: true
})
.option("revision", {
describe: chalk.grey("revision assets for cache busting"),
default: false,
global: true
})
.option("sourcemaps", {
describe: chalk.grey("generate sourcemaps for assets"),
default: false,
global: true
})
.option("mkdocs", {
describe: chalk.grey("build documentation or start watchdog"),
default: true,
global: true
})
/* Example commands */
.example("yarn run build")
.example("yarn run build -- --no-optimize")
.example("yarn run clean")
.example("yarn run flow")
.example("yarn run lint")
.example("yarn run start")
/* Apply to process.argv */
.argv
/* Only use the last seen value if boolean, so overrides are possible */
args = Object.keys(args).reduce((result, arg) => {
result[arg] = Array.isArray(args[arg]) && typeof args[arg][0] === "boolean"
? [].concat(args[arg]).pop()
: args[arg]
return result
}, {})
/* ----------------------------------------------------------------------------
* Overrides and helpers
* ------------------------------------------------------------------------- */
/*
* Override gulp.src() for nicer error handling.
*/
const src = gulp.src
gulp.src = (...glob) => {
return src.apply(gulp, glob)
.pipe(
plumber(function(error) {
util.log(util.colors.red(
`Error (${error.plugin}): ${error.message}`
))
/* Extract file where error happened, if existent */
const file = error.relativePath
? error.relativePath.split("/").pop()
: ""
/* Dispatch system-level notification */
notifier.notify({
title: `Error (${error.plugin}): ${file}`,
message: error.messageOriginal
})
// eslint-disable-next-line no-invalid-this
this.emit("end")
/* Throw error and abort, if not in watch mode */
if (args._[0] !== "watch")
throw error
}))
}
/*
* Helper function to load a task
*
* This function returns a callback that will require the task with the given
* name and execute the function that is returned by this task. It omits the
* need to load all tasks upfront, speeding up the build a gazillion times.
*/
const load = task => {
return done => {
return require(`./${config.lib}/tasks/${task}`)
.call(gulp, gulp, config, args)(done)
}
}
/* ----------------------------------------------------------------------------
* Images
* ------------------------------------------------------------------------- */
/*
* Copy favicon
*/
gulp.task("assets:images:build:ico", [
args.clean ? "assets:images:clean" : false
].filter(Boolean), load("assets/images/build/ico"))
/*
* Copy and minify vector graphics
*/
gulp.task("assets:images:build:svg", [
args.clean ? "assets:images:clean" : false
].filter(Boolean), load("assets/images/build/svg"))
/*
* Copy images
*/
gulp.task("assets:images:build", [
"assets:images:build:ico",
"assets:images:build:svg"
])
/*
* Clean images generated by build
*/
gulp.task("assets:images:clean",
load("assets/images/clean"))
/* ----------------------------------------------------------------------------
* JavaScript
* ------------------------------------------------------------------------- */
/*
* Build application logic
*
* When revisioning assets, the build must be serialized due to possible race
* conditions when two tasks try to write manifest.json simultaneously
*/
gulp.task("assets:javascripts:build:application", [
args.clean ? "assets:javascripts:clean" : false,
args.lint ? "assets:javascripts:lint" : false,
args.revision ? "assets:stylesheets:build" : false
].filter(Boolean), load("assets/javascripts/build/application"))
/*
* Build custom modernizr
*
* When revisioning assets, the build must be serialized due to possible race
* conditions when two tasks try to write manifest.json simultaneously
*/
gulp.task("assets:javascripts:build:modernizr", [
"assets:stylesheets:build",
args.clean ? "assets:javascripts:clean" : false,
args.lint ? "assets:javascripts:lint" : false,
args.revision ? "assets:javascripts:build:application" : false
].filter(Boolean), load("assets/javascripts/build/modernizr"))
/*
* Build search language support files
*/
gulp.task("assets:javascripts:build:languages", [
args.clean ? "assets:javascripts:clean" : false
].filter(Boolean), load("assets/javascripts/build/languages"))
/*
* Build JavaScript
*/
gulp.task("assets:javascripts:build", [
"assets:javascripts:build:application",
"assets:javascripts:build:modernizr",
"assets:javascripts:build:languages"
])
/*
* Clean JavaScript generated by build
*/
gulp.task("assets:javascripts:clean",
load("assets/javascripts/clean"))
/*
* Annotate JavaScript
*/
gulp.task("assets:javascripts:annotate",
load("assets/javascripts/annotate"))
/*
* Lint JavaScript
*/
gulp.task("assets:javascripts:lint",
load("assets/javascripts/lint"))
/* ----------------------------------------------------------------------------
* Stylesheets
* ------------------------------------------------------------------------- */
/*
* Build stylesheets from SASS source
*/
gulp.task("assets:stylesheets:build", [
args.clean ? "assets:stylesheets:clean" : false,
args.lint ? "assets:stylesheets:lint" : false
].filter(Boolean), load("assets/stylesheets/build"))
/*
* Clean stylesheets generated by build
*/
gulp.task("assets:stylesheets:clean",
load("assets/stylesheets/clean"))
/*
* Lint SASS sources
*/
gulp.task("assets:stylesheets:lint",
load("assets/stylesheets/lint"))
/* ----------------------------------------------------------------------------
* Assets
* ------------------------------------------------------------------------- */
/*
* Build assets
*/
gulp.task("assets:build", [
"assets:images:build",
"assets:javascripts:build",
"assets:stylesheets:build"
])
/*
* Clean files generated by build
*/
gulp.task("assets:clean", [
"assets:images:clean",
"assets:javascripts:clean",
"assets:stylesheets:clean"
])
/* ----------------------------------------------------------------------------
* Views
* ------------------------------------------------------------------------- */
/*
* Minify views
*/
gulp.task("views:build", [
args.clean ? "views:clean" : false,
args.revision ? "assets:images:build" : false,
args.revision ? "assets:stylesheets:build" : false,
args.revision ? "assets:javascripts:build" : false
].filter(Boolean), load("views/build"))
/*
* Clean views
*/
gulp.task("views:clean",
load("views/clean"))
/* ----------------------------------------------------------------------------
* MkDocs
* ------------------------------------------------------------------------- */
/*
* Build documentation
*/
gulp.task("mkdocs:build", [
"assets:build",
"views:build",
"mkdocs:clean"
], load("mkdocs/build"))
/*
* Clean documentation build
*/
gulp.task("mkdocs:clean",
load("mkdocs/clean"))
/*
* Restart MkDocs server
*/
gulp.task("mkdocs:serve",
load("mkdocs/serve"))
/* ----------------------------------------------------------------------------
* Interface
* ------------------------------------------------------------------------- */
/*
* Build assets and documentation
*/
gulp.task("build", [
"assets:build",
"views:build",
args.mkdocs ? "mkdocs:build" : false
].filter(f => f))
/*
* Clean assets and documentation
*/
gulp.task("clean", [
"assets:clean",
"views:clean",
"mkdocs:clean"
])
/*
* Watch for changes and rebuild assets on the fly
*/
gulp.task("watch", [
"assets:build",
"views:build"
], () => {
process.env.WATCH = true
/* Start MkDocs server */
if (args.mkdocs)
gulp.start("mkdocs:serve")
/* Rebuild stylesheets */
gulp.watch([
`${config.assets.src}/stylesheets/**/*.scss`
], ["assets:stylesheets:build"])
/* Rebuild JavaScript */
gulp.watch([
`${config.assets.src}/javascripts/**/*.{js,jsx}`
], ["assets:javascripts:build:application"])
/* Copy images */
gulp.watch([
`${config.assets.src}/images/**/*`
], ["assets:images:build"])
/* Minify views */
gulp.watch([
`${config.views.src}/**/*.html`
], ["views:build"])
})
/*
* Print help message
*/
gulp.task("help")
/*
* Build assets by default
*/
gulp.task("default", ["build"])
-332
View File
@@ -1,332 +0,0 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/* ----------------------------------------------------------------------------
* Imports
* ------------------------------------------------------------------------- */
var gulp = require('gulp');
var addsrc = require('gulp-add-src');
var args = require('yargs').argv;
var autoprefix = require('autoprefixer');
var child = require('child_process');
var clean = require('del');
var collect = require('gulp-rev-collector');
var compact = require('gulp-remove-empty-lines');
var concat = require('gulp-concat');
var ignore = require('gulp-ignore');
var gulpif = require('gulp-if');
var mincss = require('gulp-cssnano');
var minhtml = require('gulp-htmlmin');
var minimage = require('gulp-image-optimization');
var modernizr = require('gulp-modernizr');
var mqpacker = require('css-mqpacker');
var notifier = require('node-notifier');
var plumber = require('gulp-plumber');
var postcss = require('gulp-postcss');
var rev = require('gulp-rev');
var sass = require('gulp-sass');
var sourcemaps = require('gulp-sourcemaps');
var uglify = require('gulp-uglify');
var util = require('gulp-util');
var vinyl = require('vinyl-paths');
/* ----------------------------------------------------------------------------
* Locals
* ------------------------------------------------------------------------- */
/* MkDocs server */
var server = null;
/* ----------------------------------------------------------------------------
* Overrides
* ------------------------------------------------------------------------- */
/*
* Override gulp.src() for nicer error handling.
*/
var src = gulp.src;
gulp.src = function() {
return src.apply(gulp, arguments)
.pipe(
plumber(function(error) {
util.log(util.colors.red(
'Error (' + error.plugin + '): ' + error.message
));
notifier.notify({
title: 'Error (' + error.plugin + ')',
message: error.message.split('\n')[0]
});
this.emit('end');
}));
};
/* ----------------------------------------------------------------------------
* Asset pipeline
* ------------------------------------------------------------------------- */
/*
* Build stylesheets from SASS source.
*/
gulp.task('assets:stylesheets', function() {
return gulp.src('src/assets/stylesheets/*.scss')
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(
sass({
includePaths: [
'bower_components/bourbon/app/assets/stylesheets/',
'bower_components/quantum-colors/',
'bower_components/quantum-shadows/'
]
}))
.pipe(
postcss([
autoprefix(),
mqpacker
]))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulpif(args.production, mincss()))
.pipe(gulp.dest('material/assets/stylesheets/'));
});
/*
* Build javascripts from Bower components and source.
*/
gulp.task('assets:javascripts', function() {
return gulp.src([
/* Bower components */
'bower_components/classlist/classList.js',
'bower_components/fastclick/lib/fastclick.js',
'bower_components/pegasus/dist/pegasus.js',
'bower_components/lunr.js/lunr.js',
/* Application javascripts */
'src/assets/javascripts/application.js',
'src/assets/javascripts/standalone.js'
]).pipe(gulpif(args.sourcemaps, sourcemaps.init()))
.pipe(concat('application.js'))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulpif(args.production, uglify()))
.pipe(gulp.dest('material/assets/javascripts/'));
});
/*
* Create a customized modernizr build.
*/
gulp.task('assets:modernizr', [
'assets:stylesheets',
'assets:javascripts'
], function() {
return gulp.src([
'material/assets/stylesheets/application.css',
'material/assets/javascripts/application.js'
]).pipe(
modernizr({
options: [
'addTest', /* Add custom tests */
'fnBind', /* Use function.bind */
'html5printshiv', /* HTML5 support for IE */
'setClasses', /* Add CSS classes to root tag */
'testProp' /* Test for properties */
]
}))
.pipe(addsrc.append('bower_components/respond/dest/respond.src.js'))
.pipe(concat('modernizr.js'))
.pipe(gulpif(args.production, uglify()))
.pipe(gulp.dest('material/assets/javascripts'));
});
/*
* Copy static assets like images and webfonts.
*/
gulp.task('assets:static', function() {
return gulp.src('src/assets/{fonts,images}/*.{jpg,png,gif}')
.pipe(gulpif(args.production,
minimage({
optimizationLevel: 5,
progressive: true,
interlaced: true
})))
.pipe(addsrc.append('src/assets/{fonts,images}/*.{ico,eot,svg,ttf,woff}'))
.pipe(gulp.dest('material/assets/'));
});
/*
* Minify views.
*/
gulp.task('assets:views', args.production ? [
'assets:modernizr',
'assets:revisions:clean',
'assets:revisions'
] : [], function() {
return gulp.src([
'src/*.html'
]).pipe(
minhtml({
collapseBooleanAttributes: true,
removeComments: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}))
.pipe(compact())
.pipe(gulpif(args.production,
addsrc.append([
'material/manifest.json',
'material/**/*.css'
])))
.pipe(gulpif(args.production, collect()))
.pipe(ignore.exclude(/manifest\.json$/))
.pipe(gulp.dest('material'));
});
/*
* Clean outdated revisions.
*/
gulp.task('assets:revisions:clean', function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.include(/-[a-f0-9]{8,}\.(ico|css|js|png|jpg|gif)$/))
.pipe(vinyl(clean));
});
/*
* Revision assets after build.
*/
gulp.task('assets:revisions', [
'assets:revisions:clean',
'assets:stylesheets',
'assets:javascripts',
'assets:static'
], function() {
return gulp.src(['material/**/*.{ico,css,js,png,jpg,gif}'])
.pipe(ignore.exclude(/-[a-f0-9]{8,}\.(css|js|png|jpg|gif)$/))
.pipe(rev())
.pipe(gulp.dest('material'))
.pipe(rev.manifest('manifest.json'))
.pipe(gulp.dest('material'));
});
/*
* Build assets.
*/
gulp.task('assets:build', [
'assets:stylesheets',
'assets:javascripts',
'assets:modernizr',
'assets:static',
'assets:views'
]);
/*
* Watch assets for changes and rebuild on the fly.
*/
gulp.task('assets:watch', function() {
/* Rebuild stylesheets */
gulp.watch([
'src/assets/stylesheets/**/*.scss'
], ['assets:stylesheets']);
/* Rebuild javascripts */
gulp.watch([
'src/assets/javascripts/**/*.js',
'bower.json'
], ['assets:javascripts']);
/* Copy static assets */
gulp.watch([
'src/assets/{fonts,images}/*'
], ['assets:static']);
/* Minify views */
gulp.watch([
'src/*.html'
], ['assets:views']);
});
/* ----------------------------------------------------------------------------
* Application server
* ------------------------------------------------------------------------- */
/*
* Build documentation.
*/
gulp.task('mkdocs:build', [
'assets:build'
], function() {
return child.spawnSync('mkdocs', ['build']);
});
/*
* Restart MkDocs server.
*/
gulp.task('mkdocs:serve', function() {
if (server)
server.kill();
/* Spawn MkDocs server */
server = child.spawn('mkdocs', ['serve', '-a', '0.0.0.0:8000']);
/* Pretty print server log output */
server.stdout.on('data', function(data) {
var lines = data.toString().split('\n')
for (var l in lines)
if (lines[l].length)
util.log(lines[l]);
});
/* Print errors to stdout */
server.stderr.on('data', function(data) {
process.stdout.write(data.toString());
});
});
/* ----------------------------------------------------------------------------
* Interface
* ------------------------------------------------------------------------- */
/*
* Build assets and documentation.
*/
gulp.task('build', [
'assets:build'
].concat(args.mkdocs
? 'mkdocs:build'
: []));
/*
* Start asset and MkDocs watchdogs.
*/
gulp.task('watch', [
'assets:build',
], function() {
return gulp.start([
'assets:watch'
].concat(args.mkdocs
? 'mkdocs:serve'
: []));
});
/*
* Build assets by default.
*/
gulp.task('default', ['build']);
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
+7 -2
View File
@@ -1,2 +1,7 @@
recursive-include material *.ico *.js *.css *.html *.eot *.svg *.ttf *.woff
recursive-exclude site *
recursive-include material *.ico *.js *.css *.html *.svg
recursive-exclude site *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include LICENSE
include package.json
include requirements.txt
+39 -16
View File
@@ -1,27 +1,57 @@
# Material
[![Travis][travis-image]][travis-link]
[![Gitter][gitter-image]][gitter-link]
[![Codacy][codacy-image]][codacy-link]
[![Docker][docker-image]][docker-link]
[![PyPI][pypi-image]][pypi-link]
[![Travis CI][travis-image]][travis-link]
[![PyPI Downloads][pypi-dl-image]][pypi-dl-link]
[![PyPI Version][pypi-v-image]][pypi-v-link]
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
[gitter-image]: https://img.shields.io/gitter/room/squidfunk/mkdocs-material.svg
[gitter-link]: https://gitter.im/squidfunk/mkdocs-material
[codacy-image]: https://api.codacy.com/project/badge/Grade/fe07aa1fa91d453cb69711d3885c5d7e
[codacy-link]: https://www.codacy.com/app/squidfunk/mkdocs-material?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=squidfunk/mkdocs-material&amp;utm_campaign=Badge_Grade
[docker-image]: https://img.shields.io/docker/pulls/squidfunk/mkdocs-material.svg
[docker-link]: https://hub.docker.com/r/squidfunk/mkdocs-material/
[pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
[pypi-link]: https://pypi.python.org/pypi/mkdocs-material
A material design theme for [MkDocs](http://www.mkdocs.org).
# Material for MkDocs
[![iOS](docs/images/screen.png)](http://squidfunk.github.io/mkdocs-material/)
A Material Design theme for [MkDocs][1].
[![Material for MkDocs](docs/images/material.png)][2]
[1]: http://www.mkdocs.org
[2]: http://squidfunk.github.io/mkdocs-material/
## Quick start
Install with `pip`:
Install the latest version of Material with `pip`:
``` sh
pip install mkdocs-material
```
Add the following line to your `mkdocs.yml`:
Append the following line to your project's `mkdocs.yml`:
``` yaml
theme: 'material'
```
## What to expect
* Responsive design and fluid layout for all kinds of screens and devices,
designed to serve your project documentation in a user-friendly way with
optimal readability.
* Easily customizable primary and accent color, fonts, favicon and logo;
straight forward localization through theme extension; integrated with Google
Analytics, Disqus and GitHub.
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
<kbd>S</kbd>), intelligent grouping of search results, search term
highlighting and lazy loading.
For detailed installation instructions and a demo, visit
http://squidfunk.github.io/mkdocs-material/
@@ -29,7 +59,7 @@ http://squidfunk.github.io/mkdocs-material/
**MIT License**
Copyright (c) 2016 Martin Donath
Copyright (c) 2016-2017 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
@@ -48,10 +78,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
[pypi-dl-image]: https://img.shields.io/pypi/dm/mkdocs-material.png
[pypi-dl-link]: https://pypi.python.org/pypi/mkdocs-material
[pypi-v-image]: https://img.shields.io/pypi/v/mkdocs-material.png
[pypi-v-link]: https://pypi.python.org/pypi/mkdocs-material
-31
View File
@@ -1,31 +0,0 @@
{
"name": "mkdocs-material",
"version": "0.2.3",
"description": "A material design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
],
"license": "MIT",
"moduleType": [
"globals"
],
"ignore": [
"**/.*",
"bower_components",
"node_modules"
],
"private": true,
"dependencies": {
"classlist": "^2014.12.13",
"fastclick": "^1.0.6",
"lunr.js": "^0.6.0",
"pegasus": "^0.3.2",
"respond": "^1.4.2"
},
"devDependencies": {
"bourbon": "^4.2.6",
"quantum-colors": "^1.0.1",
"quantum-shadows": "^1.0.0"
}
}
+1
View File
@@ -0,0 +1 @@
../CONTRIBUTING.md
+204 -63
View File
@@ -1,104 +1,245 @@
# Customization
## A good starting point
## A great starting point
Project documentation is as diverse as the projects themselves and the Material
theme is a good starting point for making it look good. However, as you write
your documentation, you may reach some point where some small adjustments are
necessary to preserve the style.
theme is a good starting point for making it look great. However, as you write
your documentation, you may reach a point where some small adjustments are
necessary to preserve the desired style.
## Small tweaks
## Adding assets
[MkDocs][] provides a simple way for making small adjustments, that is changing
some margins, centering text, etc. Simply put the CSS and Javascript files that
contain your adjustments in the `docs` directory (ideally in subdirectories of
their own) and include them via the `extra_css` and `extra_javascript`
variables in your `mkdocs.yml`:
[MkDocs][1] provides several ways to interfere with themes. In order to make a
few tweaks to an existing theme, you can just add your stylesheets and
JavaScript files to the `docs` directory.
``` yaml
extra_css: ['/stylesheets/extra.css']
extra_javascript: ['/javascripts/extra.js']
```
[1]: http://www.mkdocs.org
Further assistance on including extra CSS and Javascript can be found in the
[MkDocs documentation][].
### Additional stylesheets
## Fundamental changes
If you want to make larger adjustments like changing the color palette or
typography, you should check out or download the repository of the project and
compile the SASS sources with your changes. The project design is very modular,
so most things can be tweaked by changing a few variables.
### Setup
In order to compile the project, you need `node` with a version greater than
`0.11` up and running. Then, make sure `bower` is installed or install it:
If you want to tweak some colors or change the spacing of certain elements,
you can do this in a separate stylesheet. The easiest way is by creating a
new stylesheet file in your `docs` directory:
``` sh
npm install -g bower
mkdir docs/stylesheets
touch docs/stylesheets/extra.css
```
The project itself is hosted on GitHub, so the next
thing you should do is clone the project from GitHub:
Then, add the following line to your `mkdocs.yml`:
``` yaml
extra_css:
- 'stylesheets/extra.css'
```
Spin up the development server with `mkdocs serve` and start typing your
changes in your additional stylesheet file you can see them instantly after
saving, as the MkDocs development server implements live reloading.
### Additional JavaScript
The same is true for additional JavaScript. If you want to integrate another
syntax highlighter or add some custom logic to your theme, create a new
JavaScript file in your `docs` directory:
``` sh
mkdir docs/javascripts
touch docs/javascripts/extra.js
```
Then, add the following line to your `mkdocs.yml`:
``` yaml
extra_javascript:
- 'javascripts/extra.js'
```
Further assistance can be found in the [MkDocs documentation][2].
[2]: http://www.mkdocs.org/user-guide/styling-your-docs/#customizing-a-theme
## Extending the theme
If you want to alter the HTML source (e.g. add or remove some part), you can
extend the theme. From version 0.16 on MkDocs implements [theme extension][3],
an easy way to override parts of a theme without forking and changing the
main theme.
[3]: http://www.mkdocs.org/user-guide/styling-your-docs/#using-the-theme_dir
### Setup and theme structure
Reference the Material theme as usual in your `mkdocs.yml`, and create a
new folder for overrides, e.g. `theme`, which you reference using `theme_dir`:
``` yaml
theme: 'material'
theme_dir: 'theme'
```
!!! warning "Theme extension prerequisites"
As the `theme_dir` variable is used for the theme extension process, the
Material theme needs to be installed via `pip` and referenced with the
`theme` parameter in your `mkdocs.yml`.
The structure in the theme directory must mirror the directory structure of the
original theme, as any file in the theme directory will replace the file with
the same name which is part of the original theme. Besides, further assets
may also be put in the theme directory.
The directory layout of the Material theme is as follows:
``` sh
.
├─ assets/
│ ├─ images/ # Images and icons
│ ├─ javascripts/ # JavaScript
│ └─ stylesheets/ # Stylesheets
├─ partials/
│ ├─ disqus.html # Disqus integration
│ ├─ footer.html # Footer bar
│ ├─ header.html # Header bar
│ ├─ language.html # Localized labels
│ ├─ nav-item.html # Main navigation item
│ ├─ nav.html # Main navigation
│ ├─ search.html # Search box
│ ├─ social.html # Social links
│ ├─ source.html # Repository information
│ ├─ tabs-item.html # Tabs navigation item
│ ├─ tabs.html # Tabs navigation
│ ├─ toc-item.html # Table of contents item
│ └─ toc.html # Table of contents
├─ 404.html # 404 error page
├─ base.html # Base template
└─ main.html # Default page
```
### Overriding partials
In order to override the footer, we can replace the `footer.html` partial with
our own partial. To do this, create the file `partials/footer.html` in the
theme directory. MkDocs will now use the new partial when rendering the theme.
This can be done with any file.
### Overriding template blocks
Besides overriding partials, one can also override so called template blocks,
which are defined inside the Material theme and wrap specific features. To
override a template block, create a `main.html` inside the theme directory and
define the block, e.g.:
``` jinja
{% extends "base.html" %}
{% block htmltitle %}
<title>Lorem ipsum dolor sit amet</title>
{% endblock %}
```
The Material theme provides the following template blocks:
| Block name | Wrapped contents |
| ------------ | ----------------------------------------------- |
| `analytics` | Wraps the Google Analytics integration |
| `content` | Wraps the main content |
| `disqus` | Wraps the disqus integration |
| `extrahead` | Empty block to define additional meta tags |
| `fonts` | Wraps the webfont definitions |
| `footer` | Wraps the footer with navigation and copyright |
| `header` | Wraps the fixed header bar |
| `htmltitle` | Wraps the `<title>` tag |
| `libs` | Wraps the JavaScript libraries, e.g. Modernizr |
| `repo` | Wraps the repository link in the header bar |
| `scripts` | Wraps the JavaScript application logic |
| `source` | Wraps the linked source files |
| `search_box` | Wraps the search form in the header bar |
| `site_meta` | Wraps the meta tags in the document head |
| `site_name` | Wraps the site name in the header bar |
| `site_nav` | Wraps the site navigation and table of contents |
| `social` | Wraps the social links in the footer |
| `styles` | Wraps the stylesheets (also extra sources) |
For more on this topic refer to the [MkDocs documentation][4]
[4]: http://www.mkdocs.org/user-guide/styling-your-docs/#overriding-template-blocks
## Theme development
The Material theme is built on modern technologies like ES6, [Webpack][5],
[Babel][6] and [SASS][7]. If you want to make more fundamental changes, it may
be necessary to make the adjustments directly in the source of the Material
theme and recompile it. This is fairly easy.
[5]: https://webpack.github.io/
[6]: https://babeljs.io
[7]: http://sass-lang.com
### Environment setup
In order to start development on the Material theme, a [Node.js][8] version of
at least 5 is required, as well as the package manager [yarn][9] which is a
better version of `npm`. First, clone the repository:
``` sh
git clone https://github.com/squidfunk/mkdocs-material
```
Then you change the directory and install all dependencies specified in the
`package.json` and `bower.json` with the following command:
Next, all dependencies need to be installed, which is done with:
``` sh
cd mkdocs-material
npm install && bower install
pip install -r requirements.txt
yarn install
```
### Development
[8]: https://nodejs.org
[9]: https://yarnpkg.com/
The asset pipeline is contained in `Gulpfile.js`, which you can start with
`gulp watch`. If you specify the `--mkdocs` flag, this will also run
`mkdocs serve`, to monitor changes to the documentation. Point your browser to [localhost:8000](http://localhost:8000) and you should see this very
documentation in front of your eyes.
### Development mode
The Material theme uses a sophisticated asset pipeline using [Gulp][10] and
Webpack which can be started with the following command:
``` sh
gulp watch --mkdocs
yarn start
```
For example, changing the color palette is as simple as changing the `$primary`
and `$accent` variables in `src/assets/stylesheets/_palette.scss`:
This will also start the MkDocs development server which will monitor changes
on assets, templates and documentation. Point your browser to
[localhost:8000][11] and you should see this documentation in front of you.
For example, changing the color palette is as simple as changing the
`$md-color-primary` and `$md-color-accent` variables in
`src/assets/stylesheets/_config.scss`:
``` css
$primary: $red-400;
$accent: $teal-a700;
$md-color-primary: $clr-red-400;
$md-color-accent: $clr-teal-a700;
```
The color variables are defined by the SASS library [quantum-colors][] and
resemble all the colors contained in the material design palette.
[This page][material-colors] offers a really good overview of the palette.
!!! warning "Automatically generated files"
### Building
Never make any changes in the `material` directory, as the contents of this
directory are automatically generated from the `src` directory and will be
overriden when the theme is built.
When you finished making your changes, you can build the theme by invoking:
[10]: http://gulpjs.com
[11]: http://localhost:8000
### Build process
When you've finished making your changes, you can build the theme by invoking:
``` sh
gulp build --production
yarn run build
```
The `--production` flag triggers the production-level compilation and
minification of all CSS and Javascript sources. When the command is ready,
the final theme is located in the `material` directory. Add the `theme_dir`
variable pointing to the aforementioned directory in your original
`mkdocs.yml`:
``` yaml
theme_dir: 'mkdocs-material/material'
```
This triggers the production-level compilation and minification of all
stylesheets and JavaScript sources. When the command exits, the final theme is
located in the `material` directory. Add the `theme_dir` variable pointing to
the aforementioned directory in your original `mkdocs.yml`.
Now you can run `mkdocs build` and you should see your documentation with your
changes to the original Material theme.
[MkDocs]: http://www.mkdocs.org
[MkDocs documentation]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
[quantum-colors]: https://github.com/nkpfstr/quantum-colors
[material-colors]: http://www.materialui.co/colors
+432
View File
@@ -0,0 +1,432 @@
# Admonition
[Admonition][1] is an extension included in the standard Markdown library that
makes it possible to add block-styled side content to your documentation, for
example summaries, notes, hints or warnings.
[1]: https://pythonhosted.org/Markdown/extensions/admonition.html
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- admonition
```
## Usage
Admonition blocks follow a simple syntax: every block is started with `!!!`,
followed by a single keyword which is used as the [type qualifier][2] of the
block. The content of the block then follows on the next line, indented by
four spaces.
Example:
``` markdown
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
[2]: #types
### Changing the title
By default, the block title will equal the type qualifier in titlecase. However,
it can easily be changed by adding a quoted string after the type qualifier.
Example:
``` markdown
!!! note "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! note "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
### Removing the title
Similar to setting a [custom title][3], the icon and title can be omitted by
providing an empty string after the type qualifier:
Example:
``` markdown
!!! note ""
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! note ""
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
[3]: #changing-the-title
### Embedded code blocks
Blocks can contain all kinds of text content, including headlines, lists,
paragraphs and other blocks except code blocks, because the parser from the
standard Markdown library does not account for those.
However, the [PyMdown Extensions][4] package adds an extension called
[SuperFences][5], which makes it possible to nest code blocks within other
blocks, respectively Admonition blocks.
[4]: https://facelessuser.github.io/pymdown-extensions
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
Example:
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
Nunc eu odio eleifend, blandit leo a, volutpat sapien. Phasellus posuere in
sem ut cursus. Nullam sit amet tincidunt ipsum, sit amet elementum turpis.
Etiam ipsum quam, mattis in purus vitae, lacinia fermentum enim.
### Collapsible blocks
The [Details][6] extension which is also part of the [PyMdown Extensions][4]
package adds support for rendering collapsible Admonition blocks. This is
useful for FAQs or content that is of secondary nature.
Example:
``` markdown
??? note "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
??? note "Phasellus posuere in sem ut cursus"
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
By adding a `+` sign directly after the start marker, blocks can be rendered
open by default.
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
## Types
Admonition supports user-defined type qualifiers which may influence the style
of the inserted block. Following is a list of type qualifiers provided by the
Material theme, whereas the default type, and thus fallback for unknown type
qualifiers, is `note`.
### Note
Example:
``` markdown
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! note
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `note`
* `seealso`
### Summary
Example:
``` markdown
!!! summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `summary`
* `tldr`
### Info
Example:
``` markdown
!!! info
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! info
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `info`
* `todo`
### Tip
Example:
``` markdown
!!! tip
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! tip
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `tip`
* `hint`
* `important`
### Success
Example:
``` markdown
!!! success
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! success
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `success`
* `check`
* `done`
### Question
Example:
``` markdown
!!! question
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! question
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `question`
* `help`
* `faq`
### Warning
Example:
``` markdown
!!! warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! warning
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `warning`
* `caution`
* `attention`
### Failure
Example:
``` markdown
!!! failure
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! failure
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `failure`
* `fail`
* `missing`
### Danger
Example:
``` markdown
!!! danger
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! danger
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `danger`
* `error`
### Bug
Example:
``` markdown
!!! bug
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! bug
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `bug`
### Quote
Example:
``` markdown
!!! quote
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
!!! quote
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
Qualifiers:
* `quote`
* `cite`
+863
View File
@@ -0,0 +1,863 @@
# CodeHilite
[CodeHilite][1] is an extension that adds syntax highlighting to code blocks
and is included in the standard Markdown library. The highlighting process is
executed during compilation of the Markdown file.
!!! failure "Syntax highlighting not working?"
Please ensure that [Pygments][2] is installed. See the next section for
further directions on how to set up Pygments or use the official
[Docker image][3] with all dependencies pre-installed.
[1]: https://pythonhosted.org/Markdown/extensions/code_hilite.html
[2]: http://pygments.org
[3]: https://hub.docker.com/r/squidfunk/mkdocs-material/
## Installation
CodeHilite parses code blocks and wraps them in `pre` tags. If [Pygments][2]
is installed, which is a generic syntax highlighter with support for over
[300 languages][4], CodeHilite will also highlight the code block. Pygments can
be installed with the following command:
``` sh
pip install pygments
```
To enable CodeHilite, add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite
```
!!! warning "Migrating from Material 0.2.x"
In 0.2.x the CodeHilite extension was included with
`codehilite(css_class=code)` which switched the CSS class from
`.codehilite` to `.code`. The current version of the theme doesn't require
that and defines styles for the default `.codehilite` class, so the part
`css_class=code` needs to be removed.
[4]: http://pygments.org/languages
## Usage
### Specifying the language
The CodeHilite extension uses the same syntax as regular Markdown code blocks,
but needs to know the language of the code block. This can be done in three
different ways.
#### via Markdown syntax <small>recommended</small>
In Markdown, code blocks can be opened and closed by writing three backticks on
separate lines. To add code highlighting to those blocks, the easiest way is
to specify the language directly after the opening block.
Example:
```` markdown
``` python
import tensorflow as tf
```
````
Result:
``` python
import tensorflow as tf
```
#### via Shebang
Alternatively, if the first line of a code block contains a shebang, the
language is derived from the path referenced in the shebang. This will only
work for code blocks that are indented using four spaces, not for those
encapsulated in three backticks.
Example:
```` markdown
#!/usr/bin/python
import tensorflow as tf
````
Result:
``` python
#!/usr/bin/python
import tensorflow as tf
```
#### via three colons
If the first line starts with three colons followed by a language identifier,
the first line is stripped. This will only work for code blocks that are
indented using four spaces, not for those encapsulated in three backticks.
Example:
``` markdown
:::python
import tensorflow as tf
```
Result:
:::python
import tensorflow as tf
### Adding line numbers
Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite:
linenums:true
```
Example:
```` markdown
``` python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
### Highlighting specific lines
Specific lines can be highlighted by passing the line numbers to the `hl_lines`
argument placed right after the language identifier. Line counts start at 1.
Example:
```` markdown
``` python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
````
Result:
#!python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
## Supported languages <small>excerpt</small>
CodeHilite uses [Pygments][2], a generic syntax highlighter with support for
over [300 languages][3], so the following list of examples is just an excerpt.
### Bash
``` bash
#!/bin/bash
for OPT in "$@"
do
case "$OPT" in
'-f' ) canonicalize=1 ;;
'-n' ) switchlf="-n" ;;
esac
done
# readlink -f
function __readlink_f {
target="$1"
while test -n "$target"; do
filepath="$target"
cd `dirname "$filepath"`
target=`readlink "$filepath"`
done
/bin/echo $switchlf `pwd -P`/`basename "$filepath"`
}
if [ ! "$canonicalize" ]; then
readlink $switchlf "$@"
else
for file in "$@"
do
case "$file" in
-* ) ;;
* ) __readlink_f "$file" ;;
esac
done
fi
exit $?
```
### C
``` c
extern size_t
pb_varint_scan(const uint8_t data[], size_t left) {
assert(data && left);
left = left > 10 ? 10 : left;
#ifdef __SSE2__
/* Mapping: remaining bytes ==> bitmask */
static const int mask_map[] = {
0x0000, 0x0001, 0x0003, 0x0007,
0x000F, 0x001F, 0x003F, 0x007F,
0x00FF, 0x01FF, 0x03FF
};
/* Load buffer into 128-bit integer and create high-bit mask */
__m128i temp = _mm_loadu_si128((const __m128i *)data);
__m128i high = _mm_set1_epi8(0x80);
/* Intersect and extract mask with high-bits set */
int mask = _mm_movemask_epi8(_mm_and_si128(temp, high));
mask = (mask & mask_map[left]) ^ mask_map[left];
/* Count trailing zeroes */
return mask ? __builtin_ctz(mask) + 1 : 0;
#else
/* Linear scan */
size_t size = 0;
while (data[size++] & 0x80)
if (!--left)
return 0;
return size;
#endif /* __SSE2__ */
}
```
### C++
``` cpp
Extension::
Extension(const Descriptor *descriptor, const Descriptor *scope) :
descriptor_(descriptor),
scope_(scope) {
/* Extract full name for signature */
variables_["signature"] = descriptor_->full_name();
/* Prepare message symbol */
variables_["message"] = StringReplace(
variables_["signature"], ".", "_", true);
LowerString(&(variables_["message"]));
/* Suffix scope to identifiers, if given */
string suffix ("");
if (scope_) {
suffix = scope_->full_name();
/* Check if the base and extension types are in the same package */
if (!scope_->file()->package().compare(descriptor_->file()->package()))
suffix = StripPrefixString(suffix,
scope_->file()->package() + ".");
/* Append to signature */
variables_["signature"] += ".[" + suffix +"]";
suffix = "_" + suffix;
}
/* Prepare extension symbol */
variables_["extension"] = StringReplace(
suffix, ".", "_", true);
LowerString(&(variables_["extension"]));
}
```
### C&#35;
``` csharp
public static void Send(
Socket socket, byte[] buffer, int offset, int size, int timeout) {
int startTickCount = Environment.TickCount;
int sent = 0;
do {
if (Environment.TickCount > startTickCount + timeout)
throw new Exception("Timeout.");
try {
sent += socket.Send(buffer, offset + sent,
size - sent, SocketFlags.None);
} catch (SocketException ex) {
if (ex.SocketErrorCode == SocketError.WouldBlock ||
ex.SocketErrorCode == SocketError.IOPending ||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable) {
/* Socket buffer is probably full, wait and try again */
Thread.Sleep(30);
} else {
throw ex;
}
}
} while (sent < size);
}
```
### Clojure
``` clojure
(clojure-version)
(defn partition-when
[f]
(fn [rf]
(let [a (java.util.ArrayList.)
fval (volatile! false)]
(fn
([] (rf))
([result]
(let [result (if (.isEmpty a)
result
(let [v (vec (.toArray a))]
;; Clear first
(.clear a)
(unreduced (rf result v))))]
(rf result)))
([result input]
(if-not (and (f input) @fval)
(do
(vreset! fval true)
(.add a input)
result)
(let [v (vec (.toArray a))]
(.clear a)
(let [ret (rf result v)]
(when-not (reduced? ret)
(.add a input))
ret))))))))
(into [] (partition-when
#(.startsWith % ">>"))
["1d" "33" ">> 1" ">> 2" "22" ">> 3"])
```
### Diff
``` diff
Index: grunt.js
===================================================================
--- grunt.js (revision 31200)
+++ grunt.js (working copy)
@@ -12,6 +12,7 @@
module.exports = function (grunt) {
+ console.log('hello world');
// Project configuration.
grunt.initConfig({
lint: {
@@ -19,10 +20,6 @@
'packages/services.web/{!(test)/**/,}*.js',
'packages/error/**/*.js'
],
- scripts: [
- 'grunt.js',
- 'db/**/*.js'
- ],
browser: [
'packages/web/server.js',
'packages/web/server/**/*.js',
```
### Docker
``` docker
FROM ubuntu
# Install vnc, xvfb in order to create a 'fake' display and firefox
RUN apt-get update && apt-get install -y x11vnc xvfb firefox
RUN mkdir ~/.vnc
# Setup a password
RUN x11vnc -storepasswd 1234 ~/.vnc/passwd
# Autostart firefox (might not be the best way, but it does the trick)
RUN bash -c 'echo "firefox" >> /.bashrc'
EXPOSE 5900
CMD ["x11vnc", "-forever", "-usepw", "-create"]
```
### Elixir
``` elixir
require Logger
def accept(port) do
{:ok, socket} = :gen_tcp.listen(port,
[:binary, packet: :line, active: false, reuseaddr: true])
Logger.info "Accepting connections on port #{port}"
loop_acceptor(socket)
end
defp loop_acceptor(socket) do
{:ok, client} = :gen_tcp.accept(socket)
serve(client)
loop_acceptor(socket)
end
defp serve(socket) do
socket
|> read_line()
|> write_line(socket)
serve(socket)
end
defp read_line(socket) do
{:ok, data} = :gen_tcp.recv(socket, 0)
data
end
defp write_line(line, socket) do
:gen_tcp.send(socket, line)
end
```
### Erlang
``` erlang
circular(Defs) ->
[ { { Type, Base }, Fields } ||
{ { Type, Base }, Fields } <- Defs, Type == msg, circular(Base, Defs) ].
circular(Base, Defs) ->
Fields = proplists:get_value({ msg, Base }, Defs),
circular(Defs, Fields, [Base]).
circular(_Defs, [], _Path) ->
false;
circular(Defs, [Field | Fields], Path) ->
case Field#field.type of
{ msg, Type } ->
case lists:member(Type, Path) of
false ->
Children = proplists:get_value({ msg, Type }, Defs),
case circular(Defs, Children, [Type | Path]) of
false -> circular(Defs, Fields, Path);
true -> true
end;
true ->
Type == lists:last(Path) andalso
(length(Path) == 1 orelse not is_tree(Path))
end;
_ ->
circular(Defs, Fields, Path)
end.
```
### F&#35;
``` fsharp
/// Asynchronously download retangles from the server
/// and decode the JSON format to F# Rectangle record
let [<Js>] getRectangles () : Async<Rectangle[]> = async {
let req = XMLHttpRequest()
req.Open("POST", "/get", true)
let! resp = req.AsyncSend()
return JSON.parse(resp) }
/// Repeatedly update rectangles after 0.5 sec
let [<Js>] updateLoop () = async {
while true do
do! Async.Sleep(500)
let! rects = getRectangles()
cleanRectangles()
rects |> Array.iter createRectangle }
```
### Go
``` go
package main
import "fmt"
func counter(id int, channel chan int, closer bool) {
for i := 0; i < 10000000; i++ {
fmt.Println("process", id," send", i)
channel <- 1
}
if closer { close(channel ) }
}
func main() {
channel := make(chan int)
go counter(1, channel, false)
go counter(2, channel, true)
x := 0
// receiving data from channel
for i := range channel {
fmt.Println("receiving")
x += i
}
fmt.Println(x)
}
```
### HTML
``` html
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>HTML5 Boilerplate</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<p>Hello world! This is HTML5 Boilerplate.</p>
</body>
</html>
```
### Java
``` java
import java.util.LinkedList;
import java.lang.reflect.Array;
public class UnsortedHashSet<E> {
private static final double LOAD_FACTOR_LIMIT = 0.7;
private int size;
private LinkedList<E>[] con;
public UnsortedHashSet() {
con = (LinkedList<E>[])(new LinkedList[10]);
}
public boolean add(E obj) {
int oldSize = size;
int index = Math.abs(obj.hashCode()) % con.length;
if (con[index] == null)
con[index] = new LinkedList<E>();
if (!con[index].contains(obj)) {
con[index].add(obj);
size++;
}
if (1.0 * size / con.length > LOAD_FACTOR_LIMIT)
resize();
return oldSize != size;
}
private void resize() {
UnsortedHashSet<E> temp = new UnsortedHashSet<E>();
temp.con = (LinkedList<E>[])(new LinkedList[con.length * 2 + 1]);
for (int i = 0; i < con.length; i++) {
if (con[i] != null)
for (E e : con[i])
temp.add(e);
}
con = temp.con;
}
public int size() {
return size;
}
}
```
### JavaScript
``` javascript
var Math = require('lib/math');
var _extends = function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
var e = exports.e = 2.71828182846;
exports['default'] = function (x) {
return Math.exp(x);
};
module.exports = _extends(exports['default'], exports);
```
### JSON
``` json
{
"name": "mkdocs-material",
"version": "0.2.4",
"description": "A Material Design theme for MkDocs",
"homepage": "http://squidfunk.github.io/mkdocs-material/",
"authors": [
"squidfunk <martin.donath@squidfunk.com>"
],
"license": "MIT",
"main": "Gulpfile.js",
"scripts": {
"start": "./node_modules/.bin/gulp watch --mkdocs",
"build": "./node_modules/.bin/gulp build --production"
}
...
}
```
### Julia
``` julia
using MXNet
mlp = @mx.chain mx.Variable(:data) =>
mx.FullyConnected(name=:fc1, num_hidden=128) =>
mx.Activation(name=:relu1, act_type=:relu) =>
mx.FullyConnected(name=:fc2, num_hidden=64) =>
mx.Activation(name=:relu2, act_type=:relu) =>
mx.FullyConnected(name=:fc3, num_hidden=10) =>
mx.SoftmaxOutput(name=:softmax)
# data provider
batch_size = 100
include(Pkg.dir("MXNet", "examples", "mnist", "mnist-data.jl"))
train_provider, eval_provider = get_mnist_providers(batch_size)
# setup model
model = mx.FeedForward(mlp, context=mx.cpu())
# optimization algorithm
optimizer = mx.SGD(lr=0.1, momentum=0.9)
# fit parameters
mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
```
### Lua
``` lua
local ffi = require("ffi")
ffi.cdef[[
void Sleep(int ms);
int poll(struct pollfd *fds, unsigned long nfds, int timeout);
]]
local sleep
if ffi.os == "Windows" then
function sleep(s)
ffi.C.Sleep(s*1000)
end
else
function sleep(s)
ffi.C.poll(nil, 0, s * 1000)
end
end
for i = 1,160 do
io.write("."); io.flush()
sleep(0.01)
end
io.write("\n")
```
### MySQL
``` mysql
SELECT
Employees.EmployeeID,
Employees.Name,
Employees.Salary,
Manager.Name AS Manager
FROM
Employees
LEFT JOIN
Employees AS Manager
ON
Employees.ManagerID = Manager.EmployeeID
WHERE
Employees.EmployeeID = '087652';
```
### PHP
``` php
<?php
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
class LuckyController {
/**
* @Route("/lucky/number")
*/
public function numberAction() {
$number = mt_rand(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}
```
### Protocol Buffers
``` proto
syntax = "proto2";
package caffe;
// Specifies the shape (dimensions) of a Blob.
message BlobShape {
repeated int64 dim = 1 [packed = true];
}
message BlobProto {
optional BlobShape shape = 7;
repeated float data = 5 [packed = true];
repeated float diff = 6 [packed = true];
// 4D dimensions -- deprecated. Use "shape" instead.
optional int32 num = 1 [default = 0];
optional int32 channels = 2 [default = 0];
optional int32 height = 3 [default = 0];
optional int32 width = 4 [default = 0];
}
```
### Python
``` python
"""
A very simple MNIST classifier.
See extensive documentation at
http://tensorflow.org/tutorials/mnist/beginners/index.md
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# Import data
from tensorflow.examples.tutorials.mnist import input_data
import tensorflow as tf
flags = tf.app.flags
FLAGS = flags.FLAGS
flags.DEFINE_string('data_dir', '/tmp/data/', 'Directory for storing data')
mnist = input_data.read_data_sets(FLAGS.data_dir, one_hot=True)
sess = tf.InteractiveSession()
# Create the model
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b = tf.Variable(tf.zeros([10]))
y = tf.nn.softmax(tf.matmul(x, W) + b)
```
### Ruby
``` ruby
require 'finity/event'
require 'finity/machine'
require 'finity/state'
require 'finity/transition'
require 'finity/version'
module Finity
class InvalidCallback < StandardError; end
class MissingCallback < StandardError; end
class InvalidState < StandardError; end
# Class methods to be injected into the including class upon inclusion.
module ClassMethods
# Instantiate a new state machine for the including class by accepting a
# block with state and event (and subsequent transition) definitions.
def finity options = {}, &block
@finity ||= Machine.new self, options, &block
end
# Return the names of all registered states.
def states
@finity.states.map { |name, _| name }
end
# Return the names of all registered events.
def events
@finity.events.map { |name, _| name }
end
end
# Inject methods into the including class upon inclusion.
def self.included base
base.extend ClassMethods
end
end
```
### XML
``` xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mainTag SYSTEM "some.dtd" [ENTITY % entity]>
<?oxygen RNGSchema="some.rng" type="xml"?>
<xs:main-Tag xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This is a sample comment -->
<childTag attribute="Quoted Value" another-attribute='Single quoted value'
a-third-attribute='123'>
<withTextContent>Some text content</withTextContent>
<withEntityContent>Some text content with &lt;entities&gt; and
mentioning uint8_t and int32_t</withEntityContent>
<otherTag attribute='Single quoted Value'/>
</childTag>
<![CDATA[ some CData ]]>
</main-Tag>
```
+84
View File
@@ -0,0 +1,84 @@
# Footnotes
[Footnotes][1] is another extension included in the standard Markdown library.
As the name says, it adds the ability to add footnotes to your documentation.
[1]: https://pythonhosted.org/Markdown/extensions/footnotes.html
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- footnotes
```
## Usage
The markup for footnotes is similar to the standard Markdown markup for links.
A reference is inserted in the text, which can then be defined at any point in
the document.
### Inserting the reference
The footnote reference is enclosed in square brackets and starts with a caret,
followed by an arbitrary label which may contain numeric identifiers [1, 2, 3,
...] or names [Granovetter et al. 1998]. The rendered references are always
consecutive superscripted numbers.
Example:
``` markdown
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
```
Result:
Lorem ipsum[^1] dolor sit amet, consectetur adipiscing elit.[^2]
### Inserting the content
The footnote content is also declared with a label, which must match the label
used for the footnote reference. It can be inserted at an arbitrary position in
the document and is always rendered at the bottom of the page. Furthermore, a
backlink is automatically added to the footnote reference.
#### on a single line
Short statements can be written on the same line.
Example:
``` markdown
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
```
Result:
<a href="#fn:1">Jump to footnote at the bottom of the page</a>
[^1]: Lorem ipsum dolor sit amet, consectetur adipiscing elit.
#### on multiple lines
Paragraphs should be written on the next line. As with all Markdown blocks, the
content must be indented by four spaces.
Example:
``` markdown
[^2]:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor
massa, nec semper lorem quam in massa.
```
Result:
[^2]:
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod
nulla. Curabitur feugiat, tortor non consequat finibus, justo purus
auctor massa, nec semper lorem quam in massa.
<a href="#fn:2">Jump to footnote at the bottom of the page</a>
+99
View File
@@ -0,0 +1,99 @@
path: tree/master/docs/extensions
source: metadata.md
# Metadata
The [Metadata][1] extension makes it possible to add metadata to a document
which gives more control over the theme in a page-specific context.
[1]: https://pythonhosted.org/Markdown/extensions/meta_data.html
## Installation
Add the following lines to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- meta
```
## Usage
Metadata is written as a series of key-value pairs at the beginning of the
Markdown document, delimited by a blank line which ends the metadata context.
Naturally, the metadata is stripped from the document before rendering the
actual page content and made available to the theme.
Example:
``` markdown
title: Lorem ipsum dolor sit amet
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
path: path/to/file
source: file.js
# Headline
...
```
See the next section which covers the metadata that is supported by Material.
### Overriding the title
The page title can be overridden on a per-document level:
``` markdown
title: Lorem ipsum dolor sit amet
```
This will set the `title` tag inside the document `head` for the current page
to the provided value. It will also override the default behavior of Material
for MkDocs which appends the site title using a dash as a separator to the page
title.
### Overriding the description
The page description can also be overridden on a per-document level:
``` yaml
description: Nullam urna elit, malesuada eget finibus ut, ac tortor.
```
This will set the `meta` tag containing the site description inside the
document `head` for the current page to the provided value.
### Linking sources
When a document is related to a specific set of source files and the `repo_url`
is defined inside the project's `mkdocs.yml`, the files can be linked using the
`source` key:
``` markdown
source: file.js
```
A new entry at the bottom of the table of contents is generated that is linking
to the section listing the linked source files. Multiple files can be linked by
adding filenames on separate lines:
``` markdown
source: file.js
file.css
```
The filenames are appended to the `repo_url` set in your `mkdocs.yml`, but can
be prefixed with a `path` to ensure correct path resolving:
Example:
``` markdown
path: tree/master/docs/extensions
source: metadata.md
```
Result:
See the [source][2] section for the resulting output.
[2]: #__source
+33
View File
@@ -0,0 +1,33 @@
# Permalinks
Permalinks are a feature of the [Table of Contents][1] extension, which is part
of the standard Markdown library. The extension inserts an anchor at the end of
each headline, which makes it possible to directly link to a subpart of the
document.
[1]: https://pythonhosted.org/Markdown/extensions/toc.html
## Installation
To enable permalinks, add the following to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- toc:
permalink: true
```
This will add a link containing the paragraph symbol `` at the end of each
headline (exactly like on the page you're currently viewing), which the
Material theme will make appear on hover. In order to change the text of the
permalink, a string can be passed, e.g.:
``` markdown
markdown_extensions:
- toc:
permalink: Link
```
## Usage
When enabled, permalinks are inserted automatically.
+286
View File
@@ -0,0 +1,286 @@
# PyMdown Extensions
[PyMdown Extensions][1] is a collection of Markdown extensions that add some
great features to the standard Markdown library. For this reason, the
**installation of this package is highly recommended** as it's well-integrated
with the Material theme.
[1]: http://facelessuser.github.io/pymdown-extensions/
## Installation
The PyMdown Extensions package can be installed with the following command:
``` sh
pip install pymdown-extensions
```
The following list of extensions that are part of the PyMdown Extensions
package are recommended to be used together with the Material theme:
``` yaml
markdown_extensions:
- pymdownx.arithmatex
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
```
## Usage
### Arithmatex <small>MathJax</small>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script>
[Arithmatex][2] integrates Material with [MathJax][3] which parses
block-style and inline equations written in TeX markup and outputs them in
mathematical notation. See [this thread][4] for a short introduction and quick
reference on how to write equations in TeX syntax.
Besides activating the extension in the `mkdocs.yml`, the MathJax JavaScript
runtime needs to be included. This must be done with
[additional JavaScript][5]:
``` yaml
extra_javascript:
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
```
If you want to override the default MathJax configuration, you can do this by
adding another JavaScript file **before** the MathJax runtime in
`extra_javascript` which contains your MathJax configuration, e.g.:
``` js
window.MathJax = {
tex2jax: {
inlineMath: [ ["\\(","\\)"] ],
displayMath: [ ["\\[","\\]"] ]
},
TeX: {
TagSide: "right",
TagIndent: ".8em",
MultLineWidth: "85%",
equationNumbers: {
autoNumber: "AMS",
},
unicode: {
fonts: "STIXGeneral,'Arial Unicode MS'"
}
},
displayAlign: "left",
showProcessingMessages: false,
messageStyle: "none"
};
```
In your `mkdocs.yml`, include it with:
``` yaml
extra_javascript:
- 'javascripts/extra.js'
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
```
[2]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
[3]: https://www.mathjax.org/
[4]: http://meta.math.stackexchange.com/questions/5020/
[5]: ../customization.md#additional-javascript
#### Blocks
Blocks are enclosed in `:::tex $$...$$` which are placed on separate lines.
Example:
``` tex
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
```
Result:
$$
\frac{n!}{k!(n-k)!} = \binom{n}{k}
$$
#### Inline
Inline equations need to be enclosed in `:::tex $...$`:
Example:
``` tex
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
```
Result:
Lorem ipsum dolor sit amet: $p(x|y) = \frac{p(y|x)p(x)}{p(y)}$
### BetterEm
[BetterEm][6] improves the handling of emphasis markup (**bold** and *italic*)
within Markdown by providing a more sophisticated parser for better detecting
start and end tokens. Read the documentation for [usage notes][7].
[6]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
[7]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
### Caret
[Caret][8] makes it possible to highlight ^^inserted text^^. The portion of
text that should be marked as added must be enclosed in two carets `^^...^^`.
[8]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
### Critic
[Critic][9] implements [Critic Markup][10], a Markdown extension that enables
the tracking of changes (additions, deletions and comments) on documents.
During compilation of the Markdown document, changes can be rendered (default),
accepted or rejected.
Text can be {--deleted--} and replacement text {++added++}. This can also be
combined into {~~one~>a single~~} operation. {==Highlighting==} is also
possible {>>and comments can be added inline<<}.
{==
Formatting can also be applied to blocks, by putting the opening and closing
tags on separate lines and adding new lines between the tags and the content.
==}
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/
[10]: http://criticmarkup.com/
### Details
[Details][11] adds collapsible [Admonition-style blocks][12] which can contain
arbitrary content using the HTML5 `details` and `summary` tags. Additionally,
all Admonition qualifiers can be used, e.g. `note`, `question`, `warning` etc.:
??? question "How many Prolog programmers does it take to change a lightbulb?"
Yes.
[11]: https://facelessuser.github.io/pymdown-extensions/extensions/details/
[12]: admonition.md
### Emoji
[Emoji][13] adds the ability to insert a :shit:-load of emojis that we use in
our daily lives. See the [EmojiOne demo][14] for a list of all available
emojis. Happy scrolling :tada:
!!! warning "Legal disclaimer"
Material has no affiliation with [EmojiOne][15] which is released under
[CC BY 4.0][16]. When including EmojiOne images or CSS, please read the
[EmojiOne license][17] to ensure proper usage and attribution.
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
[14]: https://emoji.codes/
[15]: http://emojione.com
[16]: https://creativecommons.org/licenses/by/4.0/legalcode
[17]: http://emojione.com/licensing/
### InlineHilite
[InlineHilite][18] adds support for inline code highlighting. It's useful for
short snippets included within body copy, e.g. `#!js var test = 0;` and can be
achived by prefixing inline code with a shebang and language identifier,
e.g. `#!js`.
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
### MagicLink
[MagicLink][19] detects links in Markdown and auto-generates the necessary
markup, so no special syntax is required. It auto-links `http[s]://` and
`ftp://` links, as well as references to email addresses.
[19]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
### Mark
[Mark][20] adds the ability to ==highlight text== like it was marked with a
==text marker==. The portion of text that should be highlighted must be
enclosed in two equal signs `==...==`.
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
### SmartSymbols
[SmartSymbols][21] converts markup for special characters into their
corresponding symbols, e.g. arrows (<--, -->, <-->), trademark and copyright
symbols ((c), (tm), (r)) and fractions (1/2, 1/4, ...).
[21]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
### SuperFences
[SuperFences][22] provides the ability to nest code blocks under blockquotes,
lists and other block elements, which the [Fenced Code Blocks][23] extension
from the standard Markdown library doesn't parse correctly.
[22]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[23]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
### Tasklist
[Tasklist][24] adds support for styled checkbox lists. This is useful for
keeping track of tasks and showing what has been done and has yet to be done.
Checkbox lists are like regular lists, but prefixed with `[ ]` for empty or
`[x]` for filled checkboxes.
Example:
``` markdown
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
* [x] Nulla lobortis egestas semper
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
* [ ] Vestibulum convallis sit amet nisi a tincidunt
* [x] In hac habitasse platea dictumst
* [x] In scelerisque nibh non dolor mollis congue sed et metus
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
* [ ] Praesent sed risus massa
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
```
Result:
* [x] Lorem ipsum dolor sit amet, consectetur adipiscing elit
* [x] Nulla lobortis egestas semper
* [x] Curabitur elit nibh, euismod et ullamcorper at, iaculis feugiat est
* [ ] Vestibulum convallis sit amet nisi a tincidunt
* [x] In hac habitasse platea dictumst
* [x] In scelerisque nibh non dolor mollis congue sed et metus
* [x] Sed egestas felis quis elit dapibus, ac aliquet turpis mattis
* [ ] Praesent sed risus massa
* [ ] Aenean pretium efficitur erat, donec pharetra, ligula non scelerisque
* [ ] Nulla vel eros venenatis, imperdiet enim id, faucibus nisi
[24]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
### Tilde
[Tilde][25] provides an easy way to ~~strike through~~ cross out text.
The portion of text that should be erased must be enclosed in two tildes
`~~...~~` and the extension will take care of the rest.
[25]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
+421 -190
View File
@@ -2,113 +2,143 @@
## Installation
!!! tip "Set up Material using Docker"
The official [Docker image][1] for Material comes with all dependencies
pre-installed and ready-to-use with the latest version published on PyPI,
packaged in a very small image (23MB compressed).
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
### Installing MkDocs
Before installing [MkDocs][], you need to make sure you have Python and `pip`
the Python package manager up and running. Assuming you are a developer and
have a basic understanding of how things work and what StackOverflow is, we
won't provide guidelines on setting those up. You can verify if you're already
Before installing [MkDocs][2], you need to make sure you have Python and `pip`
the Python package manager up and running. You can verify if you're already
good to go with the following commands:
``` sh
python --version
# Python 2.7.2
# Python 2.7.13
pip --version
# pip 1.5.2
# pip 9.0.1
```
Installing and verifying MkDocs is as simple as:
``` sh
pip install mkdocs && mkdocs --version
# mkdocs, version 0.15.2
# mkdocs, version 0.16.0
```
!!! warning "MkDocs version requirements"
Material requires MkDocs >= 0.16.
[2]: http://www.mkdocs.org
### Installing Material
Next, assuming you have MkDocs up and running `mkdocs-material` can be
installed with `pip`:
#### using pip
Material can be installed with `pip`:
``` sh
pip install mkdocs-material
```
## Usage
#### using choco
If you haven't already done it, creating a new documentation project is really
simple in MkDocs:
If you're on Windows you can use [Chocolatey][3] to install [Material][4]:
``` sh
mkdocs new my-project
cd my-project
``` dos
choco install mkdocs-material
```
MkDocs will create the necessary files and base directory structure inside the
folder `my-project`. In order to enable the theme just add the following line
to the auto-generated `mkdocs.yml`:
This will install all required dependencies like [Python][5] and [MkDocs][6].
[3]: https://chocolatey.org
[4]: https://chocolatey.org/packages/mkdocs-material
[5]: https://chocolatey.org/packages/python
[6]: https://chocolatey.org/packages/mkdocs
#### cloning from GitHub
Material can also be used without a system-wide installation by cloning the
repository into a subfolder of your project's root directory:
``` sh
git clone https://github.com/squidfunk/mkdocs-material.git
```
This is especially useful if you want to [extend the theme][7] and
[override some parts][8] of the theme. The theme will reside in the folder
`mkdocs-material/material`.
[7]: customization.md#extending-the-theme
[8]: customization.md#overriding-partials
### Troubleshooting
!!! warning "Installation on macOS"
When you're running the pre-installed version of Python on macOS, `pip`
tries to install packages in a folder for which your user might not have
the adequate permissions. There are two possible solutions for this:
1. **Installing in user space** (recommended): Provide the `--user` flag
to the install command and `pip` will install the package in a user-site
location. This is the recommended way.
2. **Switching to a homebrewed Python**: Upgrade your Python installation
to a self-contained solution by installing Python with Homebrew. This
should eliminate a lot of problems you may be having with `pip`.
!!! failure "Error: unrecognized theme 'material'"
If you run into this error, the most common reason is that you installed
MkDocs through some package manager (e.g. Homebrew or `apt-get`) and the
Material theme through `pip`, so both packages end up in different
locations. MkDocs only checks its install location for themes.
## Usage
In order to enable the theme just add one of the following lines to your
project's `mkdocs.yml`. If you installed Material using pip:
``` yaml
theme: 'material'
```
If your project is hosted on GitHub, add the repository link to the
configuration. If the `repo_name` equals **GitHub**, the Material theme will
add a download and star button, and display the number of stars:
If you cloned Material from GitHub:
``` yaml
repo_name: 'GitHub'
repo_url: 'https://github.com/my-github-handle/my-project'
theme_dir: 'mkdocs-material/material'
```
MkDocs includes a development server, so you can view your changes as you go -
very handy. Spin it up with the following command:
MkDocs includes a development server, so you can review your changes as you go.
The development server can be started with the following command:
``` sh
mkdocs serve
```
Now you can go to [localhost:8000](http://localhost:8000) and the Material
theme should be visible. You can now start writing your documentation, or read
on and customize the theme through some options.
Now you can point your browser to [http://localhost:8000][9] and the Material
theme should be visible. From here on, you can start writing your documentation,
or read on and customize the theme through some options.
[9]: http://localhost:8000
## Options
The Material theme adds some extra variables for configuration via your
project's `mkdocs.yml`. See the following section for all available options.
### Adding a version
In order to add the current version next to the project banner inside the
drawer, you can set the variable `extra.version`:
``` yaml
extra:
version: '0.1.0'
```
This will also change the link behind the download button to point to the
archive with the respective version on GitHub, assuming a release tagged with
this exact version identifier.
### Adding a logo
If your project has a logo, you can add it to the drawer/navigation by defining
the variable `extra.logo`. Ideally, the image of your logo should have
rectangular shape with a minimum resolution of 128x128 and leave some room
towards the edges. The logo will also be used as a web application icon on iOS.
Simply create the folder `docs/images`, add your image and reference it via:
``` yaml
extra:
logo: 'images/logo.png'
```
project's `mkdocs.yml`. See the following sections for all available options.
### Changing the color palette
Material defines a default hue for every primary and accent color on Google's
material design [color palette][]. This makes it very easy to change the
overall look of the theme. Just set the variables `extra.palette.primary` and
`extra.palette.accent` to one of the colors defined in the palette:
A default hue is defined for every primary and accent color on Google's
Material Design [color palette][10], which makes it very easy to change the
overall look of the theme. Just set the primary and accent colors using the
following variables:
``` yaml
extra:
@@ -117,74 +147,203 @@ extra:
accent: 'light blue'
```
Color names can be written upper- or lowercase but must match the names of the
material design [color palette][]. Valid values are: _red_, _pink_, _purple_,
_deep purple_, _indigo_, _blue_, _light blue_, _cyan_, _teal_, _green_, _light
green_, _lime_, _yellow_, _amber_, _orange_, _deep orange_, _brown_, _grey_ and
_blue grey_. The last three colors can only be used as a primary color.
Color names are case-insensitive, but must match the names of the Material
Design color palette. Valid values are: `red`, `pink`, `purple`, `deep purple`,
`indigo`, `blue`, `light blue`, `cyan`, `teal`, `green`, `light green`, `lime`,
`yellow`, `amber`, `orange`, `deep orange`, `brown`, `grey` and `blue grey`.
The last three colors can only be used as a primary color.
![Material Screenshot](images/colors.png)
If the color is set via this configuration, an additional CSS file that
defines the color palette is automatically included. If you want to keep things
lean, clone the repository and recompile the theme with your custom colors set.
See the guide on [customization][11] for more information.
If the color is set via this configuration, an additional CSS file called
`palettes.css` is included that defines the color palettes. If you want to
keep things lean, clone the repository and recompile the theme with your
custom colors set. See [this article](customization.md) for more information.
[10]: http://www.materialui.co/colors
[11]: customization.md
#### Primary colors
Click on a tile to change the primary color of the theme:
<button data-md-color-primary="red">Red</button>
<button data-md-color-primary="pink">Pink</button>
<button data-md-color-primary="purple">Purple</button>
<button data-md-color-primary="deep-purple">Deep Purple</button>
<button data-md-color-primary="indigo">Indigo</button>
<button data-md-color-primary="blue">Blue</button>
<button data-md-color-primary="light-blue">Light Blue</button>
<button data-md-color-primary="cyan">Cyan</button>
<button data-md-color-primary="teal">Teal</button>
<button data-md-color-primary="green">Green</button>
<button data-md-color-primary="light-green">Light Green</button>
<button data-md-color-primary="lime">Lime</button>
<button data-md-color-primary="yellow">Yellow</button>
<button data-md-color-primary="amber">Amber</button>
<button data-md-color-primary="orange">Orange</button>
<button data-md-color-primary="deep-orange">Deep Orange</button>
<button data-md-color-primary="brown">Brown</button>
<button data-md-color-primary="grey">Grey</button>
<button data-md-color-primary="blue-grey">Blue Grey</button>
<script>
var buttons = document.querySelectorAll("button[data-md-color-primary]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorPrimary = this.dataset.mdColorPrimary;
})
})
</script>
#### Accent colors
Click on a tile to change the accent color of the theme:
<button data-md-color-accent="red">Red</button>
<button data-md-color-accent="pink">Pink</button>
<button data-md-color-accent="purple">Purple</button>
<button data-md-color-accent="deep-purple">Deep Purple</button>
<button data-md-color-accent="indigo">Indigo</button>
<button data-md-color-accent="blue">Blue</button>
<button data-md-color-accent="light-blue">Light Blue</button>
<button data-md-color-accent="cyan">Cyan</button>
<button data-md-color-accent="teal">Teal</button>
<button data-md-color-accent="green">Green</button>
<button data-md-color-accent="light-green">Light Green</button>
<button data-md-color-accent="lime">Lime</button>
<button data-md-color-accent="yellow">Yellow</button>
<button data-md-color-accent="amber">Amber</button>
<button data-md-color-accent="orange">Orange</button>
<button data-md-color-accent="deep-orange">Deep Orange</button>
<script>
var buttons = document.querySelectorAll("button[data-md-color-accent]");
Array.prototype.forEach.call(buttons, function(button) {
button.addEventListener("click", function() {
document.body.dataset.mdColorAccent = this.dataset.mdColorAccent;
})
})
</script>
### Changing the font family
Material uses the [Ubuntu font family][] by default, specifically the regular
sans-serif type for text and the monospaced type for code. Both fonts are
loaded from [Google Fonts][] and can be easily changed to other fonts, like for
example Google's own [Roboto font][]:
By default the [Roboto font family][12] is included with the theme, specifically
the regular sans-serif type for text and the `monospaced` type for code. Both
fonts are loaded from [Google Fonts][13] and can be changed to other fonts,
like for example the [Ubuntu font family][14]:
``` yaml
extra:
font:
text: 'Roboto'
code: 'Roboto Mono'
text: 'Ubuntu'
code: 'Ubuntu Mono'
```
The text font will be loaded in font-weights 400 and **700**, the monospaced
font in regular weight. If you want to load fonts from other destinations or
don't want to use the Google Fonts loading magic, just set `extra.font` to
`'none'`:
The text font will be loaded in weights 400 and **700**, the `monospaced` font
in regular weight. If you want to load fonts from other destinations or don't
want to use the Google Fonts loading magic, just set `font` to `false`:
``` yaml
extra:
font: 'none'
font: false
```
### Localization
[12]: https://fonts.google.com/specimen/Roboto
[13]: https://fonts.google.com
[14]: https://fonts.google.com/specimen/Ubuntu
The **Previous** and **Next** labels in the footer can easily be changed by
defining the variables `extra.i18n.prev` and `extra.i18n.next`:
### Adding a source repository
To include a link to the repository of your project within your documentation,
set the following variables via your project's `mkdocs.yml`:
``` yaml
repo_name: 'my-github-handle/my-project'
repo_url: 'https://github.com/my-github-handle/my-project'
```
The name of the repository will be rendered next to the search bar on big
screens and as part of the main navigation drawer on smaller screen sizes.
Furthermore, if `repo_url` points to a GitHub, BitBucket or GitLab repository,
the respective service logo will be shown next to the name of the repository.
Additionally, for GitHub, the number of stars and forks is shown.
If the repository is hosted in a private environment, the service logo can be
set explicitly by setting `extra.repo_icon` to `github`, `gitlab` or
`bitbucket`.
!!! question "Why is there an edit button at the top of every article?"
If the `repo_url` is set to a GitHub or BitBucket repository, and the
`repo_name` is set to *GitHub* or *BitBucket* (implied by default), an
edit button will appear at the top of every article. This is the automatic
behavior that MkDocs implements. See the [MkDocs documentation][15] on more
guidance regarding the `edit_uri` attribute, which defines whether the edit
button is shown or not.
[15]: http://www.mkdocs.org/user-guide/configuration/#edit_uri
### Adding a favicon
A favicon can be added by setting the `site_favicon` variable to an `.ico` or
image file:
``` yaml
site_favicon: 'images/favicon.ico'
```
### Adding a logo
Your logo should have rectangular shape with a minimum resolution of 128x128,
leave some room towards the edges and be composed of high contrast areas on a
transparent ground, as it will be placed on the colored header bar and drawer.
Simply create the folder `docs/images`, add your logo and embed it with:
``` yaml
extra:
i18n:
prev: 'Previous'
next: 'Next'
logo: 'images/logo.svg'
```
### Adding a GitHub and Twitter account
If you have a GitHub and/or Twitter account, you can add links to your
accounts to the drawer by setting the variables `extra.author.github` and
`extra.author.twitter` respectively:
Additionally, the default icon can be changed by setting an arbitrary ligature
(or Unicode code point) from the [Material Design icon font][16], e.g.
``` yaml
extra:
author:
github: 'my-github-handle'
twitter: 'my-twitter-handle'
logo:
icon: 'cloud'
```
[16]: https://material.io/icons/
### Adding social links
Social accounts can be linked in the footer of the documentation using the
automatically included [FontAwesome][17] webfont. The `type` must denote the
name of the social service, e.g. `github`, `twitter` or `linkedin` and the
`link` must contain the URL you want to link to:
``` yaml
extra:
social:
- type: 'github'
link: 'https://github.com/squidfunk'
- type: 'twitter'
link: 'https://twitter.com/squidfunk'
- type: 'linkedin'
link: 'https://linkedin.com/in/squidfunk'
```
The links are generated in order and the `type` of the links must match the
name of the FontAwesome glyph. The `fa` is automatically added, so `github`
will result in `fa fa-github`.
[17]: http://fontawesome.io/icons/
### Google Analytics integration
Material makes it easy to integrate site tracking with Google Analytics.
Besides basic tracking, clicks on all outgoing links can be tracked, clicks on
the download and star button, as well as how site search is used. Tracking can
be activated in your project's `mkdocs.yml`:
MkDocs makes it easy to integrate site tracking with Google Analytics.
Besides basic tracking, clicks on all outgoing links can be tracked as well as
how site search is used. Tracking can be activated in your project's
`mkdocs.yml`:
``` yaml
google_analytics:
@@ -192,121 +351,204 @@ google_analytics:
- 'auto'
```
### Disqus integation
Material for MkDocs is integrated with [Disqus][18], so if you want to add a
comments section to your documentation set the shortname of your Disqus project
in your `mkdocs.yml`:
``` yaml
extra:
disqus: 'your-disqus-shortname'
```
The comments section is inserted in *every page, except the index page*.
Additionally, a new entry at the bottom of the table of contents is generated
that is linking to the comments section. The necessary JavaScript is
automatically included.
!!! warning "Requirements"
`site_url` value must be set in `mkdocs.yml` for the Disqus integration to
load properly.
[18]: https://disqus.com
### Localization
#### Translations
Material for MkDocs supports internationalization (i18n). In order to translate
the labels (e.g. *Previous* and *Next* in the footer), you can override the
file `partials/language.html` and provide your own translations inside the
macro `t`:
``` jinja
{% macro t(key) %}{{ {
"language": "en",
"clipboard.copy": "Copy to clipboard",
"clipboard.copied": "Copied to clipboard",
"edit.link.title": "Edit this page",
"footer.previous": "Previous",
"footer.next": "Next",
"meta.comments": "Comments",
"meta.source": "Source",
"search.languages": "",
"search.placeholder": "Search",
"search.result.placeholder": "Type to start searching",
"search.result.none": "No matching documents",
"search.result.one": "1 matching document",
"search.result.other": "# matching documents",
"search.tokenizer": "[\s\-]+",
"source.link.title": "Go to repository",
"toc.title": "Table of contents"
}[key] }}{% endmacro %}
```
Just copy the file from the original theme and make your adjustments. See the
section on [overriding partials][19] and the general guide on
[theme extension][20] in the customization guide. Furthermore, see the
[example configuration][21] for a head start.
[19]: customization.md#overriding-partials
[20]: customization.md#extending-the-theme
[21]: https://github.com/squidfunk/mkdocs-material/tree/master/examples/language
#### Site search
Site search is implemented using [lunr.js][22], which includes stemmers for the
English language by default, while stemmers for other languages are included
with [lunr-languages][23], both of which are integrated with this theme. Support
for other languages and even multilingual search can be activated by setting
the key `search.languages` to a comma-separated list of supported 2-letter
language codes, e.g.:
``` jinja
{% macro t(key) %}{{ {
...
"search.languages": "en, de, ru",
...
}[key] }}{% endmacro %}
```
This will automatically load the stemmers for the specified languages and
set them up with site search, nothing else to be done.
At the time of writing, the following languages are supported: English `en`,
French `fr`, Spanish `es`, Italian `it`, Japanese `jp`, Dutch `du`, Danish `da`,
Portguese `pt`, Finnish `fi`, Romanian `ro`, Hungarian `hu`, Russian `ru`,
Norwegian `no`, Swedish `sv` and Turkish `tr`.
!!! warning "Only specify the languages you really need"
Be aware that including support for other languages increases the general
JavaScript payload by around 20kb (without gzip) and by another 15-30kb per
language.
The separator for tokenization can also be customized, which makes it possible
to index parts of words that are separated by `-` or `.` for example:
``` jinja
{% macro t(key) %}{{ {
...
"search.tokenizer": "[\s\-\.]+",
...
}[key] }}{% endmacro %}
```
[22]: https://lunrjs.com
[23]: https://github.com/MihaiValentin/lunr-languages
### Tabs
From version 1.1.0 on, Material supports another layer on top of the main
navigation for larger screens in the form of tabs. This is especially useful
for larger documentation projects with only few top-level sections. Tabs can be
enabled by setting the respective feature flag to true:
``` yaml
extra:
feature:
tabs: true
```
### More advanced customization
If you want to change the general appearance of the Material theme, see
[this article](customization.md) for more information on advanced customization.
[this article][24] for more information on advanced customization.
[24]: customization.md
## Extensions
MkDocs supports several [Markdown extensions][]. The following extensions are
not enabled by default (see the link for which are enabled by default), so you
have to switch them on explicitly.
### CodeHilite (recommended)
This extensions uses [Pygments][] (install with `pip install pygments`) to add
code highlighting to fenced code blocks. It might not be the best code
highlighter, but it works without JavaScript and on the server:
``` yaml
markdown_extensions:
- codehilite(css_class=code)
```
If you want more extensive highlighting, you can use a JavaScript library like
[highlight.js][], which is not included in Material. See [this link][extra] for
further instructions
### Permalinks
In order to add [permalinks][] to the headers of your article, set the
`markdown_extensions.toc.permalink` variable to a symbol, e.g. `#`:
``` yaml
markdown_extensions:
- toc:
permalink: '#'
```
The symbol can be chosen freely, it can even be a WebFont icon.
### Admonition
[Admonition][] is a handy extension that adds block-styled side content to your
documentation, for example hints, notes or warnings. It can be enabled by
setting the variable `markdown_extensions.admonition`:
MkDocs supports several [Markdown extensions][25]. The following extensions
are not enabled by default (see the link for which are enabled by default)
but highly recommended, so they should be switched on at all times:
``` yaml
markdown_extensions:
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: true
```
In order to add a note, use the following syntax inside your article:
For more information, see the following list of extensions supported by the
Material theme including more information regarding installation and usage:
``` markdown
!!! note
Nothing to see here, move along.
```
* [Admonition][26]
* [Codehilite][27]
* [Footnotes][28]
* [Metadata][29]
* [Permalinks][30]
* [PyMdown Extensions][31]
This will print the following block:
!!! note
Nothing to see here, move along.
The Material template adds a neutral color for the `note` class and a red color
for the `warning` class. You can also add a custom title:
``` markdown
!!! warning "Don't try this at home"
If you do, you will regret it.
```
This will print:
!!! warning "Don't try this at home"
If you do, you will regret it.
More colors can be freely defined.
[25]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[26]: extensions/admonition.md
[27]: extensions/codehilite.md
[28]: extensions/footnotes.md
[29]: extensions/metadata.md
[30]: extensions/permalinks.md
[31]: extensions/pymdown.md
## Full example
Below is a full example configuration for a mkdocs.yml:
Below is a full example configuration for a `mkdocs.yml`:
``` yaml
# Project information
site_name: 'My Project'
site_description: 'A short description of my project'
site_author: 'John Doe'
site_url: 'https://my-github-handle.github.io/my-project'
site_url: 'https://john-doe.github.io/my-project'
# Repository
repo_name: 'GitHub'
repo_url: 'https://github.com/my-github-handle/my-project'
repo_name: 'my-github-handle/my-project'
repo_url: 'https://github.com/john-doe/my-project'
# Copyright
copyright: 'Copyright (c) 2016 John Doe'
copyright: 'Copyright &copy; 2016 - 2017 John Doe'
# Documentation and theme
docs_dir: 'docs'
theme: 'material'
# Options
extra:
version: '0.1.0'
logo: 'images/logo.png'
logo: 'images/logo.svg'
palette:
primary: 'indigo'
accent: 'light blue'
accent: 'indigo'
font:
text: 'Roboto'
code: 'Roboto Mono'
i18n:
prev: 'Previous'
next: 'Next'
author:
github: 'my-github-handle'
twitter: 'my-twitter-handle'
social:
- type: 'github'
link: 'https://github.com/john-doe'
- type: 'twitter'
link: 'https://twitter.com/john-doe'
- type: 'linkedin'
link: 'https://linkedin.com/in/john-doe'
# Google Analytics
google_analytics:
@@ -315,20 +557,9 @@ google_analytics:
# Extensions
markdown_extensions:
- codehilite(css_class=code)
- admonition
- codehilite:
guess_lang: false
- toc:
permalink: '#'
permalink: true
```
[MkDocs]: http://www.mkdocs.org
[color palette]: http://www.materialui.co/colors
[Ubuntu font family]: http://font.ubuntu.com
[Google Fonts]: https://www.google.com/fonts
[Roboto font]: https://www.google.com/fonts/specimen/Roboto
[Markdown extensions]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[Pygments]: http://pygments.org
[highlight.js]: https://highlightjs.org
[extra]: http://www.mkdocs.org/user-guide/styling-your-docs/#customising-a-theme
[permalinks]: https://en.wikipedia.org/wiki/Permalink
[Admonition]: https://pythonhosted.org/Markdown/extensions/admonition.html
Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

+22 -44
View File
@@ -1,66 +1,44 @@
# Material for MkDocs
# Material <small>for MkDocs</small>
## Beautiful documentation
## Beautiful project documentation
Material is a theme for [MkDocs][], an excellent static site generator geared
towards project documentation. It is built using Google's [material design][]
guidelines, full responsive, optimized for touch and pointer devices as well
as all sorts of screen sizes.
Material is a theme for [MkDocs][1], an excellent static site generator geared
towards project documentation. It is built using Google's [Material Design][2]
guidelines.
![Material Screenshot](images/screen.png)
[![Material for MkDocs](images/material.png)](images/material.png)
Material is very lightweight it is built from scratch using Javascript and
CSS that weighs less than 30kb (minified, gzipped and excluding Google Fonts
and Analytics). Yet, it is highly customizable and degrades gracefully in older
browsers.
[1]: http://www.mkdocs.org
[2]: https://material.io/guidelines/material-design/
## Quick start
Install with `pip`:
Install the latest version of Material with `pip`:
``` sh
pip install mkdocs-material
```
Add the following line to your `mkdocs.yml`:
Append the following line to your project's `mkdocs.yml`:
``` yaml
theme: 'material'
```
## Features
## What to expect
- Beautiful, readable and very user-friendly design based on Google's material
design guidelines, packed in a full responsive template with a well-defined
and [easily customizable color palette][], great typography, as well as a
beautiful search interface and footer.
* Responsive design and fluid layout for all kinds of screens and devices,
designed to serve your project documentation in a user-friendly way with
optimal readability.
- Well-tested and optimized Javascript and CSS including a cross-browser
fixed/sticky header, a drawer that even works without Javascript using
the [checkbox hack][] with fallbacks, responsive tables that scroll when
the screen is too small and well-defined print styles.
* Easily customizable primary and accent color, fonts, favicon and logo;
straight forward localization through theme extension; integrated with Google
Analytics, Disqus and GitHub.
- Extra configuration options like a [project logo][], links to the authors
[GitHub and Twitter accounts][], display of the amount of stars the
project has on GitHub and [Google Analytics integration][].
* Well-designed search interface accessible through hotkeys (<kbd>F</kbd> or
<kbd>S</kbd>), intelligent grouping of search results, search term
highlighting and lazy loading.
- Easily [extendable and customizable][] due to a well-designed asset pipeline
built on-top of [Gulp][] with `npm` and `bower` and modular and abstracted
style definitions built with [SASS][].
For detailed instructions see the [getting started guide][3].
- Web application capability on iOS when the page is saved to the homescreen,
it behaves and looks like a native application.
See the [getting started guide](getting-started.md) for instructions how to get
it up and running.
[MkDocs]: http://www.mkdocs.org
[material design]: https://www.google.com/design/spec/material-design
[checkbox hack]: http://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack/
[project logo]: getting-started.md#adding-a-logo
[easily customizable color palette]: getting-started.md#changing-the-color-palette
[GitHub and Twitter accounts]: getting-started.md#adding-a-github-and-twitter-account
[Google Analytics integration]: getting-started.md#google-analytics-integration
[extendable and customizable]: customization.md
[Gulp]: http://gulpjs.com
[SASS]: http://sass-lang.com
[3]: getting-started.md
+2 -2
View File
@@ -2,7 +2,7 @@
**MIT License**
Copyright (c) 2016 Martin Donath
Copyright &copy; 2016 - 2017 Martin Donath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
@@ -20,4 +20,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
IN THE SOFTWARE.
+432
View File
@@ -0,0 +1,432 @@
# Release notes
## Upgrading
To upgrade Material to the latest version, use pip:
``` sh
pip install --upgrade mkdocs-material
```
To determine the currently installed version, use the following command:
``` sh
pip show mkdocs-material | grep -E ^Version
# Version 1.11.0
```
## Changelog
### 1.11.0 <small>_ October 19, 2017</small>
* Added localization to clipboard
* Refactored i18n localization logic
### 1.10.4 <small>_ October 18, 2017</small>
* Improved print styles of code blocks
* Improved search UX (don't close on enter if no selection)
* Fixed [#495][495]: Vertical scrollbar on short pages
[495]: https://github.com/squidfunk/mkdocs-material/issues/484
### 1.10.3 <small>_ October 11, 2017</small>
* Fixed [#484][484]: Vertical scrollbar on some MathJax formulas
* Fixed [#483][483]: Footnote backref target offset regression
[483]: https://github.com/squidfunk/mkdocs-material/issues/483
[484]: https://github.com/squidfunk/mkdocs-material/issues/484
### 1.10.2 <small>_ October 6, 2017</small>
* Fixed [#468][468]: Sidebar shows scrollbar if content is shorter (in Safari)
[468]: https://github.com/squidfunk/mkdocs-material/issues/468
### 1.10.1 <small>_ September 14, 2017</small>
* Fixed [#455][455]: Bold code blocks rendered with normal font weight
[455]: https://github.com/squidfunk/mkdocs-material/issues/455
### 1.10.0 <small>_ September 1, 2017</small>
* Added support to make logo default icon configurable
* Fixed uninitialized overflow scrolling on main pane for iOS
* Fixed error in mobile navigation in case JavaScript is not available
* Fixed incorrect color transition for nested panes in mobile navigation
* Improved checkbox styles for Tasklist from PyMdown Extension package
### 1.9.0 <small>_ August 29, 2017</small>
* Added `info` (synonym: `todo`) style for Admonition
* Added `question` (synonym: `help`, `faq`) style for Admonition
* Added support for Details from PyMdown Extensions package
* Improved Admonition styles to match Details
* Improved styles for social links in footer
* Replaced ligatures with Unicode code points to avoid broken layout
* Upgraded PyMdown Extensions package dependency to >= 3.4
### 1.8.1 <small>_ August 7, 2017</small>
* Fixed [#421][421]: Missing pagination for GitHub API
[421]: https://github.com/squidfunk/mkdocs-material/issues/421
### 1.8.0 <small>_ August 2, 2017</small>
* Added support for lazy-loading of search results for better performance
* Added support for customization of search tokenizer/separator
* Fixed [#424][424]: Search doesn't handle capital letters anymore
* Fixed [#419][419]: Search doesn't work on whole words
[419]: https://github.com/squidfunk/mkdocs-material/issues/419
[424]: https://github.com/squidfunk/mkdocs-material/issues/424
### 1.7.5 <small>_ July 25, 2017</small>
* Fixed [#398][398]: Forms broken due to search shortcuts
* Improved search overall user experience
* Improved search matching and highlighting
* Improved search accessibility
[398]: https://github.com/squidfunk/mkdocs-material/issues/398
### 1.7.4 <small>_ June 21, 2017</small>
* Fixed functional link colors in table of contents for active palette
* Fixed [#368][368]: Compatibility issues with IE11
[368]: https://github.com/squidfunk/mkdocs-material/issues/368
### 1.7.3 <small>_ June 7, 2017</small>
* Fixed error when setting language to Japanese for site search
### 1.7.2 <small>_ June 6, 2017</small>
* Fixed offset of search box when `repo_url` is not set
* Fixed non-disappearing tooltip
### 1.7.1 <small>_ June 1, 2017</small>
* Fixed wrong `z-index` order of header, overlay and drawer
* Fixed wrong offset of targeted footnote back references
### 1.7.0 <small>_ June 1, 2017</small>
* Added "copy to clipboard" buttons to code blocks
* Added support for multilingual site search
* Fixed search term highlighting for non-latin languages
### 1.6.4 <small>_ May 24, 2017</small>
* Fixed [#337][337]: JavaScript error for GitHub organization URLs
[337]: https://github.com/squidfunk/mkdocs-material/issues/337
### 1.6.3 <small>_ May 16, 2017</small>
* Fixed [#329][329]: Broken source stats for private or unknown GitHub repos
[329]: https://github.com/squidfunk/mkdocs-material/issues/329
### 1.6.2 <small>_ May 15, 2017</small>
* Fixed [#316][316]: Fatal error for git clone on Windows
* Fixed [#320][320]: Chrome 58 creates double underline for `abbr` tags
* Fixed [#323][323]: Ligatures rendered inside code blocks
* Fixed miscalculated sidebar height due to missing margin collapse
* Changed deprecated MathJax CDN to Cloudflare
[316]: https://github.com/squidfunk/mkdocs-material/issues/316
[320]: https://github.com/squidfunk/mkdocs-material/issues/320
[323]: https://github.com/squidfunk/mkdocs-material/issues/323
### 1.6.1 <small>_ April 23, 2017</small>
* Fixed following of active/focused element if search input is focused
* Fixed layer order of search component elements
### 1.6.0 <small>_ April 22, 2017</small>
* Added build test for Docker image on Travis
* Added search overlay for better user experience (focus)
* Added language from localizations to `html` tag
* Fixed [#270][270]: source links broken for absolute URLs
* Fixed missing top spacing for first targeted element in content
* Fixed too small footnote divider when using larger font sizes
[270]: https://github.com/squidfunk/mkdocs-material/issues/270
### 1.5.5 <small>_ April 20, 2017</small>
* Fixed [#282][282]: Browser search (<kbd>Meta</kbd>+<kbd>F</kbd>) is hijacked
[282]: https://github.com/squidfunk/mkdocs-material/issues/282
### 1.5.4 <small>_ April 8, 2017</small>
* Fixed broken highlighting for two or more search terms
* Fixed missing search results when only a `h1` is present
* Fixed unresponsive overlay on Android
### 1.5.3 <small>_ April 7, 2017</small>
* Fixed deprecated calls for template variables
* Fixed wrong palette color for focused search result
* Fixed JavaScript errors on 404 page
* Fixed missing top spacing on 404 page
* Fixed missing right spacing on overflow of source container
### 1.5.2 <small>_ April 5, 2017</small>
* Added requirements as explicit dependencies in `setup.py`
* Fixed non-synchronized transitions in search form
### 1.5.1 <small>_ March 30, 2017</small>
* Fixed rendering and offset of targetted footnotes
* Fixed [#238][238]: Link on logo is not set to `site_url`
[238]: https://github.com/squidfunk/mkdocs-material/issues/238
### 1.5.0 <small>_ March 24, 2017</small>
* Added support for localization of search placeholder
* Added keyboard events for quick access of search
* Added keyboard events for search control
* Added opacity on hover for search buttons
* Added git hook to skip CI build on non-src changes
* Fixed non-resetting search placeholder when input is cleared
* Fixed error for unescaped parentheses in search term
* Fixed [#229][229]: Button to clear search missing
* Fixed [#231][231]: Escape key doesn't exit search
* Removed old-style figures from font feature settings
[229]: https://github.com/squidfunk/mkdocs-material/issues/229
[231]: https://github.com/squidfunk/mkdocs-material/issues/231
### 1.4.1 <small>_ March 16, 2017</small>
* Fixed invalid destructuring attempt on NodeList (in Safari, Edge, IE)
### 1.4.0 <small>_ March 16, 2017</small>
* Added support for grouping searched sections by documents
* Added support for highlighting of search terms
* Added support for localization of search results
* Fixed [#216][216]: table of contents icon doesn't show if `h1` is not present
* Reworked style and layout of search results for better usability
[216]: https://github.com/squidfunk/mkdocs-material/issues/216
### 1.3.0 <small>_ March 11, 2017</small>
* Added support for page-specific title and description using metadata
* Added support for linking source files to documentation
* Fixed jitter and offset of sidebar when zooming browser
* Fixed incorrectly initialized tablet sidebar height
* Fixed regression for [#1][1]: GitHub stars break if `repo_url` ends with a `/`
* Fixed undesired white line below copyright footer due to base font scaling
* Fixed issue with whitespace in path for scripts
* Fixed [#205][205]: support non-fixed (static) header
* Refactored footnote references for better visibility
* Reduced repaints to a minimum for non-tabs configuration
* Reduced contrast of edit button (slightly)
[205]: https://github.com/squidfunk/mkdocs-material/issues/205
### 1.2.0 <small>_ March 3, 2017</small>
* Added `quote` (synonym: `cite`) style for Admonition
* Added help message to build pipeline
* Fixed wrong navigation link colors when applying palette
* Fixed [#197][197]: Link missing in tabs navigation on deeply nested items
* Removed unnecessary dev dependencies
[197]: https://github.com/squidfunk/mkdocs-material/issues/197
### 1.1.1 <small>_ February 26, 2017</small>
* Fixed incorrectly displayed nested lists when using tabs
### 1.1.0 <small>_ February 26, 2017</small>
* Added tabs navigation feature (optional)
* Added Disqus integration (optional)
* Added a high resolution Favicon with the new logo
* Added static type checking using Facebook's Flow
* Fixed [#173][173]: Dictionary elements have no bottom spacing
* Fixed [#175][175]: Tables cannot be set to 100% width
* Fixed race conditions in build related to asset revisioning
* Fixed accidentally re-introduced Permalink on top-level headline
* Fixed alignment of logo in drawer on IE11
* Refactored styles related to tables
* Refactored and automated Docker build and PyPI release
* Refactored build scripts
[173]: https://github.com/squidfunk/mkdocs-material/issues/173
[175]: https://github.com/squidfunk/mkdocs-material/issues/175
### 1.0.5 <small>_ February 18, 2017</small>
* Fixed [#153][153]: Sidebar flows out of constrained area in Chrome 56
* Fixed [#159][159]: Footer jitter due to JavaScript if content is short
[153]: https://github.com/squidfunk/mkdocs-material/issues/153
[159]: https://github.com/squidfunk/mkdocs-material/issues/159
### 1.0.4 <small>_ February 16, 2017</small>
* Fixed [#142][142]: Documentation build errors if `h1` is defined as raw HTML
* Fixed [#164][164]: PyPI release does not build and install
* Fixed offsets of targeted headlines
* Increased sidebar font size by `0.12rem`
[142]: https://github.com/squidfunk/mkdocs-material/issues/142
[164]: https://github.com/squidfunk/mkdocs-material/issues/164
### 1.0.3 <small>_ January 22, 2017</small>
* Fixed [#117][117]: Table of contents items don't blur on fast scrolling
* Refactored sidebar positioning logic
* Further reduction of repaints
[117]: https://github.com/squidfunk/mkdocs-material/issues/117
### 1.0.2 <small>_ January 15, 2017</small>
* Fixed [#108][108]: Horizontal scrollbar in content area
[108]: https://github.com/squidfunk/mkdocs-material/issues/108
### 1.0.1 <small>_ January 14, 2017</small>
* Fixed massive repaints happening when scrolling
* Fixed footer back reference positions in case of overflow
* Fixed header logo from showing when the menu icon is rendered
* Changed scrollbar behavior to only show when content overflows
### 1.0.0 <small>_ January 13, 2017</small>
* Introduced Webpack for more sophisticated JavaScript bundling
* Introduced ESLint and Stylelint for code style checks
* Introduced more accurate Material Design colors and shadows
* Introduced modular scales for harmonic font sizing
* Introduced git-hooks for better development workflow
* Rewrite of CSS using the BEM methodology and SassDoc guidelines
* Rewrite of JavaScript using ES6 and Babel as a transpiler
* Rewrite of Admonition, Permalinks and CodeHilite integration
* Rewrite of the complete typographical system
* Rewrite of Gulp asset pipeline in ES6 and separation of tasks
* Removed Bower as a dependency in favor of NPM
* Removed custom icon build in favor of the Material Design iconset
* Removed `_blank` targets on links due to vulnerability: http://bit.ly/1Mk2Rtw
* Removed unversioned assets from build directory
* Restructured templates into base templates and partials
* Added build and watch scripts in `package.json`
* Added support for Metadata and Footnotes Markdown extensions
* Added support for PyMdown Extensions package
* Added support for collapsible sections in navigation
* Added support for separate table of contents
* Added support for better accessibility through REM-based layout
* Added icons for GitHub, GitLab and BitBucket integrations
* Added more detailed documentation on specimen, extensions etc.
* Added a `404.html` error page for deployment on GitHub Pages
* Fixed live reload chain in watch mode when saving a template
* Fixed variable references to work with MkDocs 0.16
### 0.2.4 <small>_ June 26, 2016</small>
* Fixed improperly set default favicon
* Fixed [#33][33]: Protocol relative URL for webfonts doesn't work with
`file://`
* Fixed [#34][34]: IE11 on Windows 7 doesn't honor `max-width` on `main` tag
* Fixed [#35][35]: Add styling for blockquotes
[33]: https://github.com/squidfunk/mkdocs-material/issues/25
[34]: https://github.com/squidfunk/mkdocs-material/issues/26
[35]: https://github.com/squidfunk/mkdocs-material/issues/30
### 0.2.3 <small>_ May 16, 2016</small>
* Fixed [#25][25]: Highlight inline fenced blocks
* Fixed [#26][26]: Better highlighting for keystrokes
* Fixed [#30][30]: Suboptimal syntax highlighting for PHP
[25]: https://github.com/squidfunk/mkdocs-material/issues/25
[26]: https://github.com/squidfunk/mkdocs-material/issues/26
[30]: https://github.com/squidfunk/mkdocs-material/issues/30
### 0.2.2 <small>_ March 20, 2016</small>
* Fixed [#15][15]: Document Pygments dependency for CodeHilite
* Fixed [#16][16]: Favicon could not be set through `mkdocs.yml`
* Fixed [#17][17]: Put version into own container for styling
* Fixed [#20][20]: Fix rounded borders for tables
[15]: https://github.com/squidfunk/mkdocs-material/issues/15
[16]: https://github.com/squidfunk/mkdocs-material/issues/16
[17]: https://github.com/squidfunk/mkdocs-material/issues/17
[20]: https://github.com/squidfunk/mkdocs-material/issues/20
### 0.2.1 <small>_ March 12, 2016</small>
* Fixed [#10][10]: Invisible header after closing search bar with
<kbd>ESC</kbd> key
* Fixed [#13][13]: Table cells don't wrap
* Fixed empty list in table of contents when no headline is defined
* Corrected wrong path for static asset monitoring in Gulpfile.js
* Set up tracking of site search for Google Analytics
[10]: https://github.com/squidfunk/mkdocs-material/issues/10
[13]: https://github.com/squidfunk/mkdocs-material/issues/13
### 0.2.0 <small>_ February 24, 2016</small>
* Fixed [#6][6]: Include multiple color palettes via `mkdocs.yml`
* Fixed [#7][7]: Better colors for links inside admonition notes and warnings
* Fixed [#9][9]: Text for prev/next footer navigation should be customizable
* Refactored templates (replaced `if`/`else` with modifiers where possible)
[6]: https://github.com/squidfunk/mkdocs-material/issues/6
[7]: https://github.com/squidfunk/mkdocs-material/issues/7
[9]: https://github.com/squidfunk/mkdocs-material/issues/9
### 0.1.3 <small>_ February 21, 2016</small>
* Fixed [#3][3]: Ordered lists within an unordered list have `::before` content
* Fixed [#4][4]: Click on Logo/Title without Github-Repository: `"None"`
* Fixed [#5][5]: Page without headlines renders empty list in table of contents
* Moved Modernizr to top to ensure basic usability in IE8
[3]: https://github.com/squidfunk/mkdocs-material/issues/3
[4]: https://github.com/squidfunk/mkdocs-material/issues/4
[5]: https://github.com/squidfunk/mkdocs-material/issues/5
### 0.1.2 <small>_ February 16, 2016</small>
* Fixed styles for deep navigational hierarchies
* Fixed webfont delivery problem when hosted in subdirectories
* Fixed print styles in mobile/tablet configuration
* Added option to configure fonts in `mkdocs.yml` with fallbacks
* Changed styles for admonition notes and warnings
* Set download link to latest version if available
* Set up tracking of outgoing links and actions for Google Analytics
### 0.1.1 <small>_ February 11, 2016</small>
* Fixed [#1][1]: GitHub stars don't work if the repo_url ends with a `/`
* Updated NPM and Bower dependencies to most recent versions
* Changed footer/copyright link to Material theme to GitHub pages
* Made MkDocs building/serving in build process optional
* Set up continuous integration with [Travis][2]
[1]: https://github.com/squidfunk/mkdocs-material/issues/1
[2]: https://travis-ci.org
### 0.1.0 <small>_ February 9, 2016</small>
* Initial release
+246
View File
@@ -0,0 +1,246 @@
# Specimen
## Body copy
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras arcu libero,
mollis sed massa vel, *ornare viverra ex*. Mauris a ullamcorper lacus. Nullam
urna elit, malesuada eget finibus ut, ullamcorper ac tortor. Vestibulum sodales
pulvinar nisl, pharetra aliquet est. Quisque volutpat erat ac nisi accumsan
tempor.
**Sed suscipit**, orci non pretium pretium, quam mi gravida metus, vel
venenatis justo est condimentum diam. Maecenas non ornare justo. Nam a ipsum
eros. [Nulla aliquam](/) orci sit amet nisl posuere malesuada. Proin aliquet
nulla velit, quis ultricies orci feugiat et. `Ut tincidunt sollicitudin`
tincidunt. Aenean ullamcorper sit amet nulla at interdum.
## Headings
### The 3rd level
#### The 4th level
##### The 5th level
###### The 6th level
## Headings <small>with secondary text</small>
### The 3rd level <small>with secondary text</small>
#### The 4th level <small>with secondary text</small>
##### The 5th level <small>with secondary text</small>
###### The 6th level <small>with secondary text</small>
## Blockquotes
> Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet rutrum.
Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Nam vehicula nunc
mauris, a ultricies libero efficitur sed. *Class aptent* taciti sociosqu ad
litora torquent per conubia nostra, per inceptos himenaeos. Sed molestie
imperdiet consectetur.
### Blockquote nesting
> **Sed aliquet**, neque at rutrum mollis, neque nisi tincidunt nibh, vitae
faucibus lacus nunc at lacus. Nunc scelerisque, quam id cursus sodales, lorem
[libero fermentum](/) urna, ut efficitur elit ligula et nunc.
> > Mauris dictum mi lacus, sit amet pellentesque urna vehicula fringilla.
Ut sit amet placerat ante. Proin sed elementum nulla. Nunc vitae sem odio.
Suspendisse ac eros arcu. Vivamus orci erat, volutpat a tempor et, rutrum.
eu odio.
> > > `Suspendisse rutrum facilisis risus`, eu posuere neque commodo a.
Interdum et malesuada fames ac ante ipsum primis in faucibus. Sed nec leo
bibendum, sodales mauris ut, tincidunt massa.
### Other content blocks
> Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
sit amet laoreet nibh.
``` js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
> > Praesent at `:::js return target`, sodales nibh vel, tempor felis. Fusce
vel lacinia lacus. Suspendisse rhoncus nunc non nisi iaculis ultrices.
Donec consectetur mauris non neque imperdiet, eget volutpat libero.
## Lists
### Unordered lists
* Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
* Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
* Nam vulputate tincidunt fringilla.
* Nullam dignissim ultrices urna non auctor.
* Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin ut
eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at aliquam
ac, aliquet sed mauris.
* Nulla et rhoncus turpis. Mauris ultricies elementum leo. Duis efficitur
accumsan nibh eu mattis. Vivamus tempus velit eros, porttitor placerat nibh
lacinia sed. Aenean in finibus diam.
### Ordered lists
1. Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
consectetur feugiat sodales.
2. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur
ridiculus mus. Aliquam ornare feugiat quam et egestas. Nunc id erat et quam
pellentesque lacinia eu vel odio.
1. Vivamus venenatis porttitor tortor sit amet rutrum. Pellentesque aliquet
quam enim, eu volutpat urna rutrum a. Nam vehicula nunc mauris, a
ultricies libero efficitur sed.
1. Mauris dictum mi lacus
2. Ut sit amet placerat ante
3. Suspendisse ac eros arcu
2. Morbi eget dapibus felis. Vivamus venenatis porttitor tortor sit amet
rutrum. Pellentesque aliquet quam enim, eu volutpat urna rutrum a. Sed
aliquet, neque at rutrum mollis, neque nisi tincidunt nibh.
3. Pellentesque eget `:::js var _extends` ornare tellus, ut gravida mi.
``` js hl_lines="1"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
```
3. Vivamus id mi enim. Integer id turpis sapien. Ut condimentum lobortis
sagittis. Aliquam purus tellus, faucibus eget urna at, iaculis venenatis
nulla. Vivamus a pharetra leo.
### Definition lists
Lorem ipsum dolor sit amet
: Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus
tellus non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor
lobortis orci, at elementum urna sodales vitae. In in vehicula nulla.
Duis mollis est eget nibh volutpat, fermentum aliquet dui mollis.
Nam vulputate tincidunt fringilla.
Nullam dignissim ultrices urna non auctor.
Cras arcu libero
: Aliquam metus eros, pretium sed nulla venenatis, faucibus auctor ex. Proin
ut eros sed sapien ullamcorper consequat. Nunc ligula ante, fringilla at
aliquam ac, aliquet sed mauris.
## Code blocks
### Inline
Morbi eget `dapibus felis`. Vivamus *`venenatis porttitor`* tortor sit amet
rutrum. Class aptent taciti sociosqu ad litora torquent per conubia nostra,
per inceptos himenaeos. [`Pellentesque aliquet quam enim`](/), eu volutpat urna
rutrum a.
Nam vehicula nunc `:::js return target` mauris, a ultricies libero efficitur
sed. Sed molestie imperdiet consectetur. Vivamus a pharetra leo. Pellentesque
eget ornare tellus, ut gravida mi. Fusce vel lacinia lacus.
### Listing
#!js hl_lines="8"
var _extends = function(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
target[key] = source[key];
}
}
return target;
};
## Horizontal rules
Aenean in finibus diam. Duis mollis est eget nibh volutpat, fermentum aliquet
dui mollis. Nam vulputate tincidunt fringilla. Nullam dignissim ultrices urna
non auctor.
***
Integer vehicula feugiat magna, a mollis tellus. Nam mollis ex ante, quis
elementum eros tempor rutrum. Aenean efficitur lobortis lacinia. Nulla
consectetur feugiat sodales.
## Data tables
| Sollicitudo / Pellentesi | consectetur | adipiscing | elit | arcu | sed |
| ------------------------ | ----------- | ---------- | ------- | ---- | --- |
| Vivamus a pharetra | yes | yes | yes | yes | yes |
| Ornare viverra ex | yes | yes | yes | yes | yes |
| Mauris a ullamcorper | yes | yes | partial | yes | yes |
| Nullam urna elit | yes | yes | yes | yes | yes |
| Malesuada eget finibus | yes | yes | yes | yes | yes |
| Ullamcorper | yes | yes | yes | yes | yes |
| Vestibulum sodales | yes | - | yes | - | yes |
| Pulvinar nisl | yes | yes | yes | - | - |
| Pharetra aliquet est | yes | yes | yes | yes | yes |
| Sed suscipit | yes | yes | yes | yes | yes |
| Orci non pretium | yes | partial | - | - | - |
Sed sagittis eleifend rutrum. Donec vitae suscipit est. Nullam tempus tellus
non sem sollicitudin, quis rutrum leo facilisis. Nulla tempor lobortis orci,
at elementum urna sodales vitae. In in vehicula nulla, quis ornare libero.
| Left | Center | Right |
| :--------- | :------: | ------: |
| Lorem | *dolor* | `amet` |
| [ipsum](/) | **sit** | |
Vestibulum vitae orci quis ante viverra ultricies ut eget turpis. Sed eu
lectus dapibus, eleifend nulla varius, lobortis turpis. In ac hendrerit nisl,
sit amet laoreet nibh.
<table>
<colgroup>
<col width="30%">
<col width="70%">
</colgroup>
<thead>
<tr class="header">
<th>Table</th>
<th>with colgroups (Pandoc)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Lorem</td>
<td>ipsum dolor sit amet.</td>
</tr>
<tr>
<td>Sed sagittis</td>
<td>eleifend rutrum. Donec vitae suscipit est.</td>
</tr>
</tbody>
</table>
+14
View File
@@ -0,0 +1,14 @@
# Examples
To run the example configurations, ensure Python and MkDocs are up and running,
change to the respective directory and run `mkdocs serve`. This will print:
``` sh
INFO - Building documentation...
INFO - Cleaning site directory
[I 170620 18:54:55 server:283] Serving on http://127.0.0.1:8000
[I 170620 18:54:55 handlers:60] Start watching changes
[I 170620 18:54:55 handlers:62] Start detecting changes
```
Go to http://127.0.0.1:8000 to see the resulting documentation.
+3
View File
@@ -0,0 +1,3 @@
# Example
This is a minimal example configuration.
+25
View File
@@ -0,0 +1,25 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Project information
site_name: Example
# Theme
theme: material
+29
View File
@@ -0,0 +1,29 @@
# Example
This example project contains a configuration for the German language. All
footer and search labels (or placeholders), as well as link titles have been
translated to German. Use this example as a starting point for a project with
another language than English.
The translations can be changed in `theme/partials/language.html`:
``` jinja
{% macro t(key) %}{{ {
"language": "de",
"clipboard.copy": "In Zwischenablage kopieren",
"clipboard.copied": "In Zwischenablage kopiert",
"edit.link.title": "Seite editieren",
"footer.previous": "Vorherige Seite",
"footer.next": "Nächste Seite",
"meta.comments": "Kommentare",
"meta.source": "Quellcode",
"search.languages": "de",
"search.placeholder": "Suche",
"search.result.placeholder": "Suchbegriff eingeben",
"search.result.none": "Keine Suchergebnisse",
"search.result.one": "1 Suchergebnis",
"search.result.other": "# Suchergebnisse",
"source.link.title": "Quellcode",
"toc.title": "Inhaltsverzeichnis"
}[key] }}{% endmacro %}
```
+30
View File
@@ -0,0 +1,30 @@
# Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Project information
site_name: Example
# Repository
repo_name: squidfunk/mkdocs-material
repo_url: https://github.com/squidfunk/mkdocs-material
# Theme and overrides, i.e. language partial
theme: material
theme_dir: theme
@@ -0,0 +1,41 @@
<!--
Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
-->
<!-- Translations -->
{% macro t(key) %}{{ {
"language": "de",
"clipboard.copy": "In Zwischenablage kopieren",
"clipboard.copied": "In Zwischenablage kopiert",
"edit.link.title": "Seite editieren",
"footer.previous": "Vorherige Seite",
"footer.next": "Nächste Seite",
"meta.comments": "Kommentare",
"meta.source": "Quellcode",
"search.languages": "de",
"search.placeholder": "Suche",
"search.result.placeholder": "Suchbegriff eingeben",
"search.result.none": "Keine Suchergebnisse",
"search.result.one": "1 Suchergebnis",
"search.result.other": "# Suchergebnisse",
"source.link.title": "Quellcode",
"toc.title": "Inhaltsverzeichnis"
}[key] }}{% endmacro %}
+6
View File
@@ -0,0 +1,6 @@
{
"rules": {
"no-invalid-this": 0,
"max-params": 0
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -21,48 +21,24 @@
*/
/* ----------------------------------------------------------------------------
* Drawer typography
* Declarations
* ------------------------------------------------------------------------- */
/*
* Drawer container
*/
.drawer {
declare module "clipboard" {
/*
* Links to articles
*/
.toc li a {
font-weight: 700;
/* Class: Clipboard action */
declare class ClipboardAction {
trigger: HTMLElement,
clearSelection(): void
}
/*
* Links to chapters inside the current article
*/
.toc li.anchor a {
font-weight: 400;
/* Class: Clipboard */
declare class Clipboard {
static isSupported(): boolean,
constructor(selector: string): void,
on(name: string, cb: (action: ClipboardAction) => void): void
}
/*
* Main sections
*/
.section {
font-weight: 700;
}
/* Exports */
declare export default typeof Clipboard
}
/*
* Repository buttons
*/
.repo a {
text-transform: uppercase;
font-weight: 700;
/*
* Stars
*/
.count {
text-transform: none;
font-weight: 700;
}
}
+29
View File
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/* ----------------------------------------------------------------------------
* Declarations
* ------------------------------------------------------------------------- */
declare module "escape-string-regexp" {
declare function exports(value: string): string
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -21,25 +21,16 @@
*/
/* ----------------------------------------------------------------------------
* Article animation
* Declarations
* ------------------------------------------------------------------------- */
/*
* Fade color after highlighting
*/
pre span {
transition: color .25s;
}
declare module "fastclick" {
/*
* Copyright and theme information
*/
.copyright {
/*
* Animate color on hover
*/
a {
transition: color .25s;
/* Type: FastClick */
declare type FastClick = {
attach(name: HTMLElement): void
}
}
/* Exports */
declare export default FastClick
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -21,38 +21,23 @@
*/
/* ----------------------------------------------------------------------------
* Article typography
* Declarations
* ------------------------------------------------------------------------- */
/*
* Article
*/
.article {
declare module "js-cookie" {
/*
* Third-level headlines should be bold
*/
h3 {
font-weight: 700;
/* Type: Options for setting cookie values */
declare type Options = {
path?: string,
expires?: number | string
}
/*
* Fourth-level headlines should be italic
*/
h4 {
font-weight: 400;
font-style: italic;
/* Type: Cookie */
declare type Cookie = {
getJSON(json: string): Object,
set(key: string, value: Array<string>, options?: Options): string
}
/* Exports */
declare export default Cookie
}
/*
* Permalink support
*/
.article {
h2, h3, h4, h5, h6 {
a {
font-weight: 400;
font-style: normal;
}
}
}
+36
View File
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/* ----------------------------------------------------------------------------
* Declarations
* ------------------------------------------------------------------------- */
declare class Jsx {
static createElement(tag: string, properties?: Object,
...children?: Array<
string | number | { __html?: string } | Array<HTMLElement>
>
): HTMLElement
}
/* Exports */
declare export default Jsx
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -21,27 +21,14 @@
*/
/* ----------------------------------------------------------------------------
* Palette
* Declarations
* ------------------------------------------------------------------------- */
/*
* Primary and accent color
* Currently, it's not possible to export a function that returns a class type,
* as the imports just don't correctly work with flow. As a workaround we
* export an object until this error is fixed.
*/
$primary: $red-400 !default;
$accent: $teal-a700 !default;
/*
* Black opacities
*/
$black: rgba(black, 0.87);
$black-light: rgba(black, 0.54);
$black-lighter: rgba(black, 0.26);
$black-lightest: rgba(black, 0.12);
/*
* White opacities
*/
$white: rgba(white, 1.00);
$white-light: rgba(white, 0.70);
$white-lighter: rgba(white, 0.30);
$white-lightest: rgba(white, 0.12);
declare module "expose-loader?lunr!lunr" {
declare function exports(name: () => void): Object
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -20,7 +20,13 @@
* IN THE SOFTWARE.
*/
@import "base/animation";
@import "base/appearance";
@import "base/layout";
@import "base/typography";
/* ----------------------------------------------------------------------------
* Declarations
* ------------------------------------------------------------------------- */
declare class Modernizr {
static addTest(name: string, test: () => boolean): void
}
/* Exports */
declare export default Modernizr
+76
View File
@@ -0,0 +1,76 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/* ----------------------------------------------------------------------------
* Module
* ------------------------------------------------------------------------- */
/* eslint-disable no-underscore-dangle */
export default /* JSX */ {
/**
* Create a native DOM node from JSX's intermediate representation
*
* @param {string} tag - Tag name
* @param {?Object} properties - Properties
* @param {Array<string | number | { __html: string } | Array<HTMLElement>>}
* children - Child nodes
* @return {HTMLElement} Native DOM node
*/
createElement(tag, properties, ...children) {
const el = document.createElement(tag)
/* Set all properties */
if (properties)
Array.prototype.forEach.call(Object.keys(properties), attr => {
el.setAttribute(attr, properties[attr])
})
/* Iterate child nodes */
const iterateChildNodes = nodes => {
Array.prototype.forEach.call(nodes, node => {
/* Directly append text content */
if (typeof node === "string" ||
typeof node === "number") {
el.textContent += node
/* Recurse, if we got an array */
} else if (Array.isArray(node)) {
iterateChildNodes(node)
/* Append raw HTML */
} else if (typeof node.__html !== "undefined") {
el.innerHTML += node.__html
/* Append regular nodes */
} else if (node instanceof Node) {
el.appendChild(node)
}
})
}
/* Iterate child nodes and return element */
iterateChildNodes(children)
return el
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
/* ----------------------------------------------------------------------------
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/images/**/favicon.*`)
.pipe(changed(`${config.assets.build}/images`))
.pipe(gulp.dest(`${config.assets.build}/images`))
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -20,69 +20,35 @@
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
import gulpif from "gulp-if"
import minsvg from "gulp-svgmin"
import rev from "gulp-rev"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Code highlighter
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
/*
* Code block
*/
pre {
background: rgba($black, 0.05);
/*
* Ensure correct color
*/
&, code {
color: $black;
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/images/**/*.svg`)
.pipe(changed(`${config.assets.build}/images`))
.pipe(gulpif(args.optimize,
minsvg({
plugins: [
{ cleanupIDs: false }
]
})))
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/images`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
/*
* Operators and comments
*/
.o, .c, .c1, .cm {
color: $black-light;
}
/*
* Keywords
*/
.k, .kn {
color: #A71D5D;
}
/*
* Types and functions
*/
.kt, .kd {
color: #0086B3;
}
/*
* Function definition
*/
.nf, .n.f {
color: #795da3;
}
/*
* Classes
*/
.nx {
color: #0086b3;
}
/*
* Strings
*/
.s, .s1 {
color: #183691;
}
/*
* Constants and numbers
*/
.mi, .bp {
color: #9575CD;
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean images generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/images/*`)
.pipe(vinyl(clean))
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016 Martin Donath <martin.donath@squidfunk.com>
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
@@ -20,62 +20,44 @@
* IN THE SOFTWARE.
*/
import { transform } from "babel-core"
import jsdoc2flow from "flow-jsdoc"
import through from "through2"
/* ----------------------------------------------------------------------------
* Drawer animation
* Task: annotate JavaScript
* ------------------------------------------------------------------------- */
/*
* Drawer container
*/
.drawer {
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* [tablet landscape-]: Hide menu */
@include break-to-device(tablet landscape) {
transform: translate3d(-262px, 0, 0);
transition: transform .25s cubic-bezier(.4, 0, .2, 1);
/* Linting */
.pipe(
through.obj(function(file, enc, done) {
if (file.isNull() || file.isStream())
return done()
/*
* Just hide drawer, if browser doesn't support 3D transforms
*/
.no-csstransforms3d & {
display: none;
}
}
/* Perform Babel transformation to resolve JSX calls */
const transformed = transform(file.contents.toString(), {
plugins: [
["transform-react-jsx", {
"pragma": "Jsx.createElement"
}]
]
})
/*
* Expanded drawer
*/
#toggle-drawer:checked ~ .main &,
.toggle-drawer & {
transform: translate3d(0, 0, 0);
/* Annotate contents */
file.contents = new Buffer(jsdoc2flow(
`/* @flow */\n\n${transformed.code}`
).toString())
/*
* Just show drawer, if browser doesn't support 3D transforms
*/
.no-csstransforms3d & {
display: block;
}
/* Push file to next stage */
this.push(file)
done()
}))
/* Print errors */
.pipe(gulp.dest("tmp/assets/javascripts"))
}
}
/*
* No color transition for project link
*/
.project {
transition: none;
}
/*
* Project logo image
*/
.project .logo img {
transition: box-shadow .4s;
}
/*
* Repository buttons
*/
.repo a {
transition: box-shadow .4s,
opacity .4s;
}
@@ -0,0 +1,131 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import gulpif from "gulp-if"
import path from "path"
import rev from "gulp-rev"
import stream from "webpack-stream"
import version from "gulp-rev-replace"
import webpack from "webpack"
/* ----------------------------------------------------------------------------
* Task: build application logic
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* Build with webpack */
.pipe(
stream({
entry: [
/* Polyfills */
"core-js/fn/promise",
"custom-event-polyfill",
"whatwg-fetch",
/* Main entry point */
"application.js"
],
output: {
filename: "application.js",
library: "app",
libraryTarget: "window"
},
module: {
/* Transpile ES6 to ES5 with Babel */
rules: [
{
loader: "babel-loader",
test: /\.jsx?$/
}
]
},
plugins: [
/* Don't emit assets that include errors */
new webpack.NoEmitOnErrorsPlugin(),
/* Provide JSX helper */
new webpack.ProvidePlugin({
Jsx: path.join(process.cwd(), `${config.lib}/providers/jsx.js`)
})
].concat(
/* Minify sources */
args.optimize ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true, // eslint-disable-line camelcase
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true, // eslint-disable-line camelcase
evaluate: true,
if_return: true, // eslint-disable-line camelcase
join_vars: true // eslint-disable-line camelcase
},
output: {
comments: false
}
})
] : []),
/* Module resolver */
resolve: {
modules: [
"src/assets/javascripts",
"node_modules"
],
extensions: [
".js",
".jsx"
]
},
/* Webpack commandline output */
stats: {
colors: true
},
/* Sourcemap support */
devtool: args.sourcemaps ? "inline-source-map" : ""
}, webpack))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import gulpif from "gulp-if"
import uglify from "gulp-uglify"
/* ----------------------------------------------------------------------------
* Task: build search language support files
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src("node_modules/lunr-languages/*.js")
.pipe(gulpif(args.optimize, uglify()))
.pipe(gulp.dest(`${config.assets.build}/javascripts/lunr`))
}
}
@@ -0,0 +1,63 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import concat from "gulp-concat"
import gulpif from "gulp-if"
import modernizr from "gulp-modernizr"
import uglify from "gulp-uglify"
import rev from "gulp-rev"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: build custom modernizr
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.build}/stylesheets/*.css`)
/* Build custom modernizr */
.pipe(
modernizr({
options: [
"addTest", /* Add custom tests */
"setClasses" /* Add CSS classes to root tag */
]
}))
.pipe(concat("modernizr.js"))
/* Minify sources */
.pipe(gulpif(args.optimize, uglify()))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(`${config.assets.build}/javascripts`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean JavaScript generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/javascripts/*`)
.pipe(vinyl(clean))
}
}
+108
View File
@@ -0,0 +1,108 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import path from "path"
import through from "through2"
import util from "gulp-util"
import { CLIEngine } from "eslint"
/* ----------------------------------------------------------------------------
* Locals
* ------------------------------------------------------------------------- */
const eslint = new CLIEngine
const format = eslint.getFormatter()
/* ----------------------------------------------------------------------------
* Task: lint JavaScript
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* Linting */
.pipe(
through.obj(function(file, enc, done) {
if (file.isNull() || file.isStream())
return done()
/* Lint file using .eslintrc */
file.eslint = eslint.executeOnText(
file.contents.toString())
/* Correct file path */
file.eslint.results[0].filePath =
path.relative(process.cwd(), file.path)
/* Push file to next stage */
this.push(file)
done()
}))
/* Print errors */
.pipe(
through.obj(function(file, enc, done) {
if (file.eslint.errorCount || file.eslint.warningCount) {
// eslint-disable-next-line no-console
console.log(format(file.eslint.results))
}
/* Push file to next stage */
this.push(file)
done()
}))
/* Terminate on error */
.pipe(
(() => {
const errors = []
/* Gather errors */
return through.obj(function(file, enc, done) {
const results = file.eslint
/* Consider warnings as errors */
if (results.errorCount || results.warningCount)
errors.push(file)
/* Push file to next stage */
this.push(file)
done()
/* Format errors and terminate */
}, function(done) {
if (errors.length > 0) {
const message = errors.map(file => {
return file.relative
}).join(", ")
/* Emit error */
this.emit("error", new util.PluginError("eslint",
`Terminated with errors in files: ${message}`))
}
done()
})
})())
}
}
+80
View File
@@ -0,0 +1,80 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import autoprefixer from "autoprefixer"
import gulpif from "gulp-if"
import mincss from "gulp-cssnano"
import mqpacker from "css-mqpacker"
import postcss from "gulp-postcss"
import pseudoclasses from "postcss-pseudo-classes"
import rev from "gulp-rev"
import sass from "gulp-sass"
import sourcemaps from "gulp-sourcemaps"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: build stylesheets from SASS source
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
return gulp.src(`${config.assets.src}/stylesheets/*.scss`)
.pipe(gulpif(args.sourcemaps, sourcemaps.init()))
/* Compile SASS sources */
.pipe(
sass({
includePaths: [
"node_modules/modularscale-sass/stylesheets",
"node_modules/material-design-color",
"node_modules/material-shadows"
]
}))
/* Apply PostCSS plugins */
.pipe(
postcss([
autoprefixer(),
mqpacker
].concat(!args.optimize ? [
pseudoclasses({
"restrictTo": ["hover", "focus"]
})
] : [])))
/* Minify sources */
.pipe(gulpif(args.optimize, mincss()))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulp.dest(`${config.assets.build}/stylesheets`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
base: config.assets.build,
merge: true
})))
.pipe(gulpif(args.revision, gulp.dest(config.assets.build)))
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean stylesheets generated by build
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.build}/stylesheets/*`)
.pipe(vinyl(clean))
}
}
+39
View File
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import stylelint from "gulp-stylelint"
/* ----------------------------------------------------------------------------
* Task: lint SASS sources
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/stylesheets/**/*.scss`)
.pipe(
stylelint({
reporters: [
{ formatter: "string", console: true }
]
}))
}
}
+36
View File
@@ -0,0 +1,36 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import child from "child_process"
/* ----------------------------------------------------------------------------
* Task: build documentation
* ------------------------------------------------------------------------- */
export default () => {
return () => {
const proc = child.spawnSync("mkdocs", ["build"])
if (proc.status)
throw new Error(`MkDocs error:\n${proc.stderr.toString()}`)
return proc
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean documentation build
* ------------------------------------------------------------------------- */
export default gulp => {
return () => {
return gulp.src("site")
.pipe(vinyl(clean))
}
}
+46
View File
@@ -0,0 +1,46 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import child from "child_process"
/* ----------------------------------------------------------------------------
* Locals
* ------------------------------------------------------------------------- */
/* MkDocs server */
let server = null
/* ----------------------------------------------------------------------------
* Task: serve documentation
* ------------------------------------------------------------------------- */
export default () => {
return () => {
if (server)
server.kill()
/* Spawn MkDocs server */
server = child.spawn("mkdocs", ["serve", "--dev-addr", "0.0.0.0:8000"], {
stdio: "inherit"
})
}
}
+58
View File
@@ -0,0 +1,58 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import changed from "gulp-changed"
import compact from "gulp-remove-empty-lines"
import gulpif from "gulp-if"
import minhtml from "gulp-htmlmin"
import path from "path"
import replace from "gulp-replace"
import version from "gulp-rev-replace"
/* ----------------------------------------------------------------------------
* Task: minify views
* ------------------------------------------------------------------------- */
export default (gulp, config, args) => {
return () => {
const metadata = require(path.join(process.cwd(), "./package.json"))
return gulp.src(`${config.views.src}/**/*.{html,py}`)
.pipe(changed(config.views.build))
.pipe(
minhtml({
collapseBooleanAttributes: true,
customAttrCollapse: /(content)/,
includeAutoGeneratedTags: false,
minifyCSS: true,
minifyJS: true,
removeComments: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}))
.pipe(replace("$md-name$", metadata.name))
.pipe(replace("$md-version$", metadata.version))
.pipe(compact())
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulp.dest(config.views.build))
}
}
+35
View File
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2016-2017 Martin Donath <martin.donath@squidfunk.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
import clean from "del"
import vinyl from "vinyl-paths"
/* ----------------------------------------------------------------------------
* Task: clean views
* ------------------------------------------------------------------------- */
export default (gulp, config) => {
return () => {
return gulp.src(`${config.views.build}/**/*.{html,py}`)
.pipe(vinyl(clean))
}
}
+4
View File
@@ -0,0 +1,4 @@
{% extends "base.html" %}
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
Binary file not shown.
-22
View File
@@ -1,22 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Generated by IcoMoon</metadata>
<defs>
<font id="icon" horiz-adv-x="1024">
<font-face units-per-em="1024" ascent="960" descent="-64" />
<missing-glyph horiz-adv-x="1024" />
<glyph unicode="&#x20;" horiz-adv-x="512" d="" />
<glyph unicode="&#xe600;" glyph-name="search" d="M661.333 341.334h-33.92l-11.733 11.733c41.813 48.427 66.987 111.36 66.987 180.267 0 153.173-124.16 277.333-277.333 277.333s-277.333-124.16-277.333-277.333 124.16-277.333 277.333-277.333c68.907 0 131.84 25.173 180.267 66.773l11.733-11.733v-33.707l213.333-212.907 63.573 63.573-212.907 213.333zM405.333 341.334c-106.027 0-192 85.973-192 192s85.973 192 192 192 192-85.973 192-192-85.973-192-192-192z" />
<glyph unicode="&#xe601;" glyph-name="arrow-back" d="M853.333 469.334h-519.253l238.293 238.293-60.373 60.373-341.333-341.333 341.333-341.333 60.373 60.373-238.293 238.293h519.253v85.333z" />
<glyph unicode="&#xe602;" glyph-name="chevron-right" d="M426.667 682.667l-60.373-60.373 195.627-195.627-195.627-195.627 60.373-60.373 256 256z" />
<glyph unicode="&#xe603;" glyph-name="close" d="M810.667 664.96l-60.373 60.373-238.293-238.293-238.293 238.293-60.373-60.373 238.293-238.293-238.293-238.293 60.373-60.373 238.293 238.293 238.293-238.293 60.373 60.373-238.293 238.293z" />
<glyph unicode="&#xe604;" glyph-name="menu" d="M128 170.667h768v85.333h-768v-85.333zM128 384h768v85.333h-768v-85.333zM128 682.667v-85.333h768v85.333h-768z" />
<glyph unicode="&#xe605;" glyph-name="arrow-forward" d="M512 768l-60.373-60.373 238.293-238.293h-519.253v-85.333h519.253l-238.293-238.293 60.373-60.373 341.333 341.333z" />
<glyph unicode="&#xe606;" glyph-name="twitter" d="M1024 744.249c-37.676-16.708-78.164-28.002-120.66-33.080 43.372 26 76.686 67.17 92.372 116.23-40.596-24.078-85.556-41.56-133.41-50.98-38.32 40.83-92.922 66.34-153.346 66.34-116.022 0-210.088-94.058-210.088-210.078 0-16.466 1.858-32.5 5.44-47.878-174.6 8.764-329.402 92.4-433.018 219.506-18.084-31.028-28.446-67.116-28.446-105.618 0-72.888 37.088-137.192 93.46-174.866-34.438 1.092-66.832 10.542-95.154 26.278-0.020-0.876-0.020-1.756-0.020-2.642 0-101.788 72.418-186.696 168.522-206-17.626-4.8-36.188-7.372-55.348-7.372-13.538 0-26.698 1.32-39.528 3.772 26.736-83.46 104.32-144.206 196.252-145.896-71.9-56.35-162.486-89.934-260.916-89.934-16.958 0-33.68 0.994-50.116 2.94 92.972-59.61 203.402-94.394 322.042-94.394 386.422 0 597.736 320.124 597.736 597.744 0 9.108-0.206 18.168-0.61 27.18 41.056 29.62 76.672 66.62 104.836 108.748z" />
<glyph unicode="&#xe607;" glyph-name="github" d="M512.008 926.025c-282.738 0-512.008-229.218-512.008-511.998 0-226.214 146.704-418.132 350.136-485.836 25.586-4.738 34.992 11.11 34.992 24.632 0 12.204-0.48 52.542-0.696 95.324-142.448-30.976-172.504 60.41-172.504 60.41-23.282 59.176-56.848 74.916-56.848 74.916-46.452 31.778 3.51 31.124 3.51 31.124 51.4-3.61 78.476-52.766 78.476-52.766 45.672-78.27 119.776-55.64 149.004-42.558 4.588 33.086 17.852 55.68 32.506 68.464-113.73 12.942-233.276 56.85-233.276 253.032 0 55.898 20.004 101.574 52.76 137.428-5.316 12.9-22.854 64.972 4.952 135.5 0 0 43.006 13.752 140.84-52.49 40.836 11.348 84.636 17.036 128.154 17.234 43.502-0.198 87.336-5.886 128.256-17.234 97.734 66.244 140.656 52.49 140.656 52.49 27.872-70.528 10.35-122.6 5.036-135.5 32.82-35.856 52.694-81.532 52.694-137.428 0-196.654-119.778-239.95-233.79-252.624 18.364-15.89 34.724-47.046 34.724-94.812 0-68.508-0.596-123.644-0.596-140.508 0-13.628 9.222-29.594 35.172-24.566 203.322 67.776 349.842 259.626 349.842 485.768 0 282.78-229.234 511.998-511.992 511.998z" />
<glyph unicode="&#xe608;" glyph-name="download" d="M810.667 554.667h-170.667v256h-256v-256h-170.667l298.667-298.667 298.667 298.667zM213.333 170.667v-85.333h597.333v85.333h-597.333z" />
<glyph unicode="&#xe609;" glyph-name="star" d="M512 201.814l263.68-159.147-69.973 299.947 232.96 201.813-306.773 26.027-119.893 282.88-119.893-282.88-306.773-26.027 232.96-201.813-69.973-299.947z" />
<glyph unicode="&#xe610;" glyph-name="warning" d="M554 340.667v172h-84v-172h84zM554 170.667v86h-84v-86h84zM42 42.667l470 810 470-810h-940z" />
<glyph unicode="&#xe611;" glyph-name="hint" d="M614 682.667h240v-426h-300l-16 84h-240v-298h-84v726h384z" />
</font></defs></svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="352" height="448" viewBox="0 0 352 448" id="bitbucket"><path fill="currentColor" d="M203.75 214.75q2 15.75-12.625 25.25t-27.875 1.5q-9.75-4.25-13.375-14.5t-.125-20.5 13-14.5q9-4.5 18.125-3t16 8.875 6.875 16.875zm27.75-5.25q-3.5-26.75-28.25-41T154 165.25q-15.75 7-25.125 22.125t-8.625 32.375q1 22.75 19.375 38.75t41.375 14q22.75-2 38-21t12.5-42zM291.25 74q-5-6.75-14-11.125t-14.5-5.5T245 54.25q-72.75-11.75-141.5.5-10.75 1.75-16.5 3t-13.75 5.5T60.75 74q7.5 7 19 11.375t18.375 5.5T120 93.75Q177 101 232 94q15.75-2 22.375-3t18.125-5.375T291.25 74zm14.25 258.75q-2 6.5-3.875 19.125t-3.5 21-7.125 17.5-14.5 14.125q-21.5 12-47.375 17.875t-50.5 5.5-50.375-4.625q-11.5-2-20.375-4.5T88.75 412 70.5 401.125t-13-15.375q-6.25-24-14.25-73l1.5-4 4.5-2.25q55.75 37 126.625 37t126.875-37q5.25 1.5 6 5.75t-1.25 11.25-2 9.25zM350.75 92.5q-6.5 41.75-27.75 163.75-1.25 7.5-6.75 14t-10.875 10T291.75 288q-63 31.5-152.5 22-62-6.75-98.5-34.75-3.75-3-6.375-6.625t-4.25-8.75-2.25-8.5-1.5-9.875T25 232.75q-2.25-12.5-6.625-37.5t-7-40.375T5.5 118 0 78.5Q.75 72 4.375 66.375T12.25 57t11.25-7.5T35 43.875t12-4.625q31.25-11.5 78.25-16 94.75-9.25 169 12.5Q333 47.25 348 66.25q4 5 4.125 12.75t-1.375 13.5z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>

After

Width:  |  Height:  |  Size: 991 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500" id="gitlab"><path fill="currentColor" d="M93.667 473.347l90.684-279.097H2.983l90.684 279.097z" transform="translate(156.198 1.16)"/><path fill="currentColor" d="M221.333 473.345L130.649 194.25H3.557l217.776 279.095z" transform="translate(28.531 1.16)" opacity=".7"/><path fill="currentColor" d="M32 195.155L4.441 279.97a18.773 18.773 0 0 0 6.821 20.99l238.514 173.29L32 195.155z" transform="translate(.089 .256)" opacity=".5"/><path fill="currentColor" d="M2.667-84.844h127.092L75.14-252.942c-2.811-8.649-15.047-8.649-17.856 0L2.667-84.844z" transform="translate(29.422 280.256)"/><path fill="currentColor" d="M2.667 473.345L93.351 194.25h127.092L2.667 473.345z" transform="translate(247.198 1.16)" opacity=".7"/><path fill="currentColor" d="M221.334 195.155l27.559 84.815a18.772 18.772 0 0 1-6.821 20.99L3.557 474.25l217.777-279.095z" transform="translate(246.307 .256)" opacity=".5"/><path fill="currentColor" d="M130.667-84.844H3.575l54.618-168.098c2.811-8.649 15.047-8.649 17.856 0l54.618 168.098z" transform="translate(336.974 280.256)"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.da=function(){this.pipeline.reset(),this.pipeline.add(e.da.trimmer,e.da.stopWordFilter,e.da.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.da.stemmer))},e.da.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.da.trimmer=e.trimmerSupport.generateTrimmer(e.da.wordCharacters),e.Pipeline.registerFunction(e.da.trimmer,"trimmer-da"),e.da.stemmer=function(){var r=e.stemmerSupport.Among,i=e.stemmerSupport.SnowballProgram,n=new function(){function e(){var e,r=f.cursor+3;if(d=f.limit,0<=r&&r<=f.limit){for(a=r;;){if(e=f.cursor,f.in_grouping(w,97,248)){f.cursor=e;break}if(f.cursor=e,e>=f.limit)return;f.cursor++}for(;!f.out_grouping(w,97,248);){if(f.cursor>=f.limit)return;f.cursor++}(d=f.cursor)<a&&(d=a)}}function n(){var e,r;if(f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(c,32),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del();break;case 2:f.in_grouping_b(p,97,229)&&f.slice_del()}}function t(){var e,r=f.limit-f.cursor;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.find_among_b(l,4)?(f.bra=f.cursor,f.limit_backward=e,f.cursor=f.limit-r,f.cursor>f.limit_backward&&(f.cursor--,f.bra=f.cursor,f.slice_del())):f.limit_backward=e)}function s(){var e,r,i,n=f.limit-f.cursor;if(f.ket=f.cursor,f.eq_s_b(2,"st")&&(f.bra=f.cursor,f.eq_s_b(2,"ig")&&f.slice_del()),f.cursor=f.limit-n,f.cursor>=d&&(r=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,e=f.find_among_b(m,5),f.limit_backward=r,e))switch(f.bra=f.cursor,e){case 1:f.slice_del(),i=f.limit-f.cursor,t(),f.cursor=f.limit-i;break;case 2:f.slice_from("løs")}}function o(){var e;f.cursor>=d&&(e=f.limit_backward,f.limit_backward=d,f.ket=f.cursor,f.out_grouping_b(w,97,248)?(f.bra=f.cursor,u=f.slice_to(u),f.limit_backward=e,f.eq_v_b(u)&&f.slice_del()):f.limit_backward=e)}var a,d,u,c=[new r("hed",-1,1),new r("ethed",0,1),new r("ered",-1,1),new r("e",-1,1),new r("erede",3,1),new r("ende",3,1),new r("erende",5,1),new r("ene",3,1),new r("erne",3,1),new r("ere",3,1),new r("en",-1,1),new r("heden",10,1),new r("eren",10,1),new r("er",-1,1),new r("heder",13,1),new r("erer",13,1),new r("s",-1,2),new r("heds",16,1),new r("es",16,1),new r("endes",18,1),new r("erendes",19,1),new r("enes",18,1),new r("ernes",18,1),new r("eres",18,1),new r("ens",16,1),new r("hedens",24,1),new r("erens",24,1),new r("ers",16,1),new r("ets",16,1),new r("erets",28,1),new r("et",-1,1),new r("eret",30,1)],l=[new r("gd",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("elig",1,1),new r("els",-1,1),new r("løst",-1,2)],w=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],p=[239,254,42,3,0,0,0,0,0,0,0,0,0,0,0,0,16],f=new i;this.setCurrent=function(e){f.setCurrent(e)},this.getCurrent=function(){return f.getCurrent()},this.stem=function(){var r=f.cursor;return e(),f.limit_backward=r,f.cursor=f.limit,n(),f.cursor=f.limit,t(),f.cursor=f.limit,s(),f.cursor=f.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return n.setCurrent(e),n.stem(),n.getCurrent()}):(n.setCurrent(e),n.stem(),n.getCurrent())}}(),e.Pipeline.registerFunction(e.da.stemmer,"stemmer-da"),e.da.stopWordFilter=e.generateStopWordFilter("ad af alle alt anden at blev blive bliver da de dem den denne der deres det dette dig din disse dog du efter eller en end er et for fra ham han hans har havde have hende hendes her hos hun hvad hvis hvor i ikke ind jeg jer jo kunne man mange med meget men mig min mine mit mod ned noget nogle nu når og også om op os over på selv sig sin sine sit skal skulle som sådan thi til ud under var vi vil ville vor være været".split(" ")),e.Pipeline.registerFunction(e.da.stopWordFilter,"stopWordFilter-da")}});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");var r="2"==e.version[0];e.jp=function(){this.pipeline.reset(),this.pipeline.add(e.jp.stopWordFilter,e.jp.stemmer),r?this.tokenizer=e.jp.tokenizer:(e.tokenizer&&(e.tokenizer=e.jp.tokenizer),this.tokenizerFn&&(this.tokenizerFn=e.jp.tokenizer))};var t=new e.TinySegmenter;e.jp.tokenizer=function(n){if(!arguments.length||null==n||void 0==n)return[];if(Array.isArray(n))return n.map(function(t){return r?new e.Token(t.toLowerCase()):t.toLowerCase()});for(var i=n.toString().toLowerCase().replace(/^\s+/,""),o=i.length-1;o>=0;o--)if(/\S/.test(i.charAt(o))){i=i.substring(0,o+1);break}return t.segment(i).filter(function(e){return!!e}).map(function(t){return r?new e.Token(t):t})},e.jp.stemmer=function(){return function(e){return e}}(),e.Pipeline.registerFunction(e.jp.stemmer,"stemmer-jp"),e.jp.wordCharacters="一二三四五六七八九十百千万億兆一-龠々〆ヵヶぁ-んァ-ヴーア-ン゙a-zA-Z-zA-0-9-",e.jp.stopWordFilter=function(t){if(-1===e.jp.stopWordFilter.stopWords.indexOf(r?t.toString():t))return t},e.jp.stopWordFilter=e.generateStopWordFilter("これ それ あれ この その あの ここ そこ あそこ こちら どこ だれ なに なん 何 私 貴方 貴方方 我々 私達 あの人 あのかた 彼女 彼 です あります おります います は が の に を で え から まで より も どの と し それで しかし".split(" ")),e.Pipeline.registerFunction(e.jp.stopWordFilter,"stopWordFilter-jp")}});
@@ -0,0 +1 @@
!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p<i.length;++p)"en"==i[p]?(r+="\\w",n.unshift(e.stopWordFilter),n.push(e.stemmer),s.push(e.stemmer)):(r+=e[i[p]].wordCharacters,n.unshift(e[i[p]].stopWordFilter),n.push(e[i[p]].stemmer),s.push(e[i[p]].stemmer));var o=e.trimmerSupport.generateTrimmer(r);return e.Pipeline.registerFunction(o,"lunr-multi-trimmer-"+t),n.unshift(o),function(){this.pipeline.reset(),this.pipeline.add.apply(this.pipeline,n),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add.apply(this.searchPipeline,s))}}}});
@@ -0,0 +1 @@
!function(e,r){"function"==typeof define&&define.amd?define(r):"object"==typeof exports?module.exports=r():r()(e.lunr)}(this,function(){return function(e){if(void 0===e)throw new Error("Lunr is not present. Please include / require Lunr before this script.");if(void 0===e.stemmerSupport)throw new Error("Lunr stemmer support is not present. Please include / require Lunr stemmer support before this script.");e.no=function(){this.pipeline.reset(),this.pipeline.add(e.no.trimmer,e.no.stopWordFilter,e.no.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.no.stemmer))},e.no.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.no.trimmer=e.trimmerSupport.generateTrimmer(e.no.wordCharacters),e.Pipeline.registerFunction(e.no.trimmer,"trimmer-no"),e.no.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,i=new function(){function e(){var e,r=w.cursor+3;if(a=w.limit,0<=r||r<=w.limit){for(s=r;;){if(e=w.cursor,w.in_grouping(d,97,248)){w.cursor=e;break}if(e>=w.limit)return;w.cursor=e+1}for(;!w.out_grouping(d,97,248);){if(w.cursor>=w.limit)return;w.cursor++}(a=w.cursor)<s&&(a=s)}}function i(){var e,r,n;if(w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,e=w.find_among_b(m,29),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:n=w.limit-w.cursor,w.in_grouping_b(c,98,122)?w.slice_del():(w.cursor=w.limit-n,w.eq_s_b(1,"k")&&w.out_grouping_b(d,97,248)&&w.slice_del());break;case 3:w.slice_from("er")}}function t(){var e,r=w.limit-w.cursor;w.cursor>=a&&(e=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,w.find_among_b(u,2)?(w.bra=w.cursor,w.limit_backward=e,w.cursor=w.limit-r,w.cursor>w.limit_backward&&(w.cursor--,w.bra=w.cursor,w.slice_del())):w.limit_backward=e)}function o(){var e,r;w.cursor>=a&&(r=w.limit_backward,w.limit_backward=a,w.ket=w.cursor,(e=w.find_among_b(l,11))?(w.bra=w.cursor,w.limit_backward=r,1==e&&w.slice_del()):w.limit_backward=r)}var s,a,m=[new r("a",-1,1),new r("e",-1,1),new r("ede",1,1),new r("ande",1,1),new r("ende",1,1),new r("ane",1,1),new r("ene",1,1),new r("hetene",6,1),new r("erte",1,3),new r("en",-1,1),new r("heten",9,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",12,1),new r("s",-1,2),new r("as",14,1),new r("es",14,1),new r("edes",16,1),new r("endes",16,1),new r("enes",16,1),new r("hetenes",19,1),new r("ens",14,1),new r("hetens",21,1),new r("ers",14,1),new r("ets",14,1),new r("et",-1,1),new r("het",25,1),new r("ert",-1,3),new r("ast",-1,1)],u=[new r("dt",-1,-1),new r("vt",-1,-1)],l=[new r("leg",-1,1),new r("eleg",0,1),new r("ig",-1,1),new r("eig",2,1),new r("lig",2,1),new r("elig",4,1),new r("els",-1,1),new r("lov",-1,1),new r("elov",7,1),new r("slov",7,1),new r("hetslov",9,1)],d=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,48,0,128],c=[119,125,149,1],w=new n;this.setCurrent=function(e){w.setCurrent(e)},this.getCurrent=function(){return w.getCurrent()},this.stem=function(){var r=w.cursor;return e(),w.limit_backward=r,w.cursor=w.limit,i(),w.cursor=w.limit,t(),w.cursor=w.limit,o(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return i.setCurrent(e),i.stem(),i.getCurrent()}):(i.setCurrent(e),i.stem(),i.getCurrent())}}(),e.Pipeline.registerFunction(e.no.stemmer,"stemmer-no"),e.no.stopWordFilter=e.generateStopWordFilter("alle at av bare begge ble blei bli blir blitt både båe da de deg dei deim deira deires dem den denne der dere deres det dette di din disse ditt du dykk dykkar då eg ein eit eitt eller elles en enn er et ett etter for fordi fra før ha hadde han hans har hennar henne hennes her hjå ho hoe honom hoss hossen hun hva hvem hver hvilke hvilken hvis hvor hvordan hvorfor i ikke ikkje ikkje ingen ingi inkje inn inni ja jeg kan kom korleis korso kun kunne kva kvar kvarhelst kven kvi kvifor man mange me med medan meg meget mellom men mi min mine mitt mot mykje ned no noe noen noka noko nokon nokor nokre nå når og også om opp oss over på samme seg selv si si sia sidan siden sin sine sitt sjøl skal skulle slik so som som somme somt så sånn til um upp ut uten var vart varte ved vere verte vi vil ville vore vors vort vår være være vært å".split(" ")),e.Pipeline.registerFunction(e.no.stopWordFilter,"stopWordFilter-no")}});
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More