Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /docs directory for GitHub Pages #1138

Merged
merged 5 commits into from Mar 20, 2018

Conversation

Projects
None yet
3 participants
@styfle
Copy link
Member

commented Mar 11, 2018

Description

  • move documentation to the /docs folder
  • create index.html page to serve as a landing page that "dogfoods" marked
  • trim down the main README.md
  • add logo to /docs/img directory
  • TODO: enable /docs to be root for GitHub Pages (needs to be setup by and admin)
  • TODO: add GitHub url to repo (needs to be setup by and admin)
  • TODO: change hyperlinks from master/docs/somepage.md to marked.js.org/somepage.md (needs to be setup by admin)

You can see this in action by visiting https://styfle.github.io/marked/

Contributor

  • no tests required for this PR.

Committer

In most cases, this should be a different person than the contributor.

  • CI is green (no forced merge required).
  • Merge PR
@@ -1,2 +1,3 @@
.git*
test/
docs

This comment has been minimized.

Copy link
@styfle

styfle Mar 11, 2018

Author Member

This will prevent publishing the docs directory to npm which is usually not advised.

</ul>

<h2 id="marked">Marked</h2>
# Marked

This comment has been minimized.

Copy link
@styfle

styfle Mar 11, 2018

Author Member

I greatly simplified the main README and moved the more complex one to /docs/README.md

</div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js"></script>
<script src="https://cdn.jsdelivr.net/npm/unfetch/dist/unfetch.umd.js"></script>

This comment has been minimized.

Copy link
@styfle

styfle Mar 11, 2018

Author Member

I added a polyfill for promise and fetch so hopefully this will work with older browsers 😸

<meta charset="utf-8"/>
<title>Marked.js Documentation</title>
<style>
body {

This comment has been minimized.

Copy link
@styfle

styfle Mar 11, 2018

Author Member

I added some css styles that are similar to GitHub

var content = document.querySelector('#content');
var body = document.querySelector('html');
content.addEventListener('click', function (e) {

This comment has been minimized.

Copy link
@styfle

styfle Mar 11, 2018

Author Member

I attach a click handler to the page so that any <a href="page.md"> will prevent default behavior of loading the page and instead fetch and render with marked.

@styfle styfle requested review from UziTech, davisjam and joshbruce Mar 11, 2018

@styfle

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2018

@markedjs/marked Did you all get a chance to review?

@styfle styfle referenced this pull request Mar 13, 2018

Merged

marked.js.org #1847

@styfle styfle merged commit eef9de4 into markedjs:master Mar 20, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@styfle styfle deleted the styfle:docs branch Mar 20, 2018

@joshbruce joshbruce referenced this pull request Mar 21, 2018

Merged

styfle to admin #1148

3 of 5 tasks complete
@UziTech

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

@joshbruce We should maybe get a new version published to NPM. Because of this PR a lot of the links on NPM are invalid.

@styfle

This comment has been minimized.

Copy link
Member Author

commented Mar 22, 2018

Hmm, also the homepage in the package.json could be updated now that we have the marked.js.org domain.

@joshbruce

This comment has been minimized.

Copy link
Member

commented Mar 22, 2018

@UziTech and @styfle: See #1152

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.