diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index ce5f0c387e..c8e6ac1211 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -90,6 +90,3 @@ To build your own minified version of Marked: npm run build ``` -## Publishing - -Creating GitHub releases and publishing to NPM is limited to conributors and owners. If you would like more information, please see our [publishing documentation](#/PUBLISHING.md). diff --git a/LICENSE.md b/docs/LICENSE.md similarity index 100% rename from LICENSE.md rename to docs/LICENSE.md diff --git a/docs/README.md b/docs/README.md index f41160ce9f..84f272ea0f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,17 +1,3 @@ - - -

Marked

- Marked is 1. built for speed.* @@ -97,18 +83,3 @@ The only completely secure system is the one that doesn't exist in the first pla Therefore, please disclose potential security issues by email to the project [committers](#/AUTHORS.md) as well as the [listed owners within NPM](https://docs.npmjs.com/cli/owner). We will provide an initial assessment of security reports within 48 hours and should apply patches within 2 weeks (also, feel free to contribute a fix for the issue). -

Contributing

- -The marked community enjoys a spirit of collaboration and contribution from all comers. Whether you're just getting started with Markdown, JavaScript, and Marked or you're a veteran with it all figured out, we're here to help each other improve as professionals while helping Marked improve technically. Please see our [contributing documentation](#/CONTRIBUTING.md) for more details. - -For our Contribution License Agreement, see our [license](https://github.com/markedjs/marked/blob/master/LICENSE.md). - -

Authors

- -For list of credited authors and contributors, please see our [authors page](#/AUTHORS.md). - -

License

- -Copyright (c) 2011-2018, Christopher Jeffrey. (MIT License) - -See [license](https://github.com/markedjs/marked/blob/master/LICENSE.md) for more details. diff --git a/docs/USING_PRO.md b/docs/USING_PRO.md index e3ab6935f4..0ae4a98d3b 100644 --- a/docs/USING_PRO.md +++ b/docs/USING_PRO.md @@ -2,12 +2,6 @@ To champion the single-reponsibility and open/closed prinicples, we have tried to make it relatively painless to extend marked. If you are looking to add custom functionality, this is the place to start. - -

The renderer

The renderer is... diff --git a/docs/index.html b/docs/index.html index a985d16f5e..14c1b15341 100644 --- a/docs/index.html +++ b/docs/index.html @@ -9,18 +9,67 @@ font-size: 16px; line-height: 1.5; word-wrap: break-word; + background: #F9F9F9; } #container { - position: relative; - max-width: 800px; + max-width: 900px; margin: auto; - padding: 10px; + } + + #content { + padding: 5px 10px; + border: 1px solid #ddd; + border-radius: 3px; + background: white; + } + + #content h1:first-child { + margin-top: 0px; + } + + nav { border: 1px solid #ddd; border-radius: 3px; + background: white; + margin-right: 10px; } - header { display: flex; } + nav > ul { + position: sticky; + top: 5px; + margin: 10px 0px; + padding: 0; + list-style-type: none; + font-size: 14px; + } + + nav > ul > li { + min-width: 125px; + padding: 0px 15px; + } + + nav > ul > li > ul { + padding-left: 25px; + } + + nav > ul > li > ul > li { + font-size: 0.8em; + } + + nav .selected { + color: #111; + font-weight: bold; + } + + nav .selected:hover { + text-decoration: none; + } + + header { + display: flex; + height: 50px; + } header h1 { margin: 0; } @@ -62,15 +111,18 @@ border-radius: 3px; } - .github-ribbon { - position: absolute; - top: 0; - right: 0; - border: 0; - } + .github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}} + + + +
@@ -78,12 +130,50 @@

Marked.js Documentation

- - - Fork me on GitHub - - -
+
+ +
+
@@ -98,6 +188,7 @@

Marked.js Documentation

var content = document.querySelector('#content'); var body = document.querySelector('html'); + var navLinks = document.querySelectorAll('nav a'); var currentPage = 'README.md'; var currentHash = ''; var renderedPage = ''; @@ -125,7 +216,14 @@

Marked.js Documentation

fetchAnchor(currentHash) }); - history.replaceState('', document.title, '#/' + currentPage + (currentHash ? '#' + currentHash : '')); + var url = '#/' + currentPage + (currentHash ? '#' + currentHash : ''); + var fullUrl = window.location.origin + '/' + url; + + navLinks.forEach(function(link) { + link.className = link.href === fullUrl ? 'selected' : ''; + }); + + history.replaceState('', document.title, url); } function fetchAnchor(anchor) {