|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +--- |
| 4 | +{% capture newline %} |
| 5 | +{% endcapture %} |
| 6 | +{% capture /dev/null %} |
| 7 | + <!-- Get links for previous and next pages --> |
| 8 | + {% assign people_list = site.people | natural_sort: "title" %} |
| 9 | + {% capture first_link %}[{{people_list[0].title}}]({{people_list[0].url}}){% endcapture %} |
| 10 | + {% capture last_link %}[{{people_list[-1].title}}]({{people_list[-1].url}}){% endcapture %} |
| 11 | + {% for entry in people_list %} |
| 12 | + {% capture entry_link %}[{{entry.title}}]({{entry.url}}){% endcapture %} |
| 13 | + {% if prev_link %} |
| 14 | + {% assign next_link = entry_link %} |
| 15 | + {% break %} |
| 16 | + {% endif %} |
| 17 | + {% if entry.url == page.url %} |
| 18 | + {% assign prev_link = prev_entry | default: last_link %} |
| 19 | + {% endif %} |
| 20 | + {% assign prev_entry = entry_link %} |
| 21 | + {% endfor %} |
| 22 | + |
| 23 | + <!-- Build list of primary sources --> |
| 24 | + {% for source in page.primary_sources %} |
| 25 | + {%- if source.link contains 'http://' or source.link contains 'https://' -%} |
| 26 | + {% capture reference %}[{{source.title}}]({{source.link}}){% endcapture %} |
| 27 | + {%- else -%} |
| 28 | + {% capture reference %}[{{source.title}}][{{source.link}}]{% endcapture %} |
| 29 | + {%- endif -%} |
| 30 | + {% capture primary_sources %}{{primary_sources}}{{newline}}- {{reference}}{% endcapture %} |
| 31 | + {% endfor %} |
| 32 | + |
| 33 | + <!-- Build list of internal optech mentions --> |
| 34 | + {% assign references = '' %} |
| 35 | + {% for mention in page.optech_mentions %} |
| 36 | + {% if mention.feature == true %} |
| 37 | + {% assign bold = '{:.bold}' %} |
| 38 | + {% else %} |
| 39 | + {% assign bold='' %} |
| 40 | + {% endif %} |
| 41 | + {% include functions/get-mention-date.md %} |
| 42 | + {% capture references %}{{references}}{{date}}- [{{mention.title}}]({{mention.url}}){{bold}}ENDENTRY{% endcapture %} |
| 43 | + {% endfor %} |
| 44 | + |
| 45 | + <!-- Build list of see also entries --> |
| 46 | + {% for source in page.see_also %} |
| 47 | + {%- if source.link contains 'http://' or source.link contains 'https://' -%} |
| 48 | + {% capture reference %}[{{source.title}}]({{source.link}}){% endcapture %} |
| 49 | + {%- else -%} |
| 50 | + {% capture reference %}[{{source.title}}][{{source.link}}]{% endcapture %} |
| 51 | + {%- endif -%} |
| 52 | + {% capture see_also %}{{see_also}}{{newline}}- {{reference}}{% endcapture %} |
| 53 | + {% endfor %} |
| 54 | + |
| 55 | + <!-- Variable for use in links --> |
| 56 | + {% capture gh_base %}https://github.com/{{site.github_username}}/{{site.repository_name}}{% endcapture %} |
| 57 | + |
| 58 | +{% endcapture %} |
| 59 | + |
| 60 | +<!-- Actual page content --> |
| 61 | +{% capture content %} |
| 62 | + {% include references.md %} |
| 63 | + {{aliases}} |
| 64 | + |
| 65 | + {{page.excerpt}} |
| 66 | + |
| 67 | + {{page.content}} |
| 68 | + |
| 69 | + {{notices | default: newline}} |
| 70 | + |
| 71 | + {%- if page.optech_mentions and page.optech_mentions != '' -%} |
| 72 | + ## Optech newsletter mentions |
| 73 | + |
| 74 | + {% assign sorted_references = references | split: 'ENDENTRY' | sort | reverse %} |
| 75 | + {%- for reference in sorted_references -%} |
| 76 | + {%- assign current_ref_year = reference | slice: 0, 4 -%} |
| 77 | + {%- if current_ref_year != last_ref_year -%} |
| 78 | + {{newline}}{{newline}}**{{current_ref_year}}** |
| 79 | + {%- endif -%} |
| 80 | + {{newline}}{{reference | slice: 10, 9999999999 }} |
| 81 | + {%- assign last_ref_year = current_ref_year -%} |
| 82 | + {%- endfor -%} |
| 83 | + {% endif %}{{newline}}{{newline}} |
| 84 | + |
| 85 | + {%- if page.see_also and page.see_also != '' -%} |
| 86 | + ## See also |
| 87 | + |
| 88 | + {{see_also}} |
| 89 | + {% endif %} |
| 90 | + |
| 91 | + <br>{{newline}}{{newline}} |
| 92 | +<span class="float-left" markdown="1">**Previous Person:**<br>{{prev_link}}</span> |
| 93 | +<span class="float-right" markdown="1">**Next Person:**<br>{{next_link | default: first_link }}</span> |
| 94 | + |
| 95 | + {:.center} |
| 96 | + [Edit page]({{gh_base}}/edit/master/{{page.path}})<br> |
| 97 | + [Report Issue]({{gh_base}}/issues/new?body={{'Source file: ' | append: page.path | url_escape }}) |
| 98 | +{% endcapture %}{{ content | markdownify }} |
0 commit comments