create-jant 0.3.38 → 0.3.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/LICENSE +189 -189
  2. package/README.md +8 -6
  3. package/dist/index.js +5 -1
  4. package/package.json +3 -3
  5. package/template/.env.example +21 -0
  6. package/template/README.md +25 -18
  7. package/template/docs/internal/migrate.md +10 -0
  8. package/template/docs/internal/operations.md +61 -0
  9. package/template/package.json +3 -3
  10. package/template/static-site-export/README.md +70 -0
  11. package/template/static-site-export/config.toml +16 -0
  12. package/template/static-site-export/content/41q27/index.md +29 -0
  13. package/template/static-site-export/content/_index.md +4 -0
  14. package/template/static-site-export/content/a-night-heron-field-guide-for-my-walk-folder/index.md +16 -0
  15. package/template/static-site-export/content/a-quiet-saturday-after-a-busy-week/index.md +23 -0
  16. package/template/static-site-export/content/are-na-is-the-only-bookmark-pile-i-still-revisit/index.md +16 -0
  17. package/template/static-site-export/content/bought-too-many-lemons-again/index.md +15 -0
  18. package/template/static-site-export/content/current-tea-rotation/index.md +20 -0
  19. package/template/static-site-export/content/derek-sivers-still-writes-the-kind-of-internet-i-want-more-of/index.md +16 -0
  20. package/template/static-site-export/content/desk-but-better/index.md +16 -0
  21. package/template/static-site-export/content/e0kcg/index.md +12 -0
  22. package/template/static-site-export/content/from-basho/index.md +15 -0
  23. package/template/static-site-export/content/from-epictetus/index.md +15 -0
  24. package/template/static-site-export/content/from-marcus-aurelius/index.md +15 -0
  25. package/template/static-site-export/content/from-seneca/index.md +15 -0
  26. package/template/static-site-export/content/from-thoreau/index.md +15 -0
  27. package/template/static-site-export/content/gkbvv/index.md +28 -0
  28. package/template/static-site-export/content/k5vh8/index.md +29 -0
  29. package/template/static-site-export/content/mynoise-for-rainy-afternoons/index.md +16 -0
  30. package/template/static-site-export/content/nts-archives-are-good-cleaning-music/index.md +16 -0
  31. package/template/static-site-export/content/qgfcu/index.md +29 -0
  32. package/template/static-site-export/content/rain-makes-my-neighborhood-look-better/index.md +17 -0
  33. package/template/static-site-export/content/serious-eats-on-tomato-and-egg-soup/index.md +16 -0
  34. package/template/static-site-export/content/te812/index.md +29 -0
  35. package/template/static-site-export/content/telk3/index.md +29 -0
  36. package/template/static-site-export/content/the-five-minute-reset-is-still-the-best-habit-i-have/index.md +21 -0
  37. package/template/static-site-export/content/the-hallway-light-took-12-minutes-and-3-months/index.md +18 -0
  38. package/template/static-site-export/content/the-recurse-center-manual-is-weirdly-calming/index.md +16 -0
  39. package/template/static-site-export/content/u08bn/index.md +29 -0
  40. package/template/static-site-export/content/what-i-actually-use-my-notebook-for/index.md +23 -0
  41. package/template/static-site-export/content/z4s9v/index.md +29 -0
  42. package/template/static-site-export/static/style.css +338 -0
  43. package/template/static-site-export/templates/base.html +23 -0
  44. package/template/static-site-export/templates/index.html +20 -0
  45. package/template/static-site-export/templates/macros.html +58 -0
  46. package/template/static-site-export/templates/page.html +8 -0
  47. package/template/static-site-export/templates/section.html +17 -0
  48. package/template/static-site-export/templates/taxonomy_list.html +15 -0
  49. package/template/static-site-export/templates/taxonomy_single.html +13 -0
  50. package/template/wrangler.toml +12 -7
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="{{ config.default_language }}">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>{% block title %}{{ config.title }}{% endblock %}</title>
7
+ <meta name="description" content="{{ config.description }}">
8
+ <link rel="stylesheet" href="{{ get_url(path='style.css') }}">
9
+ <link rel="alternate" type="application/atom+xml" title="{{ config.title }}" href="{{ get_url(path='atom.xml') }}">
10
+ </head>
11
+ <body>
12
+ <header class="site-header">
13
+ <a href="{{ config.base_url }}" class="site-title">{{ config.title }}</a>
14
+ <nav>
15
+ <a href="{{ config.base_url }}/c/">Collections</a>
16
+ <a href="{{ get_url(path='atom.xml') }}">RSS</a>
17
+ </nav>
18
+ </header>
19
+ <main class="site-main">
20
+ {% block content %}{% endblock %}
21
+ </main>
22
+ </body>
23
+ </html>
@@ -0,0 +1,20 @@
1
+ {% extends "base.html" %}
2
+ {% import "macros.html" as macros %}
3
+
4
+ {% block title %}{{ config.title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ <div class="post-list">
8
+ {% for page in paginator.pages %}
9
+ {{ macros::post_card(page=page) }}
10
+ {% endfor %}
11
+ </div>
12
+
13
+ {% if paginator.previous or paginator.next %}
14
+ <nav class="pagination">
15
+ {% if paginator.previous %}<a href="{{ paginator.previous }}">&larr; Newer</a>{% endif %}
16
+ {% if paginator.next %}<a href="{{ paginator.next }}">Older &rarr;</a>{% endif %}
17
+ </nav>
18
+ {% endif %}
19
+
20
+ {% endblock %}
@@ -0,0 +1,58 @@
1
+ {% macro post_card(page, detail=false) %}
2
+ <article class="{% if detail %}post-detail{% else %}post-card{% endif %}{% if page.extra.pinned %} pinned{% endif %}" data-format="{{ page.extra.format | default(value='note') }}">
3
+ {% if page.extra.format == "link" and page.extra.link_url %}
4
+ <div class="post-meta link-domain">
5
+ <a href="{{ page.extra.link_url }}" rel="noopener noreferrer" target="_blank">{{ page.extra.link_url | split(pat="//") | nth(n=1) | split(pat="/") | first }}</a>
6
+ </div>
7
+ {% endif %}
8
+
9
+ {% if page.title %}
10
+ {% if detail %}
11
+ <h1 class="post-title">
12
+ {% if page.extra.format == "link" and page.extra.link_url %}
13
+ <a href="{{ page.extra.link_url }}" rel="noopener noreferrer" target="_blank">{{ page.title }}</a>
14
+ {% else %}
15
+ {{ page.title }}
16
+ {% endif %}
17
+ </h1>
18
+ {% else %}
19
+ <h2 class="post-title">
20
+ {% if page.extra.format == "link" and page.extra.link_url %}
21
+ <a href="{{ page.extra.link_url }}" rel="noopener noreferrer" target="_blank">{{ page.title }}</a>
22
+ {% else %}
23
+ <a href="{{ page.permalink }}">{{ page.title }}</a>
24
+ {% endif %}
25
+ </h2>
26
+ {% endif %}
27
+ {% endif %}
28
+
29
+ {% if page.extra.format == "quote" and page.extra.quote_text %}
30
+ <blockquote class="feed-quote">
31
+ <p>{{ page.extra.quote_text }}</p>
32
+ </blockquote>
33
+ {% endif %}
34
+
35
+ {% if not detail and page.summary %}
36
+ <div class="post-body prose">{{ page.summary | safe }}</div>
37
+ {% elif page.content %}
38
+ <div class="post-body prose">{{ page.content | safe }}</div>
39
+ {% endif %}
40
+
41
+ {% if page.extra.rating %}
42
+ <div class="star-rating">
43
+ {% for i in range(end=page.extra.rating) %}<span class="star filled">&#9733;</span>{% endfor %}{% for i in range(start=page.extra.rating, end=5) %}<span class="star">&#9734;</span>{% endfor %}
44
+ </div>
45
+ {% endif %}
46
+
47
+ <footer class="post-footer">
48
+ <a href="{{ page.permalink }}" class="post-date"><time datetime="{{ page.date }}">{{ page.date | date(format="%b %e, %Y") }}</time></a>
49
+ {% if page.taxonomies.c %}
50
+ <span class="post-collections">
51
+ {% for col in page.taxonomies.c %}
52
+ <a href="{{ get_taxonomy_url(kind='c', name=col) }}" class="collection-tag">{{ col }}</a>
53
+ {% endfor %}
54
+ </span>
55
+ {% endif %}
56
+ </footer>
57
+ </article>
58
+ {% endmacro %}
@@ -0,0 +1,8 @@
1
+ {% extends "base.html" %}
2
+ {% import "macros.html" as macros %}
3
+
4
+ {% block title %}{% if page.title %}{{ page.title }} &mdash; {% endif %}{{ config.title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ {{ macros::post_card(page=page, detail=true) }}
8
+ {% endblock %}
@@ -0,0 +1,17 @@
1
+ {% extends "base.html" %}
2
+ {% import "macros.html" as macros %}
3
+
4
+ {% block title %}{{ section.title }} &mdash; {{ config.title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ <h1>{{ section.title }}</h1>
8
+ {% if section.description %}
9
+ <p class="section-description">{{ section.description }}</p>
10
+ {% endif %}
11
+
12
+ <div class="post-list">
13
+ {% for page in section.pages %}
14
+ {{ macros::post_card(page=page) }}
15
+ {% endfor %}
16
+ </div>
17
+ {% endblock %}
@@ -0,0 +1,15 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}Collections &mdash; {{ config.title }}{% endblock %}
4
+
5
+ {% block content %}
6
+ <h1>Collections</h1>
7
+ <ul class="collection-list">
8
+ {% for term in terms %}
9
+ <li>
10
+ <a href="{{ term.permalink }}">{{ term.name }}</a>
11
+ <span class="count">({{ term.pages | length }})</span>
12
+ </li>
13
+ {% endfor %}
14
+ </ul>
15
+ {% endblock %}
@@ -0,0 +1,13 @@
1
+ {% extends "base.html" %}
2
+ {% import "macros.html" as macros %}
3
+
4
+ {% block title %}{{ term.name }} &mdash; {{ config.title }}{% endblock %}
5
+
6
+ {% block content %}
7
+ <h1>{{ term.name }}</h1>
8
+ <div class="post-list">
9
+ {% for page in term.pages %}
10
+ {{ macros::post_card(page=page) }}
11
+ {% endfor %}
12
+ </div>
13
+ {% endblock %}
@@ -9,22 +9,24 @@ directory = "./node_modules/@jant/core/dist/client"
9
9
 
10
10
  # @create-jant: @remove-start
11
11
  [dev]
12
- port = 9020
12
+ port = 3000
13
13
  # @create-jant: @remove-end
14
14
 
15
15
  # ============================================
16
16
  # Environment Variables
17
17
  # ============================================
18
18
  # Non-sensitive configuration goes here in [vars]
19
- # Sensitive secrets (like AUTH_SECRET) should be:
19
+ # Sensitive secrets (like AUTH_SECRET and INTERNAL_ADMIN_TOKEN) should be:
20
20
  # - Local dev: .dev.vars file (not committed)
21
21
  # - Production: wrangler secret put AUTH_SECRET
22
22
  # Full details: https://github.com/jant-me/jant/blob/main/docs/configuration.md
23
23
 
24
24
  [vars]
25
- # Required: Your site's public URL (e.g. https://my-blog.example.com)
26
- # https://github.com/jant-me/jant/blob/main/docs/configuration.md#required
27
- SITE_URL = "https://demo.jant.me" # @create-jant: "https://example.com"
25
+ # Optional: Pin your site's public origin (e.g. https://my-blog.example.com)
26
+ # https://github.com/jant-me/jant/blob/main/docs/configuration.md#public-urls-and-subpaths
27
+ SITE_ORIGIN = "https://demo.jant.me" # @create-jant: "https://example.com"
28
+ # Optional: Mount the site under a subpath such as /blog
29
+ # SITE_PATH_PREFIX = "/blog"
28
30
 
29
31
  # Optional: Site configuration
30
32
  # You can also set these in the dashboard UI at /dash/settings
@@ -33,8 +35,10 @@ SITE_URL = "https://demo.jant.me" # @create-jant: "https://example.com"
33
35
  # SITE_DESCRIPTION = "A personal blog powered by Jant"
34
36
  # SITE_LANGUAGE = "en"
35
37
 
36
- # Optional: Timeline page size (default: 20)
37
- # PAGE_SIZE = "20"
38
+ # Optional: Pagination defaults
39
+ # PAGE_SIZE = 50
40
+ # SEARCH_PAGE_SIZE = 25
41
+ # ARCHIVE_PAGE_SIZE = 100
38
42
 
39
43
  # Optional: R2 Storage (for media uploads)
40
44
  # https://github.com/jant-me/jant/blob/main/docs/configuration.md#r2-default
@@ -50,6 +54,7 @@ IMAGE_TRANSFORM_URL = "https://demo-media.jant.me/cdn-cgi/image" # @create-jant:
50
54
  # @create-jant: @remove-start
51
55
  DEMO_EMAIL = "demo@jant.me"
52
56
  DEMO_PASSWORD = "jantdemodemojant"
57
+ DEMO_MODE = "true"
53
58
  # @create-jant: @remove-end
54
59
 
55
60
  [[d1_databases]]