Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions src/assets/defaultTemplate.njk
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
{% if is_new_article %}
# {{title}}

## Metadata
{% if author %}- Author: [{{author}}]({{authorUrl}}){% endif %}
- Title: {{title}}
{% if url %}- Reference: {{url}}{% endif %}
- Category: #article
{% endif %}

{%- if is_new_article %}
{% if page_notes.length > 0 %}
## Page Notes
{% for highlight in page_notes -%}
{{highlight.annotation}}
{%- if highlight.tags | length %}
Tags: {% for tag in highlight.tags -%} #{{tag | replace(" ", "-")+" "}}{%- endfor %}
{% endif %}
{% endfor %}
{%- endif -%}
{% endif %}

{%- if is_new_article -%}
{% if is_new_article %}
## Highlights
{% endif %}
{% for highlight in highlights -%}
- {{highlight.text}} — [Updated on {{highlight.updated}}]({{highlight.incontext}})
{%- if 'Private' != highlight.group %} — Group: #{{highlight.group | replace(" ", "-")}}{% endif %}
{%- if 'Private' != highlight.group %}
- Group: #{{highlight.group | replace(" ", "-")}}{% endif %}
{% if highlight.tags | length %} - Tags: {% for tag in highlight.tags %} #{{tag | replace(" ", "-")+" "}}{% endfor %}
{% endif -%}
{% if highlight.annotation %} - Annotation: {{highlight.annotation}}{% endif %}
{% endfor %}
{% if highlight.annotation %} - Annotation:
{{highlight.annotation}}
{% endif %}
{% endfor %}