Compare commits

...
428 Commits
Author SHA1 Message Date
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
squidfunk e68f54c79f Setup Gemini for visual regression testing 2017-01-13 17:34:39 +01:00
165 changed files with 11094 additions and 1709 deletions
+1 -4
View File
@@ -2,9 +2,6 @@
"presets": ["es2015"],
"plugins": [
"add-module-exports",
"babel-root-import",
["transform-react-jsx", {
"pragma": "JSX.createElement"
}]
"root-import"
]
}
+5 -1
View File
@@ -18,7 +18,11 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
# Build files
# Files generated by build
/build
/material
/site
# Files used and generated by flow
/lib/declarations
/tmp
+24 -24
View File
@@ -1,28 +1,5 @@
{
"extends": "eslint:recommended",
"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
},
"env": {
"browser": true,
"es6": true,
@@ -35,6 +12,29 @@
"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"
},
@@ -169,7 +169,7 @@
"space-unary-ops": 2,
"spaced-comment": [2, "always", {
"line": {
"markers": ["/"],
"markers": ["/", ":"],
"exceptions": ["-", "+"]
},
"block": {
+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
@@ -25,6 +25,6 @@ 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 "Hook[post-merge]: Updating dependencies..."
npm install && npm prune
echo -e "\x1B[33m!\x1B[0m Updating dependencies"
yarn install
fi
+4 -2
View File
@@ -22,12 +22,14 @@
# Determine current branch
BRANCH=$(git rev-parse --abbrev-ref HEAD)
echo "Hook[pre-commit]: Checking branch..."
MESSAGE="Commits on master are only allowed via Pull Requests. Aborting."
# If we're on master, abort commit
if [[ "$BRANCH" == "master" ]]; then
echo "Commits on master are only allowed via Pull Requests. Aborting."
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
@@ -22,6 +22,7 @@
# 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 {
@@ -30,7 +31,7 @@ function cleanup {
git apply "$PATCH_FILE" 2> /dev/null
rm "$PATCH_FILE"
fi
exit $EXIT_CODE
exit $EXIT_CODE
}
# Register signal handlers
@@ -44,8 +45,26 @@ git checkout -- .
FILES=$(git diff --cached --name-only --diff-filter=ACMR | \
grep "\.\(js\|jsx\|scss\)$")
# Run the check and print indicator
# Run check and print indicator
if [ "$FILES" ]; then
echo "Hook[pre-commit]: Running linter..."
npm run lint --silent || exit 1
# 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
+11 -5
View File
@@ -18,11 +18,17 @@
### Package versions
- Python: `python --version`
- MkDocs: `mkdocs --version`
- Material: `pip show mkdocs-material | grep -E ^Version`
* 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]
* OS: [The operating system you're running]
* Browser: [The browser used, if relevant]
+6 -2
View File
@@ -23,14 +23,18 @@
# NPM-related
/node_modules
/npm-debug.log
/npm-debug.log*
/yarn-error.log
# Build files
# Files generated by build
/build
/manifest.json
/MANIFEST
/site
# Files generated by flow typechecker
/tmp
# Distribution files
/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
+3 -3
View File
@@ -6,6 +6,7 @@
],
"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", {
@@ -25,11 +26,11 @@
"font-weight-notation": "numeric",
"function-url-quotes": "always",
"no-unknown-animations": true,
"order/declaration-block-order": [
"order/order": [
"custom-properties",
"declarations"
],
"order/declaration-block-properties-specified-order": [
"order/properties-order": [
"display",
"position",
"top",
@@ -180,7 +181,6 @@
"z-index"
],
"property-no-vendor-prefix": true,
"root-no-standard-properties": true,
"selector-class-pattern": "^[a-z0-9]+(-[a-z0-9]+)*(__[a-z]+)?(--[a-z]+)?$",
"selector-descendant-combinator-no-non-space": null,
"string-quotes": "double",
+22 -8
View File
@@ -21,21 +21,35 @@
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
# -----------------------------------------------------------------------------
# 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
# Perform build and tests
script: npm run build
# Perform build and release
script:
- yarn run travis
+8
View File
@@ -0,0 +1,8 @@
.github/*
material/*
.editorconfig
.gitignore
CHANGELOG
LICENSE
*.md
git
+224 -2
View File
@@ -1,6 +1,228 @@
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 horizontal scrollbar in content area
* Fixed #108: Horizontal scrollbar in content area
mkdocs-material-1.0.1 (2017-01-14)
@@ -28,7 +250,7 @@ mkdocs-material-1.0.0 (2017-01-13)
* 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 pymdownx.* 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
+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/
+7 -6
View File
@@ -10,7 +10,7 @@ you do, please read the following guidelines.
For quick questions there's no need to open an issue as you can reach us on
[gitter.im][1].
[1]: https://gitter.im/mkdocs-material/general
[1]: https://gitter.im/squidfunk/mkdocs-material
### Found a bug?
@@ -30,12 +30,12 @@ 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
* 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
* **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.
@@ -66,8 +66,8 @@ go ahead.
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. This is a
mandatory requirement for your PR to get accepted, as the theme should at
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
@@ -78,4 +78,5 @@ go ahead.
After your PR is merged, you can safely delete your branch and pull the changes
from the main (upstream) repository.
[4]: http://localhost:8000/customization/#theme-development
[4]: http://squidfunk.github.io/mkdocs-material/customization/#environment-setup
[5]: http://squidfunk.github.io/mkdocs-material/customization/#build-process
+16 -8
View File
@@ -21,17 +21,25 @@
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
# Install packages
COPY requirements.txt .
RUN \
pip install -r requirements.txt && \
pip install mkdocs-material && \
rm requirements.txt
# Expose MkDocs default port
# Expose MkDocs development server port
EXPOSE 8000
# Start development server by default
+152 -68
View File
@@ -20,6 +20,7 @@
* IN THE SOFTWARE.
*/
import chalk from "chalk"
import gulp from "gulp"
import notifier from "node-notifier"
import plumber from "gulp-plumber"
@@ -30,28 +31,97 @@ 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 */
lib: "lib", /* Libraries and tasks */
views: {
src: "src", /* Source directory for views */
build: "material" /* Target directory for views */
}
}
const args = yargs
.default("clean", false) /* Clean before build */
.default("karma", true) /* Karma watchdog */
.default("lint", true) /* Lint sources */
.default("mkdocs", true) /* MkDocs watchdog */
.default("optimize", false) /* Optimize sources */
.default("revision", false) /* Revision assets */
.default("sourcemaps", false) /* Create sourcemaps */
/* 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
* ------------------------------------------------------------------------- */
@@ -90,9 +160,16 @@ gulp.src = (...glob) => {
/*
* 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 require(`./${config.lib}/tasks/${task}`)(gulp, config, args)
return done => {
return require(`./${config.lib}/tasks/${task}`)
.call(gulp, gulp, config, args)(done)
}
}
/* ----------------------------------------------------------------------------
@@ -102,26 +179,24 @@ const load = task => {
/*
* Copy favicon
*/
gulp.task("assets:images:build:ico",
load("assets/images/build/ico"))
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",
load("assets/images/build/svg"))
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", args.clean ? [
"assets:images:clean"
] : [], () => {
return gulp.start([
"assets:images:build:ico",
"assets:images:build:svg"
])
})
gulp.task("assets:images:build", [
"assets:images:build:ico",
"assets:images:build:svg"
])
/*
* Clean images generated by build
@@ -135,30 +210,45 @@ gulp.task("assets:images:clean",
/*
* 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",
load("assets/javascripts/build/application"))
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"
], load("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 application logic and modernizr
* Build search language support files
*/
gulp.task("assets:javascripts:build", (args.clean ? [
"assets:javascripts:clean"
] : []).concat(args.lint ? [
"assets:javascripts:lint"
] : []), () => {
return gulp.start([
"assets:javascripts:build:application",
"assets:javascripts:build:modernizr"
])
})
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
@@ -166,6 +256,12 @@ gulp.task("assets:javascripts:build", (args.clean ? [
gulp.task("assets:javascripts:clean",
load("assets/javascripts/clean"))
/*
* Annotate JavaScript
*/
gulp.task("assets:javascripts:annotate",
load("assets/javascripts/annotate"))
/*
* Lint JavaScript
*/
@@ -179,12 +275,10 @@ gulp.task("assets:javascripts:lint",
/*
* Build stylesheets from SASS source
*/
gulp.task("assets:stylesheets:build", (args.clean ? [
"assets:stylesheets:clean"
] : []).concat(args.lint ? [
"assets:stylesheets:lint"
] : []),
load("assets/stylesheets/build"))
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
@@ -227,13 +321,13 @@ gulp.task("assets:clean", [
/*
* Minify views
*/
gulp.task("views:build", (args.revision ? [
"assets:images:build",
"assets:stylesheets:build",
"assets:javascripts:build"
] : []).concat(args.clean ? [
"views:clean"
] : []), load("views/build"))
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
@@ -266,16 +360,6 @@ gulp.task("mkdocs:clean",
gulp.task("mkdocs:serve",
load("mkdocs/serve"))
/* ----------------------------------------------------------------------------
* Tests
* ------------------------------------------------------------------------- */
/*
* Start karma test runner
*/
gulp.task("tests:unit:watch",
load("tests/unit/watch"))
/* ----------------------------------------------------------------------------
* Interface
* ------------------------------------------------------------------------- */
@@ -285,10 +369,9 @@ gulp.task("tests:unit:watch",
*/
gulp.task("build", [
"assets:build",
"views:build"
].concat(args.mkdocs
? "mkdocs:build"
: []))
"views:build",
args.mkdocs ? "mkdocs:build" : false
].filter(f => f))
/*
* Clean assets and documentation
@@ -312,10 +395,6 @@ gulp.task("watch", [
if (args.mkdocs)
gulp.start("mkdocs:serve")
/* Start karma test runner */
// if (args.karma)
// gulp.start("tests:unit:watch")
/* Rebuild stylesheets */
gulp.watch([
`${config.assets.src}/stylesheets/**/*.scss`
@@ -337,6 +416,11 @@ gulp.task("watch", [
], ["views:build"])
})
/*
* Print help message
*/
gulp.task("help")
/*
* Build assets by default
*/
+2
View File
@@ -3,3 +3,5 @@ recursive-exclude site *
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
include LICENSE
include package.json
include requirements.txt
+25 -9
View File
@@ -1,13 +1,13 @@
[![Travis][travis-image]][travis-link]
[![Dependencies][deps-image]][deps-link]
[![Gitter][gitter-image]][gitter-link]
[![Codacy][codacy-image]][codacy-link]
[![Docker][docker-image]][docker-link]
[![PyPI][pypi-image]][pypi-link]
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg
[travis-image]: https://travis-ci.org/squidfunk/mkdocs-material.svg?branch=master
[travis-link]: https://travis-ci.org/squidfunk/mkdocs-material
[deps-image]: https://david-dm.org/squidfunk/mkdocs-material/dev-status.svg
[deps-link]: https://david-dm.org/squidfunk/mkdocs-material?type=dev
[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
@@ -15,27 +15,43 @@
[pypi-image]: https://img.shields.io/pypi/v/mkdocs-material.svg
[pypi-link]: https://pypi.python.org/pypi/mkdocs-material
# Material for MkDocs
A Material Design theme for [MkDocs](http://www.mkdocs.org).
A Material Design theme for [MkDocs][1].
[![Material for MkDocs](docs/images/material.png)](http://squidfunk.github.io/mkdocs-material/)
[![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/
-81
View File
@@ -1,81 +0,0 @@
# 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/mkdocs-material/general
### 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. 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://localhost:8000/customization/#theme-development
+1
View File
@@ -0,0 +1 @@
../CONTRIBUTING.md
+21 -14
View File
@@ -4,8 +4,8 @@
Project documentation is as diverse as the projects themselves and the Material
theme is a good starting point for making it look great. However, as you write
your documentation, you may reach some point where some small adjustments are
necessary to preserve the style.
your documentation, you may reach a point where some small adjustments are
necessary to preserve the desired style.
## Adding assets
@@ -98,6 +98,7 @@ The directory layout of the Material theme is as follows:
│ ├─ javascripts/ # JavaScript
│ └─ stylesheets/ # Stylesheets
├─ partials/
│ ├─ disqus.html # Disqus integration
│ ├─ footer.html # Footer bar
│ ├─ header.html # Header bar
│ ├─ language.html # Localized labels
@@ -106,6 +107,8 @@ The directory layout of the Material theme is as follows:
│ ├─ 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
@@ -141,6 +144,7 @@ The Material theme provides the following template blocks:
| ------------ | ----------------------------------------------- |
| `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 |
@@ -149,6 +153,7 @@ The Material theme provides the following template blocks:
| `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 |
@@ -174,7 +179,8 @@ theme and recompile it. This is fairly easy.
### Environment setup
In order to start development on the Material theme, a [Node.js][8] version of
at least 4 is required. Clone the repository from GitHub:
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
@@ -185,23 +191,24 @@ Next, all dependencies need to be installed, which is done with:
``` sh
cd mkdocs-material
pip install -r requirements.txt
npm install
yarn install
```
[8]: https://nodejs.org
[9]: https://yarnpkg.com/
### Development mode
The Material theme uses a sophisticated asset pipeline using [Gulp][9] and
The Material theme uses a sophisticated asset pipeline using [Gulp][10] and
Webpack which can be started with the following command:
``` sh
npm start
yarn start
```
This will also start the MkDocs development server which will monitor changes
on assets, templates and documentation. Point your browser to
[localhost:8000][10] and you should see this documentation in front of you.
[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
@@ -218,21 +225,21 @@ $md-color-accent: $clr-teal-a700;
directory are automatically generated from the `src` directory and will be
overriden when the theme is built.
[9]: http://gulpjs.com
[10]: http://localhost:8000
[10]: http://gulpjs.com
[11]: http://localhost:8000
### Build process
When you finished making your changes, you can build the theme by invoking:
When you've finished making your changes, you can build the theme by invoking:
``` sh
npm run build
yarn run build
```
This triggers the production-level compilation and minification of all
stylesheets 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`.
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.
+104 -5
View File
@@ -95,7 +95,7 @@ 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.
blocks, respectively Admonition blocks.
[4]: https://facelessuser.github.io/pymdown-extensions
[5]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
@@ -128,14 +128,40 @@ Example:
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 supported by the
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][6].
[6]: #note
qualifiers, is `note`.
### Note
@@ -185,6 +211,30 @@ 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:
@@ -235,6 +285,31 @@ Qualifiers:
* `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:
@@ -331,3 +406,27 @@ Result:
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`
+13 -5
View File
@@ -4,13 +4,21 @@
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]
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][3], CodeHilite will also highlight the code block. Pygments can
[300 languages][4], CodeHilite will also highlight the code block. Pygments can
be installed with the following command:
``` sh
@@ -32,8 +40,7 @@ markdown_extensions:
that and defines styles for the default `.codehilite` class, so the part
`css_class=code` needs to be removed.
[2]: http://pygments.org
[3]: http://pygments.org/languages
[4]: http://pygments.org/languages
## Usage
@@ -108,7 +115,8 @@ Line numbers can be added by enabling the `linenums` flag in your `mkdocs.yml`:
``` yaml
markdown_extensions:
- codehilite(linenums=true)
- codehilite:
linenums:true
```
Example:
+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
+4 -2
View File
@@ -13,7 +13,8 @@ To enable permalinks, add the following to your `mkdocs.yml`:
``` yaml
markdown_extensions:
- toc(permalink=true)
- toc:
permalink: true
```
This will add a link containing the paragraph symbol `` at the end of each
@@ -23,7 +24,8 @@ permalink, a string can be passed, e.g.:
``` markdown
markdown_extensions:
- toc(permalink=Link)
- toc:
permalink: Link
```
## Usage
+163 -161
View File
@@ -21,9 +21,11 @@ package are recommended to be used together with the Material theme:
``` yaml
markdown_extensions:
- pymdownx.arithmatex
- pymdownx.betterem(smart_enable=all)
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
@@ -31,175 +33,29 @@ markdown_extensions:
- pymdownx.mark
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tasklist(custom_checkbox=true)
- pymdownx.tasklist:
custom_checkbox: true
- pymdownx.tilde
```
## Usage
### GitHub Flavored Markdown
Most of the extensions included in the PyMdown Extensions package try to bring
the Markdown experience closer to GitHub Flavored Markdown (GFM).
The PyMdown Extensions package adds a shorthand to enable all of the included
extensions that provide the GFM experience. However, usage of the shorthand is
discouraged, because some extensions are not supported, as the Material theme
uses some incompatible extensions included in the standard Markdown library.
#### BetterEm
[BetterEm][2] 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][3].
[2]: https://facelessuser.github.io/pymdown-extensions/extensions/betterem/
[3]: https://facelessuser.github.io/pymdown-extensions/usage_notes/
#### Emoji
[Emoji][4] adds the ability to insert a :shit:-load of emojis that we use in
our daily lives. See the [EmojiOne demo][5] for a list of all available
emojis. Happy scrolling :tada:
!!! warning "Legal disclaimer"
Material has no affiliation with [EmojiOne][6] which is released under
[CC BY 4.0][7]. When including EmojiOne images or CSS, please read the
[EmojiOne license][8] to ensure proper usage and attribution.
[4]: https://facelessuser.github.io/pymdown-extensions/extensions/emoji/
[5]: http://emojione.com/demo/
[6]: http://emojione.com
[7]: https://creativecommons.org/licenses/by/4.0/legalcode
[8]: http://emojione.com/licensing/
#### MagicLink
[MagicLink][9] 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:
[9]: https://facelessuser.github.io/pymdown-extensions/extensions/magiclink/
#### SuperFences
[SuperFences][10] provides the ability to nest code blocks under blockquotes,
lists and other block elements, which the [Fenced Code Blocks][11] extension
from the standard Markdown library doesn't parse correctly.
[10]: https://facelessuser.github.io/pymdown-extensions/extensions/superfences/
[11]: https://pythonhosted.org/Markdown/extensions/fenced_code_blocks.html
#### Tasklist
[Tasklist][12] 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
[12]: https://facelessuser.github.io/pymdown-extensions/extensions/tasklist/
#### Tilde
[Tilde][13] 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.
[13]: https://facelessuser.github.io/pymdown-extensions/extensions/tilde/
### More syntactic sugar
#### Caret
[Caret][14] is the sister extension of [Tilde][15] and makes it possible to
highlight ^^inserted text^^. The portion of text that should be marked as added
must be enclosed in two carets `^^...^^`.
[14]: https://facelessuser.github.io/pymdown-extensions/extensions/caret/
[15]: #tilde
#### Mark
[Mark][16] adds the ability to ==highlight text== like it was marked with a
==yellow text marker==. The portion of text that should be highlighted must be
enclosed in two equal signs `==...==`.
[16]: https://facelessuser.github.io/pymdown-extensions/extensions/mark/
#### SmartSymbols
[SmartSymbols][17] 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, ...).
[17]: https://facelessuser.github.io/pymdown-extensions/extensions/smartsymbols/
#### Critic
[Critic][18] implements [Critic Markup][19], 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.
==}
[18]: https://facelessuser.github.io/pymdown-extensions/extensions/critic/
[19]: http://criticmarkup.com/
### Arithmatex <small>MathJax</small>
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script>
[Arithmatex][20] integrates Material with [MathJax][21] which parses
[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][22] for a short introduction and quick
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][23]:
[additional JavaScript][5]:
``` yaml
extra_javascript:
- 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'
- '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
@@ -234,13 +90,13 @@ In your `mkdocs.yml`, include it with:
``` yaml
extra_javascript:
- 'javascripts/extra.js'
- 'https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML'
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML'
```
[20]: https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
[21]: https://www.mathjax.org/
[22]: http://meta.math.stackexchange.com/questions/5020/
[23]: ../customization.md#additional-javascript
[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
@@ -274,11 +130,157 @@ 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][24] adds support for inline code highlighting. It's useful for
[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`.
[24]: https://facelessuser.github.io/pymdown-extensions/extensions/inlinehilite/
[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/
+252 -106
View File
@@ -6,7 +6,9 @@
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 (27MB compressed).
packaged in a very small image (23MB compressed).
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
### Installing MkDocs
@@ -32,18 +34,7 @@ pip install mkdocs && mkdocs --version
Material requires MkDocs >= 0.16.
Furthermore, it is highly recommended to install [Pygments][3] and the
[PyMdown Extensions][4] to get the most out of the Material theme:
```sh
pip install pygments
pip install pymdown-extensions
```
[1]: https://hub.docker.com/r/squidfunk/mkdocs-material/
[2]: http://www.mkdocs.org
[3]: http://pygments.org
[4]: http://facelessuser.github.io/pymdown-extensions/
### Installing Material
@@ -55,35 +46,20 @@ Material can be installed with `pip`:
pip install mkdocs-material
```
!!! 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 to 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`.
#### using choco
If you're on Windows you can use [Chocolatey][5] to install [Material][6]:
If you're on Windows you can use [Chocolatey][3] to install [Material][4]:
``` dos
choco install mkdocs-material
```
This will also install all required dependencies like [Python][7] and
[MkDocs][8].
This will install all required dependencies like [Python][5] and [MkDocs][6].
[5]: https://chocolatey.org
[6]: https://chocolatey.org/packages/mkdocs-material
[7]: https://chocolatey.org/packages/python
[8]: https://chocolatey.org/packages/mkdocs
[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
@@ -94,14 +70,40 @@ repository into a subfolder of your project's root directory:
git clone https://github.com/squidfunk/mkdocs-material.git
```
This is especially useful if you want to extend the theme and override some
parts of the theme. The theme will reside in the folder
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 Material theme just add one of the following lines to
your `mkdocs.yml`. If you installed Material using pip:
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'
@@ -113,30 +115,30 @@ If you cloned Material from GitHub:
theme_dir: 'mkdocs-material/material'
```
MkDocs includes a development server, so you can view your changes as you go.
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 point your browser to [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.
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.
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][10]. This makes it very easy to change the
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 in your `mkdocs.yml`:
following variables:
``` yaml
extra:
@@ -152,9 +154,9 @@ Design color palette. Valid values are: `red`, `pink`, `purple`, `deep purple`,
The last three colors can only be used as a primary color.
If the color is set via this configuration, an additional CSS file that
defines the color palette is 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.
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.
[10]: http://www.materialui.co/colors
[11]: customization.md
@@ -224,10 +226,10 @@ Click on a tile to change the accent color of the theme:
### Changing the font family
Material uses the [Roboto font family][12] by default, specifically the regular
sans-serif type for text and the `monospaced` type for code. Both fonts are
loaded from [Google Fonts][13] and can easily be changed to other fonts, like
for example the [Ubuntu font family][14]:
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:
@@ -236,39 +238,88 @@ extra:
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 `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
```
[12]: https://fonts.google.com/specimen/Roboto
[13]: https://fonts.google.com/
[13]: https://fonts.google.com
[14]: https://fonts.google.com/specimen/Ubuntu
### 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
Material makes it easy to add your 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:
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:
logo: 'images/logo.svg'
```
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:
logo:
icon: 'cloud'
```
[16]: https://material.io/icons/
### Adding social links
If you want to link your social accounts, the Material theme provides an easy
way for doing this in the footer of the documentation using the automatically
included [FontAwesome][15] webfont. The syntax is simple 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:
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:
@@ -278,14 +329,14 @@ extra:
- type: 'twitter'
link: 'https://twitter.com/squidfunk'
- type: 'linkedin'
link: 'https://de.linkedin.com/in/martin-donath-20a95039'
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`.
[15]: http://fontawesome.io/icons/
[17]: http://fontawesome.io/icons/
### Google Analytics integration
@@ -300,69 +351,164 @@ google_analytics:
- 'auto'
```
### Localization <small>L10N</small>
### Disqus integation
In order to localize the labels (e.g. *Previous* and *Next* in the footer),
you can override the file `partials/language.html` to provide your own
translations inside the macro `t`:
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",
"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][16] in the customization guide.
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.
!!! warning "Migrating from Material 0.2.x"
[19]: customization.md#overriding-partials
[20]: customization.md#extending-the-theme
[21]: https://github.com/squidfunk/mkdocs-material/tree/master/examples/language
In 0.2.x localization was done within the `extra` configuration of your
`mkdocs.yml`. With 1.0.0 this is no longer possible as the configuration
will be ignored.
#### Site search
[16]: customization.md#overriding-partials
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][17] for more information on advanced customization.
[this article][24] for more information on advanced customization.
[17]: customization.md
[24]: customization.md
## Extensions
MkDocs supports several [Markdown extensions][18]. The following extensions
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)
- codehilite:
guess_lang: false
- toc:
permalink: true
```
For more information, see the following list of extensions supported by the
Material theme including more information regarding installation and usage:
* [Admonition][19]
* [Codehilite][20]
* [Permalinks][21]
* [Footnotes][22]
* [PyMdown Extensions][23]
* [Admonition][26]
* [Codehilite][27]
* [Footnotes][28]
* [Metadata][29]
* [Permalinks][30]
* [PyMdown Extensions][31]
[18]: http://www.mkdocs.org/user-guide/writing-your-docs/#markdown-extensions
[19]: extensions/admonition.md
[20]: extensions/codehilite.md
[21]: extensions/permalinks.md
[22]: extensions/footnotes.md
[23]: extensions/pymdown.md
[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
@@ -373,14 +519,14 @@ Below is a full example configuration for a `mkdocs.yml`:
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 &copy; 2016 John Doe'
copyright: 'Copyright &copy; 2016 - 2017 John Doe'
# Documentation and theme
theme: 'material'
@@ -396,11 +542,11 @@ extra:
code: 'Roboto Mono'
social:
- type: 'github'
link: 'https://github.com/squidfunk'
link: 'https://github.com/john-doe'
- type: 'twitter'
link: 'https://twitter.com/squidfunk'
link: 'https://twitter.com/john-doe'
- type: 'linkedin'
link: 'https://de.linkedin.com/in/martin-donath-20a95039'
link: 'https://linkedin.com/in/john-doe'
# Google Analytics
google_analytics:
@@ -410,8 +556,8 @@ google_analytics:
# Extensions
markdown_extensions:
- admonition
- codehilite(guess_lang=false)
- footnotes
- meta
- toc(permalink=true)
- codehilite:
guess_lang: false
- toc:
permalink: true
```
Binary file not shown.

Before

Width:  |  Height:  |  Size: 757 KiB

After

Width:  |  Height:  |  Size: 1.3 MiB

+16 -2
View File
@@ -9,7 +9,7 @@ guidelines.
[![Material for MkDocs](images/material.png)](images/material.png)
[1]: http://www.mkdocs.org
[2]: https://www.google.com/design/spec/material-design
[2]: https://material.io/guidelines/material-design/
## Quick start
@@ -19,12 +19,26 @@ Install the latest version of Material with `pip`:
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 instructions see the [getting started guide][3].
[3]: getting-started.md
+1 -1
View File
@@ -2,7 +2,7 @@
**MIT License**
Copyright &copy; 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
+291 -15
View File
@@ -1,4 +1,4 @@
# Release Notes
# Release notes
## Upgrading
@@ -12,23 +12,299 @@ To determine the currently installed version, use the following command:
``` sh
pip show mkdocs-material | grep -E ^Version
# Version 1.0.0
# Version 1.10.4
```
## Changelog
### 1.0.2 <small> _ January 15, 2017</small>
### 1.10.4 <small>_ October 18, 2017</small>
* Fixed horizontal scrollbar in content area
* 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
### 1.0.1 <small> _ January 14, 2017</small>
[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>
### 1.0.0 <small>_ January 13, 2017</small>
* Introduced Webpack for more sophisticated JavaScript bundling
* Introduced ESLint and Stylelint for code style checks
@@ -57,7 +333,7 @@ pip show mkdocs-material | grep -E ^Version
* 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>
### 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
@@ -69,7 +345,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 0.2.3 <small>_ May 16, 2016</small>
* Fixed [#25][25]: Highlight inline fenced blocks
* Fixed [#26][26]: Better highlighting for keystrokes
@@ -79,7 +355,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 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`
@@ -91,7 +367,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 0.2.1 <small>_ March 12, 2016</small>
* Fixed [#10][10]: Invisible header after closing search bar with
<kbd>ESC</kbd> key
@@ -103,7 +379,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 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
@@ -114,7 +390,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 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"`
@@ -125,7 +401,7 @@ pip show mkdocs-material | grep -E ^Version
[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>
### 0.1.2 <small>_ February 16, 2016</small>
* Fixed styles for deep navigational hierarchies
* Fixed webfont delivery problem when hosted in subdirectories
@@ -135,7 +411,7 @@ pip show mkdocs-material | grep -E ^Version
* 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>
### 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
@@ -146,6 +422,6 @@ pip show mkdocs-material | grep -E ^Version
[1]: https://github.com/squidfunk/mkdocs-material/issues/1
[2]: https://travis-ci.org
### 0.1.0 <small> _ February 9, 2016</small>
### 0.1.0 <small>_ February 9, 2016</small>
* Initial release
+18
View File
@@ -137,6 +137,24 @@ tincidunt. Aenean ullamcorper sit amet nulla at interdum.
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
+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
+27
View File
@@ -0,0 +1,27 @@
# 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",
"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,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.
-->
<!-- Translations -->
{% macro t(key) %}{{ {
"language": "de",
"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
}
}
+44
View File
@@ -0,0 +1,44 @@
/*
* 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 "clipboard" {
/* Class: Clipboard action */
declare class ClipboardAction {
trigger: HTMLElement,
clearSelection(): void
}
/* Class: Clipboard */
declare class Clipboard {
static isSupported(): boolean,
constructor(selector: string): void,
on(name: string, cb: (action: ClipboardAction) => void): void
}
/* Exports */
declare export default typeof Clipboard
}
+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
}
+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 module "fastclick" {
/* Type: FastClick */
declare type FastClick = {
attach(name: HTMLElement): void
}
/* Exports */
declare export default FastClick
}
+43
View File
@@ -0,0 +1,43 @@
/*
* 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 "js-cookie" {
/* Type: Options for setting cookie values */
declare type Options = {
path?: string,
expires?: number | string
}
/* Type: Cookie */
declare type Cookie = {
getJSON(json: string): Object,
set(key: string, value: Array<string>, options?: Options): string
}
/* Exports */
declare export default Cookie
}
+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
+34
View File
@@ -0,0 +1,34 @@
/*
* 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
* ------------------------------------------------------------------------- */
/*
* 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.
*/
declare module "expose-loader?lunr!lunr" {
declare function exports(name: () => void): Object
}
+32
View File
@@ -0,0 +1,32 @@
/*
* 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 Modernizr {
static addTest(name: string, test: () => boolean): void
}
/* Exports */
declare export default Modernizr
+10 -4
View File
@@ -21,17 +21,19 @@
*/
/* ----------------------------------------------------------------------------
* Definition
* 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 {...(string|number|Array)} children - Child nodes
* @param {?Object} properties - Properties
* @param {Array<string | number | { __html: string } | Array<HTMLElement>>}
* children - Child nodes
* @return {HTMLElement} Native DOM node
*/
createElement(tag, properties, ...children) {
@@ -56,8 +58,12 @@ export default /* JSX */ {
} else if (Array.isArray(node)) {
iterateChildNodes(node)
/* Append raw HTML */
} else if (typeof node.__html !== "undefined") {
el.innerHTML += node.__html
/* Append regular nodes */
} else {
} else if (node instanceof Node) {
el.appendChild(node)
}
})
-5
View File
@@ -1,5 +0,0 @@
{
"rules": {
"no-invalid-this": 0
}
}
+1 -1
View File
@@ -28,7 +28,7 @@ import changed from "gulp-changed"
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/images/**/*.ico`)
return gulp.src(`${config.assets.src}/images/**/favicon.*`)
.pipe(changed(`${config.assets.build}/images`))
.pipe(gulp.dest(`${config.assets.build}/images`))
}
@@ -20,53 +20,44 @@
* IN THE SOFTWARE.
*/
import selenium from "selenium-standalone"
import { transform } from "babel-core"
import jsdoc2flow from "flow-jsdoc"
import through from "through2"
/* ----------------------------------------------------------------------------
* Locals
* Task: annotate JavaScript
* ------------------------------------------------------------------------- */
/* Selenium server */
let server = null
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* ----------------------------------------------------------------------------
* Definition
* ------------------------------------------------------------------------- */
/* Linting */
.pipe(
through.obj(function(file, enc, done) {
if (file.isNull() || file.isStream())
return done()
export const start = done => {
selenium.start({}, (err, proc) => {
if (err) {
/* Perform Babel transformation to resolve JSX calls */
const transformed = transform(file.contents.toString(), {
plugins: [
["transform-react-jsx", {
"pragma": "Jsx.createElement"
}]
]
})
/* Install selenium, if not present */
if (/^Missing(.*)chromedriver$/.test(err.message)) {
selenium.install(done)
/* Annotate contents */
file.contents = new Buffer(jsdoc2flow(
`/* @flow */\n\n${transformed.code}`
).toString())
/* Start selenium again */
selenium.start({}, (err_, proc_) => {
server = proc_
})
/* Push file to next stage */
this.push(file)
done()
}))
/* Otherwise, throw error */
} else {
throw err
}
}
/* Remember process handle */
server = server || proc
done()
})
/* Print errors */
.pipe(gulp.dest("tmp/assets/javascripts"))
}
}
export const stop = () => {
if (server)
server.kill()
}
/* ----------------------------------------------------------------------------
* Signal handler
* ------------------------------------------------------------------------- */
/* Register signal handler for all relevant events */
for (const signal of ["SIGTERM", "SIGINT", "exit"])
process.on(signal, stop)
@@ -50,12 +50,13 @@ export default (gulp, config, args) => {
],
output: {
filename: "application.js",
library: "Application"
library: "app",
libraryTarget: "window"
},
module: {
/* Transpile ES6 to ES5 with Babel */
loaders: [
rules: [
{
loader: "babel-loader",
test: /\.jsx?$/
@@ -65,11 +66,11 @@ export default (gulp, config, args) => {
plugins: [
/* Don't emit assets that include errors */
new webpack.NoErrorsPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
/* Provide JSX helper */
new webpack.ProvidePlugin({
JSX: path.join(process.cwd(), `${config.lib}/providers/jsx.js`)
Jsx: path.join(process.cwd(), `${config.lib}/providers/jsx.js`)
})
].concat(
@@ -77,19 +78,30 @@ export default (gulp, config, args) => {
args.optimize ? [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
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: {
modulesDirectories: [
modules: [
"src/assets/javascripts",
"node_modules"
],
extensions: [
"",
".js",
".jsx"
]
@@ -101,8 +113,8 @@ export default (gulp, config, args) => {
},
/* Sourcemap support */
devtool: args.sourcemaps ? "source-map" : ""
}))
devtool: args.sourcemaps ? "inline-source-map" : ""
}, webpack))
/* Revisioning */
.pipe(gulpif(args.revision, rev()))
@@ -20,26 +20,17 @@
* IN THE SOFTWARE.
*/
import path from "path"
import { Server, stopper } from "karma"
import gulpif from "gulp-if"
import uglify from "gulp-uglify"
/* ----------------------------------------------------------------------------
* Task: start karma test runner
* Task: build search language support files
* ------------------------------------------------------------------------- */
export default () => {
return done => {
new Server({
configFile: path.join(process.cwd(), "tests/karma.conf.js")
}, done).start()
/* Register signal handler for all relevant events */
for (const signal of ["SIGTERM", "SIGINT", "exit"])
process.on(signal, () => {
return stopper.stop({
port: 9876,
logLevel: "OFF"
})
})
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`))
}
}
+2 -1
View File
@@ -23,6 +23,7 @@
import path from "path"
import through from "through2"
import util from "gulp-util"
import { CLIEngine } from "eslint"
/* ----------------------------------------------------------------------------
@@ -38,7 +39,7 @@ const format = eslint.getFormatter()
export default (gulp, config) => {
return () => {
return gulp.src(`${config.assets.src}/javascripts/**/*.js`)
return gulp.src(`${config.assets.src}/javascripts/**/*.{js,jsx}`)
/* Linting */
.pipe(
+7 -2
View File
@@ -25,6 +25,7 @@ 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"
@@ -54,7 +55,11 @@ export default (gulp, config, args) => {
postcss([
autoprefixer(),
mqpacker
]))
].concat(!args.optimize ? [
pseudoclasses({
"restrictTo": ["hover", "focus"]
})
] : [])))
/* Minify sources */
.pipe(gulpif(args.optimize, mincss()))
@@ -63,7 +68,7 @@ export default (gulp, config, args) => {
.pipe(gulpif(args.revision, rev()))
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
.pipe(gulpif(args.sourcemaps, sourcemaps.write(".")))
.pipe(gulpif(args.sourcemaps, sourcemaps.write()))
.pipe(gulp.dest(`${config.assets.build}/stylesheets`))
.pipe(gulpif(args.revision,
rev.manifest("manifest.json", {
+1 -1
View File
@@ -39,7 +39,7 @@ export default () => {
server.kill()
/* Spawn MkDocs server */
server = child.spawn("mkdocs", ["serve", "-a", "0.0.0.0:8000"], {
server = child.spawn("mkdocs", ["serve", "--dev-addr", "0.0.0.0:8000"], {
stdio: "inherit"
})
}
+2 -2
View File
@@ -48,8 +48,8 @@ export default (gulp, config, args) => {
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}))
.pipe(replace("$theme-name$", metadata.name))
.pipe(replace("$theme-version$", metadata.version))
.pipe(replace("$md-name$", metadata.name))
.pipe(replace("$md-version$", metadata.version))
.pipe(compact())
.pipe(gulpif(args.revision,
version({ manifest: gulp.src("manifest.json") })))
+1 -1
View File
@@ -29,7 +29,7 @@ import vinyl from "vinyl-paths"
export default (gulp, config) => {
return () => {
return gulp.src(`${config.views.build}/**/*.html`)
return gulp.src(`${config.views.build}/**/*.{html,py}`)
.pipe(vinyl(clean))
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
{% extends "main.html" %}
{% extends "base.html" %}
{% block content %}
<h1>404 - Not found</h1>
{% endblock %}
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

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
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
!function(r,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():t()(r.lunr)}(this,function(){return function(r){r.stemmerSupport={Among:function(r,t,i,s){if(this.toCharArray=function(r){for(var t=r.length,i=new Array(t),s=0;s<t;s++)i[s]=r.charCodeAt(s);return i},!r&&""!=r||!t&&0!=t||!i)throw"Bad Among initialisation: s:"+r+", substring_i: "+t+", result: "+i;this.s_size=r.length,this.s=this.toCharArray(r),this.substring_i=t,this.result=i,this.method=s},SnowballProgram:function(){var r;return{bra:0,ket:0,limit:0,cursor:0,limit_backward:0,setCurrent:function(t){r=t,this.cursor=0,this.limit=t.length,this.limit_backward=0,this.bra=this.cursor,this.ket=this.limit},getCurrent:function(){var t=r;return r=null,t},in_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},in_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e<=s&&e>=i&&(e-=i,t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},out_grouping:function(t,i,s){if(this.cursor<this.limit){var e=r.charCodeAt(this.cursor);if(e>s||e<i)return this.cursor++,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor++,!0}return!1},out_grouping_b:function(t,i,s){if(this.cursor>this.limit_backward){var e=r.charCodeAt(this.cursor-1);if(e>s||e<i)return this.cursor--,!0;if(e-=i,!(t[e>>3]&1<<(7&e)))return this.cursor--,!0}return!1},eq_s:function(t,i){if(this.limit-this.cursor<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor+s)!=i.charCodeAt(s))return!1;return this.cursor+=t,!0},eq_s_b:function(t,i){if(this.cursor-this.limit_backward<t)return!1;for(var s=0;s<t;s++)if(r.charCodeAt(this.cursor-t+s)!=i.charCodeAt(s))return!1;return this.cursor-=t,!0},find_among:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=t[a],m=l;m<_.s_size;m++){if(n+l==u){f=-1;break}if(f=r.charCodeAt(n+l)-_.s[m])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){if(o>=(_=t[s]).s_size){if(this.cursor=n+_.s_size,!_.method)return _.result;var b=_.method();if(this.cursor=n+_.s_size,b)return _.result}if((s=_.substring_i)<0)return 0}},find_among_b:function(t,i){for(var s=0,e=i,n=this.cursor,u=this.limit_backward,o=0,h=0,c=!1;;){for(var a=s+(e-s>>1),f=0,l=o<h?o:h,_=(m=t[a]).s_size-1-l;_>=0;_--){if(n-l==u){f=-1;break}if(f=r.charCodeAt(n-1-l)-m.s[_])break;l++}if(f<0?(e=a,h=l):(s=a,o=l),e-s<=1){if(s>0||e==s||c)break;c=!0}}for(;;){var m=t[s];if(o>=m.s_size){if(this.cursor=n-m.s_size,!m.method)return m.result;var b=m.method();if(this.cursor=n-m.s_size,b)return m.result}if((s=m.substring_i)<0)return 0}},replace_s:function(t,i,s){var e=s.length-(i-t),n=r.substring(0,t),u=r.substring(i);return r=n+s+u,this.limit+=e,this.cursor>=i?this.cursor+=e:this.cursor>t&&(this.cursor=t),e},slice_check:function(){if(this.bra<0||this.bra>this.ket||this.ket>this.limit||this.limit>r.length)throw"faulty slice operation"},slice_from:function(r){this.slice_check(),this.replace_s(this.bra,this.ket,r)},slice_del:function(){this.slice_from("")},insert:function(r,t,i){var s=this.replace_s(r,t,i);r<=this.bra&&(this.bra+=s),r<=this.ket&&(this.ket+=s)},slice_to:function(){return this.slice_check(),r.substring(this.bra,this.ket)},eq_v_b:function(r){return this.eq_s_b(r.length,r)}}}},r.trimmerSupport={generateTrimmer:function(r){var t=new RegExp("^[^"+r+"]+"),i=new RegExp("[^"+r+"]+$");return function(r){return"function"==typeof r.update?r.update(function(r){return r.replace(t,"").replace(i,"")}):r.replace(t,"").replace(i,"")}}}}});
@@ -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.sv=function(){this.pipeline.reset(),this.pipeline.add(e.sv.trimmer,e.sv.stopWordFilter,e.sv.stemmer),this.searchPipeline&&(this.searchPipeline.reset(),this.searchPipeline.add(e.sv.stemmer))},e.sv.wordCharacters="A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꞭꞰ-ꞷꟷ-ꟿꬰ-ꭚꭜ-ꭤff-stA-Za-z",e.sv.trimmer=e.trimmerSupport.generateTrimmer(e.sv.wordCharacters),e.Pipeline.registerFunction(e.sv.trimmer,"trimmer-sv"),e.sv.stemmer=function(){var r=e.stemmerSupport.Among,n=e.stemmerSupport.SnowballProgram,t=new function(){function e(){var e,r=w.cursor+3;if(o=w.limit,0<=r||r<=w.limit){for(a=r;;){if(e=w.cursor,w.in_grouping(l,97,246)){w.cursor=e;break}if(w.cursor=e,w.cursor>=w.limit)return;w.cursor++}for(;!w.out_grouping(l,97,246);){if(w.cursor>=w.limit)return;w.cursor++}(o=w.cursor)<a&&(o=a)}}function t(){var e,r=w.limit_backward;if(w.cursor>=o&&(w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(u,37),w.limit_backward=r,e))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.in_grouping_b(d,98,121)&&w.slice_del()}}function i(){var e=w.limit_backward;w.cursor>=o&&(w.limit_backward=o,w.cursor=w.limit,w.find_among_b(c,7)&&(w.cursor=w.limit,w.ket=w.cursor,w.cursor>w.limit_backward&&(w.bra=--w.cursor,w.slice_del())),w.limit_backward=e)}function s(){var e,r;if(w.cursor>=o){if(r=w.limit_backward,w.limit_backward=o,w.cursor=w.limit,w.ket=w.cursor,e=w.find_among_b(m,5))switch(w.bra=w.cursor,e){case 1:w.slice_del();break;case 2:w.slice_from("lös");break;case 3:w.slice_from("full")}w.limit_backward=r}}var a,o,u=[new r("a",-1,1),new r("arna",0,1),new r("erna",0,1),new r("heterna",2,1),new r("orna",0,1),new r("ad",-1,1),new r("e",-1,1),new r("ade",6,1),new r("ande",6,1),new r("arne",6,1),new r("are",6,1),new r("aste",6,1),new r("en",-1,1),new r("anden",12,1),new r("aren",12,1),new r("heten",12,1),new r("ern",-1,1),new r("ar",-1,1),new r("er",-1,1),new r("heter",18,1),new r("or",-1,1),new r("s",-1,2),new r("as",21,1),new r("arnas",22,1),new r("ernas",22,1),new r("ornas",22,1),new r("es",21,1),new r("ades",26,1),new r("andes",26,1),new r("ens",21,1),new r("arens",29,1),new r("hetens",29,1),new r("erns",21,1),new r("at",-1,1),new r("andet",-1,1),new r("het",-1,1),new r("ast",-1,1)],c=[new r("dd",-1,-1),new r("gd",-1,-1),new r("nn",-1,-1),new r("dt",-1,-1),new r("gt",-1,-1),new r("kt",-1,-1),new r("tt",-1,-1)],m=[new r("ig",-1,1),new r("lig",0,1),new r("els",-1,1),new r("fullt",-1,3),new r("löst",-1,2)],l=[17,65,16,1,0,0,0,0,0,0,0,0,0,0,0,0,24,0,32],d=[119,127,149],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,t(),w.cursor=w.limit,i(),w.cursor=w.limit,s(),!0}};return function(e){return"function"==typeof e.update?e.update(function(e){return t.setCurrent(e),t.stem(),t.getCurrent()}):(t.setCurrent(e),t.stem(),t.getCurrent())}}(),e.Pipeline.registerFunction(e.sv.stemmer,"stemmer-sv"),e.sv.stopWordFilter=e.generateStopWordFilter("alla allt att av blev bli blir blivit de dem den denna deras dess dessa det detta dig din dina ditt du där då efter ej eller en er era ert ett från för ha hade han hans har henne hennes hon honom hur här i icke ingen inom inte jag ju kan kunde man med mellan men mig min mina mitt mot mycket ni nu när någon något några och om oss på samma sedan sig sin sina sitta själv skulle som så sådan sådana sådant till under upp ut utan vad var vara varför varit varje vars vart vem vi vid vilka vilkas vilken vilket vår våra vårt än är åt över".split(" ")),e.Pipeline.registerFunction(e.sv.stopWordFilter,"stopWordFilter-sv")}});
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
File diff suppressed because one or more lines are too long
+71 -26
View File
@@ -1,58 +1,63 @@
{% import "partials/language.html" as lang %}
<!DOCTYPE html>
<html class="no-js">
<html lang="{{ lang.t('language') }}" class="no-js">
<head>
{% block site_meta %}
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
{% if config.site_description %}
<meta http-equiv="x-ua-compatible" content="ie=edge">
{% if page and page.meta.description %}
<meta name="description" content="{{ page.meta.description | first }}">
{% elif config.site_description %}
<meta name="description" content="{{ config.site_description }}">
{% endif %}
{% if page.canonical_url %}
<link rel="canonical" href="{{ page.canonical_url }}">
{% endif %}
{% if config.site_author %}
{% if page and page.meta.author %}
<meta name="author" content="{{ page.meta.author | first }}">
{% elif config.site_author %}
<meta name="author" content="{{ config.site_author }}">
{% endif %}
{% if config.site_favicon %}
<link rel="shortcut icon" href="{{ base_url }}/{{ config.site_favicon }}">
{% else %}
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.ico">
<link rel="shortcut icon" href="{{ base_url }}/assets/images/favicon.png">
{% endif %}
<meta name="generator" content="mkdocs+mkdocs-material#1.0.1">
<meta name="generator" content="mkdocs-{{ mkdocs_version }}, mkdocs-material-1.10.4">
{% endblock %}
{% block htmltitle %}
{% if page.title %}
{% if page and page.meta.title %}
<title>{{ page.meta.title | first }}</title>
{% elif page and page.title and not page.is_homepage %}
<title>{{ page.title }} - {{ config.site_name }}</title>
{% elif config.site_description %}
<title>{{ config.site_name }} - {{ config.site_description }}</title>
{% else %}
<title>{{ config.site_name }}</title>
{% endif %}
{% endblock %}
{% block libs %}
<script src="{{ base_url }}/assets/javascripts/modernizr-facb31f4a3.js"></script>
<script src="{{ base_url }}/assets/javascripts/modernizr-e826f8942a.js"></script>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-0741cbeb94.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-23f75ab9c7.palette.css">
{% endif %}
{% endblock %}
{% block fonts %}
{% if config.extra.font != "none" %}
{% if config.extra.font != false and config.extra.font != "none" %}
{% set text = config.extra.get("font", {}).text | default("Roboto") %}
{% set code = config.extra.get("font", {}).code
| default("Roboto Mono") %}
{% set font = text + ':300,400,400i,700|' + code | replace(' ', '+') %}
{% set font = text + ":300,400,400i,700|" + code | replace(" ", "+") %}
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family={{ font }}">
<style>body,input{font-family:"{{ text }}","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"{{ code }}","Courier New",Courier,monospace}</style>
{% endif %}
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-1b8b9fdf68.css">
{% if config.extra.palette %}
<link rel="stylesheet" href="{{ base_url }}/assets/stylesheets/application-02ce7adcc2.palette.css">
{% endif %}
{% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}">
{% endfor %}
{% endblock %}
{% for path in extra_css %}
<link rel="stylesheet" href="{{ path }}">
{% endfor %}
{% block extrahead %}{% endblock %}
</head>
{% set palette = config.extra.get("palette", {}) %}
@@ -82,6 +87,13 @@
{% include "partials/header.html" %}
{% endblock %}
<div class="md-container">
{% set feature = config.extra.get("feature", {}) %}
{% if feature.hero %}
{% include "partials/hero.html" %}
{% endif %}
{% if feature.tabs %}
{% include "partials/tabs.html" %}
{% endif %}
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
{% block site_nav %}
@@ -106,14 +118,31 @@
{% endblock %}
<div class="md-content">
<article class="md-content__inner md-typeset">
{% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__edit">edit</a>
{% endif %}
{% block content %}
{% if not "\x3ch1 id=" in page.content %}
{% if config.edit_uri %}
<a href="{{ page.edit_url }}" title="{{ lang.t('edit.link.title') }}" class="md-icon md-content__icon">&#xE3C9;</a>
{% endif %}
{% if not "\x3ch1" in page.content %}
<h1>{{ page.title | default(config.site_name, true)}}</h1>
{% endif %}
{{ page.content }}
{% block source %}
{% if page.meta.source %}
<h2 id="__source">{{ lang.t("meta.source") }}</h2>
{% set path = (page.meta.path | default([""]) | first) %}
{% for file in page.meta.source %}
<a href="{{ [config.repo_url, path, file] | join('/') }}" title="{{ file }}" class="md-source-file">
{{ file }}
</a>
{% endfor %}
{% endif %}
{% endblock %}
{% endblock %}
{% block disqus %}
{% if config.extra.disqus and not page.is_homepage %}
<h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
{% include "partials/disqus.html" %}
{% endif %}
{% endblock %}
</article>
</div>
@@ -124,8 +153,24 @@
{% endblock %}
</div>
{% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application-16f434a21a.js"></script>
<script>var config={url:{base:"{{ base_url }}"}},app=new Application(config);app.initialize()</script>
<script src="{{ base_url }}/assets/javascripts/application-683e1b679e.js"></script>
{% set languages = lang.t("search.languages").split(",") %}
{% if languages | length and languages[0] != "" %}
{% set path = base_url + "/assets/javascripts/lunr" %}
<script src="{{ path }}/lunr.stemmer.support.js"></script>
{% for language in languages | map("trim") %}
{% if language != "en" %}
{% if language == "jp" %}
<script src="{{ path }}/tinyseg.js"></script>
{% endif %}
<script src="{{ path }}/lunr.{{ language }}.js"></script>
{% endif %}
{% endfor %}
{% if languages | length > 1 %}
<script src="{{ path }}/lunr.multi.js"></script>
{% endif %}
{% endif %}
<script>app.initialize({url:{base:"{{ base_url }}"}})</script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>
{% endfor %}
+14
View File
@@ -0,0 +1,14 @@
<div id="disqus_thread"></div>
<script>
var disqus_config = function () {
this.page.url = "{{ page.canonical_url }}";
this.page.identifier =
"{{ page.canonical_url | replace(config.site_url, "") }}";
};
(function() {
var d = document, s = d.createElement("script");
s.src = "//{{ config.extra.disqus }}.disqus.com/embed.js";
s.setAttribute("data-timestamp", +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
+2 -2
View File
@@ -11,7 +11,7 @@
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t('footer.previous') }}
{{ lang.t("footer.previous") }}
</span>
{{ page.previous_page.title }}
</span>
@@ -23,7 +23,7 @@
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span class="md-footer-nav__direction">
{{ lang.t('footer.next') }}
{{ lang.t("footer.next") }}
</span>
{{ page.next_page.title }}
</span>
+14 -8
View File
@@ -1,10 +1,16 @@
<header class="md-header">
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="{{ nav.homepage.url }}" title="{{ config.site_name }}" class="{% if config.extra.logo %} md-logo {% else %} md-icon md-icon--home {% endif %} md-header-nav__button">
<a href="{{ config.site_url | default(nav.homepage.url, true) }}" title="{{ config.site_name }}" class="md-header-nav__button md-logo">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
{% if config.extra.logo.icon %}
<i class="md-icon">{{ config.extra.logo.icon }}</i>
{% else %}
<img src="{{ base_url }}/{{ config.extra.logo }}" width="24" height="24">
{% endif %}
{% else %}
<i class="md-icon md-icon--home"></i>
{% endif %}
</a>
</div>
@@ -31,13 +37,13 @@
{% include "partials/search.html" %}
{% endblock %}
</div>
<div class="md-flex__cell md-flex__cell--shrink">
{% if config.repo_url %}
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
{% if config.repo_url %}
{% include "partials/source.html" %}
{% endif %}
{% include "partials/source.html" %}
</div>
</div>
</div>
{% endif %}
</div>
</nav>
</header>
+9
View File
@@ -1,8 +1,17 @@
{% macro t(key) %}{{ {
"language": "en",
"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 %}
+16 -17
View File
@@ -1,5 +1,9 @@
{% set class = "md-nav__item" %}
{% if nav_item.active %}
{% set class = "md-nav__item md-nav__item--active" %}
{% endif %}
{% if nav_item.children %}
<li class="md-nav__item md-nav__item--nested">
<li class="{{ class }} md-nav__item--nested">
{% if nav_item.active %}
<input class="md-toggle md-nav__toggle" data-md-toggle="{{ path }}" type="checkbox" id="{{ path }}" checked>
{% else %}
@@ -8,27 +12,28 @@
<label class="md-nav__link" for="{{ path }}">
{{ nav_item.title }}
</label>
<nav class="md-nav" data-md-component="collapsible">
<nav class="md-nav" data-md-component="collapsible" data-md-level="{{ level }}">
<label class="md-nav__title" for="{{ path }}">
{{ nav_item.title}}
{{ nav_item.title }}
</label>
<ul class="md-nav__list" data-md-scrollfix>
{% set base = path %}
{% for nav_item in nav_item.children %}
{% set path = base + "-" + loop.index | string %}
{% set level = level + 1 %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
</nav>
</li>
{% elif nav_item == page %}
<li class="md-nav__item">
<li class="{{ class }}">
{% set toc_ = page.toc %}
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
{% if "\x3ch1 id=" in page.content %}
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ and (toc_ | first) %}
{% if toc_ | first is defined %}
<label class="md-nav__link md-nav__link--active" for="toc">
{{ nav_item.title }}
</label>
@@ -36,20 +41,14 @@
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% if page.toc %}
{% if toc_ | first is defined %}
{% include "partials/toc.html" %}
{% endif %}
</li>
{% else %}
<li class="md-nav__item">
{% if nav_item.active %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link md-nav__link--active">
{{ nav_item.title }}
</a>
{% else %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link">
{{ nav_item.title }}
</a>
{% endif %}
<li class="{{ class }}">
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-nav__link">
{{ nav_item.title }}
</a>
</li>
{% endif %}
+11 -4
View File
@@ -1,10 +1,16 @@
<nav class="md-nav md-nav--primary">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="drawer">
<i class="{% if config.extra.logo %} md-logo {% else %} md-icon md-icon--home {% endif %} md-nav__button">
<div class="md-nav__button md-logo">
{% if config.extra.logo %}
<img src="{{ base_url }}/{{ config.extra.logo }}">
{% if config.extra.logo.icon %}
<i class="md-icon">{{ config.extra.logo.icon }}</i>
{% else %}
<img src="{{ base_url }}/{{ config.extra.logo }}">
{% endif %}
{% else %}
<i class="md-icon md-icon--home"></i>
{% endif %}
</i>
</div>
{{ config.site_name }}
</label>
{% if config.repo_url %}
@@ -15,6 +21,7 @@
<ul class="md-nav__list" data-md-scrollfix>
{% for nav_item in nav %}
{% set path = "nav-" + loop.index | string %}
{% set level = 1 %}
{% include "partials/nav-item.html" %}
{% endfor %}
</ul>
+10 -4
View File
@@ -1,14 +1,20 @@
{% import "partials/language.html" as lang %}
<div class="md-search" data-md-component="search">
<div class="md-search__overlay"></div>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="search"></label>
<div class="md-search__inner">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" placeholder="{{ lang.t('search.placeholder') }}" accesskey="s" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false">
<input type="text" class="md-search__input" name="query" required placeholder="{{ lang.t('search.placeholder') }}" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query">
<label class="md-icon md-search__icon" for="search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset">&#xE5CD;</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result"></div>
<div class="md-search-result" data-md-component="result" data-md-lang-search="{{ lang.t('search.languages') }}" data-md-lang-tokenizer="{{ lang.t('search.tokenizer') }}">
<div class="md-search-result__meta" data-md-lang-result-none="{{ lang.t('search.result.none') }}" data-md-lang-result-one="{{ lang.t('search.result.one') }}" data-md-lang-result-other="{{ lang.t('search.result.other') }}">
{{ lang.t("search.result.placeholder") }}
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
+31
View File
@@ -0,0 +1,31 @@
{% if nav_item.is_homepage %}
<li class="md-tabs__item">
{% if not page.ancestors | length and nav | selectattr("url", page.url) %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-tabs__link md-tabs__link--active">
{{ nav_item.title }}
</a>
{% else %}
<a href="{{ nav_item.url }}" title="{{ nav_item.title }}" class="md-tabs__link">
{{ nav_item.title }}
</a>
{% endif %}
</li>
{% elif nav_item.children and nav_item.children | length > 0 %}
{% set title = title | default(nav_item.title) %}
{% if (nav_item.children | first).children | length > 0 %}
{% set nav_item = nav_item.children | first %}
{% include "partials/tabs-item.html" %}
{% else %}
<li class="md-tabs__item">
{% if nav_item.active %}
<a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link md-tabs__link--active">
{{ title }}
</a>
{% else %}
<a href="{{ (nav_item.children | first).url }}" title="{{ title }}" class="md-tabs__link">
{{ title }}
</a>
{% endif %}
</li>
{% endif %}
{% endif %}
+13
View File
@@ -0,0 +1,13 @@
{% set class = "md-tabs" %}
{% if page.ancestors | length > 0 %}
{% set class = "md-tabs md-tabs--active" %}
{% endif %}
<nav class="{{ class }}" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
{% for nav_item in nav %}
{% include "partials/tabs-item.html" %}
{% endfor %}
</ul>
</div>
</nav>
+17 -3
View File
@@ -1,15 +1,29 @@
{% import "partials/language.html" as lang %}
<nav class="md-nav md-nav--secondary">
{% set toc_ = page.toc %}
{% if "\x3ch1 id=" in page.content %}
{% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %}
{% endif %}
{% if toc_ and (toc_ | first) %}
<label class="md-nav__title" for="toc">{{ lang.t('toc.title') }}</label>
{% if toc_ | first is defined %}
<label class="md-nav__title" for="toc">{{ lang.t("toc.title") }}</label>
<ul class="md-nav__list" data-md-scrollfix>
{% for toc_item in toc_ %}
{% include "partials/toc-item.html" %}
{% endfor %}
{% if page.meta.source and page.meta.source | length > 0 %}
<li class="md-nav__item">
<a href="#__source" title="{{ lang.t('meta.source') }}" class="md-nav__link md-nav__link--active">
{{ lang.t("meta.source") }}
</a>
</li>
{% endif %}
{% if config.extra.disqus and not page.is_homepage %}
<li class="md-nav__item">
<a href="#__comments" title="{{ lang.t('meta.comments') }}" class="md-nav__link md-nav__link--active">
{{ lang.t("meta.comments") }}
</a>
</li>
{% endif %}
</ul>
{% endif %}
</nav>
+14 -2
View File
@@ -31,26 +31,31 @@ repo_url: https://github.com/squidfunk/mkdocs-material
# Copyright
copyright: 'Copyright &copy; 2016 - 2017 Martin Donath'
# Documentation and theme
# Theme directory
theme_dir: material
# Options
extra:
feature:
tabs: false
palette:
primary: indigo
accent: indigo
social:
- type: globe
link: http://struct.cc
- type: github-alt
link: https://github.com/squidfunk
- type: twitter
link: https://twitter.com/squidfunk
- type: linkedin
link: https://de.linkedin.com/in/martin-donath-20a95039
link: https://linkedin.com/in/squidfunk
# Extensions
markdown_extensions:
- markdown.extensions.admonition
- markdown.extensions.codehilite(guess_lang=false)
- markdown.extensions.def_list
- markdown.extensions.footnotes
- markdown.extensions.meta
- markdown.extensions.toc(permalink=true)
@@ -58,6 +63,7 @@ markdown_extensions:
- pymdownx.betterem(smart_enable=all)
- pymdownx.caret
- pymdownx.critic
- pymdownx.details
- pymdownx.emoji:
emoji_generator: !!python/name:pymdownx.emoji.to_svg
- pymdownx.inlinehilite
@@ -76,6 +82,7 @@ pages:
- Admonition: extensions/admonition.md
- CodeHilite: extensions/codehilite.md
- Footnotes: extensions/footnotes.md
- Metadata: extensions/metadata.md
- Permalinks: extensions/permalinks.md
- PyMdown: extensions/pymdown.md
- Specimen: specimen.md
@@ -83,3 +90,8 @@ pages:
- Release notes: release-notes.md
- Contributing: contributing.md
- License: license.md
# Google Analytics
google_analytics:
- !!python/object/apply:os.getenv ["GOOGLE_ANALYTICS_KEY"]
- auto

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