Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Structures #510

Merged
merged 5 commits into from Oct 11, 2016
Merged

Structures #510

merged 5 commits into from Oct 11, 2016

Conversation

zeke
Copy link
Contributor

@zeke zeke commented Oct 4, 2016

Fixes #509

This updates the markdown parser to rewrite links to the new files in /docs/api/structures.

screen shot 2016-10-04 at 1 50 38 pm

cc @MarshallOfSound

@zeke
Copy link
Contributor Author

zeke commented Oct 5, 2016

@kevinsawicki can you peep this?

@zeke
Copy link
Contributor Author

zeke commented Oct 10, 2016

bump @kevinsawicki

@@ -46,6 +46,8 @@ var fetchDocs = module.exports = function fetchDocs (_settings, callback) {

// override tarball for testing out branches:
// tarballUrl = 'https://api.github.com/repos/electron/electron/tarball/master'
// tarballUrl = 'https://github.com/electron/electron/archive/ba49fbc8ba2fac0b72b1530f2ce46c1cd3110620.tar.gz'
// version = 'v1.4.1'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was a little confused by this line, is it meant to be uncommented when you want to override it? It seems to get reassigned two lines below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Cleaned that up a bit. I just left it there because I always have a hard time finding/remembering the URL structures for fetching repo tarballs.

<td>{{ site.data.processes[doc.title] | replace: 'Process', '' | replace: 'Processes', '' }}</td>
<td>{{ doc.excerpt }}</td>
</tr>
{% unless doc.source_url contains '/structures/' %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of indenting here, we could switch to using continue statements so the <tr> is more aligned with the outer <table> element:

{% assign docs = site.docs | sort: 'sort_title' %}
{% for doc in docs %}
  {% if doc.category != 'API' %}{% continue %}{% endif %}
  {% if doc.source_url contains '/structures/' %}{% continue %}{% endif %}
  <tr>
    <td><a href="{{ site.baseurl }}{{ doc.url }}">{{ doc.title }}</a></td>
    <td>{{ site.data.processes[doc.title] | replace: 'Process', '' | replace: 'Processes', '' }}</td>
    <td>{{ doc.excerpt }}</td>
  </tr>
{% endfor %}

Curious what you think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like early returns. I dig it.

@kevinsawicki
Copy link
Contributor

Looks good to me 👍

@zeke zeke merged commit ea22169 into gh-pages Oct 11, 2016
@zeke zeke deleted the structures branch October 11, 2016 18:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants