@terrymooreii/sia 2.1.0 ā 2.1.1
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.
- package/_config.yml +1 -0
- package/defaults/layouts/post.njk +4 -1
- package/defaults/pages/blog.njk +1 -0
- package/defaults/pages/index.njk +1 -0
- package/defaults/pages/tag.njk +1 -0
- package/defaults/styles/main.css +263 -4
- package/defaults/styles/minimal.css +263 -4
- package/lib/build.js +9 -0
- package/lib/config.js +2 -1
- package/lib/content.js +9 -1
- package/lib/server.js +3 -3
- package/package.json +1 -1
- package/readme.md +11 -1
package/_config.yml
CHANGED
|
@@ -3,7 +3,10 @@
|
|
|
3
3
|
{% block content %}
|
|
4
4
|
<article class="post">
|
|
5
5
|
<header class="post-header">
|
|
6
|
-
<h1 class="post-title">
|
|
6
|
+
<h1 class="post-title">
|
|
7
|
+
{{ page.title }}
|
|
8
|
+
{% if page.draft %}<span class="draft-badge">Draft</span>{% endif %}
|
|
9
|
+
</h1>
|
|
7
10
|
|
|
8
11
|
<div class="post-meta">
|
|
9
12
|
<time datetime="{{ page.date | date('iso') }}">{{ page.date | date('long') }}</time>
|
package/defaults/pages/blog.njk
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<article class="post-card">
|
|
12
12
|
<h2 class="post-card-title">
|
|
13
13
|
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
14
|
+
{% if post.draft %}<span class="draft-badge">Draft</span>{% endif %}
|
|
14
15
|
</h2>
|
|
15
16
|
<div class="post-card-meta">
|
|
16
17
|
<time datetime="{{ post.date | date('iso') }}">{{ post.date | date('long') }}</time>
|
package/defaults/pages/index.njk
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
<article class="post-card">
|
|
18
18
|
<h3 class="post-card-title">
|
|
19
19
|
<a href="{{ post.url }}">{{ post.title }}</a>
|
|
20
|
+
{% if post.draft %}<span class="draft-badge">Draft</span>{% endif %}
|
|
20
21
|
</h3>
|
|
21
22
|
<div class="post-card-meta">
|
|
22
23
|
<time datetime="{{ post.date | date('iso') }}">{{ post.date | date('short') }}</time>
|
package/defaults/pages/tag.njk
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<article class="post-card">
|
|
12
12
|
<h2 class="post-card-title">
|
|
13
13
|
<a href="{{ post.url }}">{{ post.title or post.excerpt }}</a>
|
|
14
|
+
{% if post.draft %}<span class="draft-badge">Draft</span>{% endif %}
|
|
14
15
|
</h2>
|
|
15
16
|
<div class="post-card-meta">
|
|
16
17
|
<time datetime="{{ post.date | date('iso') }}">{{ post.date | date('long') }}</time>
|
package/defaults/styles/main.css
CHANGED
|
@@ -341,6 +341,10 @@ img {
|
|
|
341
341
|
font-weight: 600;
|
|
342
342
|
margin: 0 0 var(--spacing-sm);
|
|
343
343
|
line-height: 1.3;
|
|
344
|
+
display: flex;
|
|
345
|
+
align-items: center;
|
|
346
|
+
flex-wrap: wrap;
|
|
347
|
+
gap: var(--spacing-sm);
|
|
344
348
|
}
|
|
345
349
|
|
|
346
350
|
.post-card-title a {
|
|
@@ -396,6 +400,10 @@ img {
|
|
|
396
400
|
letter-spacing: -0.02em;
|
|
397
401
|
margin: 0 0 var(--spacing-md);
|
|
398
402
|
line-height: 1.2;
|
|
403
|
+
display: flex;
|
|
404
|
+
align-items: center;
|
|
405
|
+
flex-wrap: wrap;
|
|
406
|
+
gap: var(--spacing-sm);
|
|
399
407
|
}
|
|
400
408
|
|
|
401
409
|
.post-meta {
|
|
@@ -566,12 +574,29 @@ img {
|
|
|
566
574
|
font-size: 0.9375rem;
|
|
567
575
|
}
|
|
568
576
|
|
|
569
|
-
|
|
570
|
-
|
|
577
|
+
/* ===== Draft Badge ===== */
|
|
578
|
+
.draft-badge {
|
|
579
|
+
display: inline-flex;
|
|
580
|
+
align-items: center;
|
|
581
|
+
padding: 0.125em 0.4em;
|
|
582
|
+
background: #f59e0b;
|
|
583
|
+
color: white;
|
|
584
|
+
font-size: 0.65rem;
|
|
585
|
+
font-weight: 600;
|
|
586
|
+
text-transform: uppercase;
|
|
587
|
+
letter-spacing: 0.05em;
|
|
588
|
+
border-radius: var(--radius-sm);
|
|
589
|
+
line-height: 1;
|
|
590
|
+
flex-shrink: 0;
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
[data-theme="dark"] .draft-badge {
|
|
594
|
+
background: #fbbf24;
|
|
595
|
+
color: #1a202c;
|
|
571
596
|
}
|
|
572
597
|
|
|
573
|
-
.
|
|
574
|
-
|
|
598
|
+
.prose .draft-badge {
|
|
599
|
+
font-size: 0.6rem;
|
|
575
600
|
}
|
|
576
601
|
|
|
577
602
|
.tag-section {
|
|
@@ -828,6 +853,240 @@ img {
|
|
|
828
853
|
font-weight: 600;
|
|
829
854
|
}
|
|
830
855
|
|
|
856
|
+
/* ===== Alert Boxes ===== */
|
|
857
|
+
.prose .markdown-alert {
|
|
858
|
+
margin: 1.5em 0;
|
|
859
|
+
padding: var(--spacing-md) var(--spacing-lg);
|
|
860
|
+
border-left: 4px solid;
|
|
861
|
+
border-radius: var(--radius-md);
|
|
862
|
+
background: var(--color-bg-alt);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
.prose .markdown-alert-title {
|
|
866
|
+
display: flex;
|
|
867
|
+
align-items: center;
|
|
868
|
+
gap: var(--spacing-sm);
|
|
869
|
+
margin: 0 0 var(--spacing-sm) 0;
|
|
870
|
+
font-weight: 600;
|
|
871
|
+
font-style: normal;
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.prose .markdown-alert-title svg {
|
|
875
|
+
flex-shrink: 0;
|
|
876
|
+
width: 16px;
|
|
877
|
+
height: 16px;
|
|
878
|
+
fill: currentColor;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
/* Make SVG icons lighter in dark mode */
|
|
882
|
+
[data-theme="dark"] .prose .markdown-alert-title svg {
|
|
883
|
+
fill: currentColor;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.prose .markdown-alert p:last-child {
|
|
887
|
+
margin-bottom: 0;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/* Note Alert */
|
|
891
|
+
.prose .markdown-alert-note {
|
|
892
|
+
border-left-color: #0969da;
|
|
893
|
+
background: rgba(9, 105, 218, 0.1);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
.prose .markdown-alert-note .markdown-alert-title {
|
|
897
|
+
color: #0969da;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
[data-theme="dark"] .prose .markdown-alert-note {
|
|
901
|
+
background: rgba(9, 105, 218, 0.15);
|
|
902
|
+
border-left-color: #58a6ff;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
[data-theme="dark"] .prose .markdown-alert-note .markdown-alert-title {
|
|
906
|
+
color: #58a6ff;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
[data-theme="dark"] .prose .markdown-alert-note .markdown-alert-title svg {
|
|
910
|
+
fill: #58a6ff;
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
/* Tip Alert */
|
|
914
|
+
.prose .markdown-alert-tip {
|
|
915
|
+
border-left-color: #1a7f37;
|
|
916
|
+
background: rgba(26, 127, 55, 0.1);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.prose .markdown-alert-tip .markdown-alert-title {
|
|
920
|
+
color: #1a7f37;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
[data-theme="dark"] .prose .markdown-alert-tip {
|
|
924
|
+
background: rgba(26, 127, 55, 0.15);
|
|
925
|
+
border-left-color: #3fb950;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
[data-theme="dark"] .prose .markdown-alert-tip .markdown-alert-title {
|
|
929
|
+
color: #3fb950;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
[data-theme="dark"] .prose .markdown-alert-tip .markdown-alert-title svg {
|
|
933
|
+
fill: #3fb950;
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
/* Important Alert */
|
|
937
|
+
.prose .markdown-alert-important {
|
|
938
|
+
border-left-color: #8250df;
|
|
939
|
+
background: rgba(130, 80, 223, 0.1);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.prose .markdown-alert-important .markdown-alert-title {
|
|
943
|
+
color: #8250df;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
[data-theme="dark"] .prose .markdown-alert-important {
|
|
947
|
+
background: rgba(130, 80, 223, 0.15);
|
|
948
|
+
border-left-color: #a371f7;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
[data-theme="dark"] .prose .markdown-alert-important .markdown-alert-title {
|
|
952
|
+
color: #a371f7;
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
[data-theme="dark"] .prose .markdown-alert-important .markdown-alert-title svg {
|
|
956
|
+
fill: #a371f7;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/* Warning Alert */
|
|
960
|
+
.prose .markdown-alert-warning {
|
|
961
|
+
border-left-color: #9a6700;
|
|
962
|
+
background: rgba(154, 103, 0, 0.1);
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.prose .markdown-alert-warning .markdown-alert-title {
|
|
966
|
+
color: #9a6700;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
[data-theme="dark"] .prose .markdown-alert-warning {
|
|
970
|
+
background: rgba(154, 103, 0, 0.15);
|
|
971
|
+
border-left-color: #d29922;
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
[data-theme="dark"] .prose .markdown-alert-warning .markdown-alert-title {
|
|
975
|
+
color: #d29922;
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
[data-theme="dark"] .prose .markdown-alert-warning .markdown-alert-title svg {
|
|
979
|
+
fill: #d29922;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/* Caution Alert */
|
|
983
|
+
.prose .markdown-alert-caution {
|
|
984
|
+
border-left-color: #cf222e;
|
|
985
|
+
background: rgba(207, 34, 46, 0.1);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.prose .markdown-alert-caution .markdown-alert-title {
|
|
989
|
+
color: #cf222e;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
[data-theme="dark"] .prose .markdown-alert-caution {
|
|
993
|
+
background: rgba(207, 34, 46, 0.15);
|
|
994
|
+
border-left-color: #f85149;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
[data-theme="dark"] .prose .markdown-alert-caution .markdown-alert-title {
|
|
998
|
+
color: #f85149;
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
[data-theme="dark"] .prose .markdown-alert-caution .markdown-alert-title svg {
|
|
1002
|
+
fill: #f85149;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
/* ===== Task Lists (Checkboxes) ===== */
|
|
1006
|
+
.prose ul.contains-task-list,
|
|
1007
|
+
.prose ol.contains-task-list {
|
|
1008
|
+
list-style: none;
|
|
1009
|
+
padding-left: 0;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
.prose .task-list-item {
|
|
1013
|
+
display: flex;
|
|
1014
|
+
align-items: flex-start;
|
|
1015
|
+
gap: var(--spacing-sm);
|
|
1016
|
+
margin-bottom: 0.5em;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
.prose .task-list-item input[type="checkbox"] {
|
|
1020
|
+
margin-top: 0.25em;
|
|
1021
|
+
cursor: pointer;
|
|
1022
|
+
width: 1em;
|
|
1023
|
+
height: 1em;
|
|
1024
|
+
flex-shrink: 0;
|
|
1025
|
+
accent-color: var(--color-primary);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
.prose .task-list-item input[type="checkbox"]:checked {
|
|
1029
|
+
accent-color: var(--color-primary);
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/* ===== Strikethrough ===== */
|
|
1033
|
+
.prose del,
|
|
1034
|
+
.prose s {
|
|
1035
|
+
text-decoration: line-through;
|
|
1036
|
+
text-decoration-color: var(--color-text-muted);
|
|
1037
|
+
opacity: 0.7;
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
/* ===== Footnotes ===== */
|
|
1041
|
+
.prose section[data-footnotes],
|
|
1042
|
+
.prose .footnotes {
|
|
1043
|
+
margin-top: 2em;
|
|
1044
|
+
padding-top: var(--spacing-lg);
|
|
1045
|
+
border-top: 1px solid var(--color-border);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
.prose section[data-footnotes] h2,
|
|
1049
|
+
.prose .footnotes h2 {
|
|
1050
|
+
font-size: 1rem;
|
|
1051
|
+
font-weight: 600;
|
|
1052
|
+
margin-bottom: var(--spacing-md);
|
|
1053
|
+
color: var(--color-text-muted);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
.prose section[data-footnotes] ol,
|
|
1057
|
+
.prose .footnotes ol {
|
|
1058
|
+
padding-left: 1.5em;
|
|
1059
|
+
font-size: 0.9375rem;
|
|
1060
|
+
color: var(--color-text-muted);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
.prose section[data-footnotes] li,
|
|
1064
|
+
.prose .footnotes li {
|
|
1065
|
+
margin-bottom: var(--spacing-sm);
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.prose .footnote-ref {
|
|
1069
|
+
font-size: 0.875em;
|
|
1070
|
+
vertical-align: super;
|
|
1071
|
+
text-decoration: none;
|
|
1072
|
+
color: var(--color-primary);
|
|
1073
|
+
margin-left: 0.2em;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.prose .footnote-ref:hover {
|
|
1077
|
+
text-decoration: underline;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
.prose .footnote-backref {
|
|
1081
|
+
text-decoration: none;
|
|
1082
|
+
color: var(--color-primary);
|
|
1083
|
+
margin-left: var(--spacing-xs);
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
.prose .footnote-backref:hover {
|
|
1087
|
+
text-decoration: underline;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
831
1090
|
/* ===== Empty State ===== */
|
|
832
1091
|
.empty-message {
|
|
833
1092
|
text-align: center;
|
|
@@ -325,6 +325,10 @@ img {
|
|
|
325
325
|
font-weight: 600;
|
|
326
326
|
margin: 0 0 var(--spacing-xs);
|
|
327
327
|
line-height: 1.4;
|
|
328
|
+
display: flex;
|
|
329
|
+
align-items: center;
|
|
330
|
+
flex-wrap: wrap;
|
|
331
|
+
gap: var(--spacing-sm);
|
|
328
332
|
}
|
|
329
333
|
|
|
330
334
|
.post-card-title a {
|
|
@@ -378,6 +382,10 @@ img {
|
|
|
378
382
|
letter-spacing: -0.02em;
|
|
379
383
|
margin: 0 0 var(--spacing-md);
|
|
380
384
|
line-height: 1.3;
|
|
385
|
+
display: flex;
|
|
386
|
+
align-items: center;
|
|
387
|
+
flex-wrap: wrap;
|
|
388
|
+
gap: var(--spacing-sm);
|
|
381
389
|
}
|
|
382
390
|
|
|
383
391
|
.post-meta {
|
|
@@ -547,12 +555,29 @@ img {
|
|
|
547
555
|
font-size: 0.875rem;
|
|
548
556
|
}
|
|
549
557
|
|
|
550
|
-
|
|
551
|
-
|
|
558
|
+
/* ===== Draft Badge ===== */
|
|
559
|
+
.draft-badge {
|
|
560
|
+
display: inline-flex;
|
|
561
|
+
align-items: center;
|
|
562
|
+
padding: 0.125em 0.4em;
|
|
563
|
+
background: #f59e0b;
|
|
564
|
+
color: white;
|
|
565
|
+
font-size: 0.65rem;
|
|
566
|
+
font-weight: 600;
|
|
567
|
+
text-transform: uppercase;
|
|
568
|
+
letter-spacing: 0.05em;
|
|
569
|
+
border-radius: var(--radius-sm);
|
|
570
|
+
line-height: 1;
|
|
571
|
+
flex-shrink: 0;
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
[data-theme="dark"] .draft-badge {
|
|
575
|
+
background: #fbbf24;
|
|
576
|
+
color: #0a0a0a;
|
|
552
577
|
}
|
|
553
578
|
|
|
554
|
-
.
|
|
555
|
-
|
|
579
|
+
.prose .draft-badge {
|
|
580
|
+
font-size: 0.6rem;
|
|
556
581
|
}
|
|
557
582
|
|
|
558
583
|
.tag-section {
|
|
@@ -806,6 +831,240 @@ img {
|
|
|
806
831
|
font-weight: 600;
|
|
807
832
|
}
|
|
808
833
|
|
|
834
|
+
/* ===== Alert Boxes ===== */
|
|
835
|
+
.prose .markdown-alert {
|
|
836
|
+
margin: 1.25em 0;
|
|
837
|
+
padding: var(--spacing-md) var(--spacing-lg);
|
|
838
|
+
border-left: 3px solid;
|
|
839
|
+
border-radius: var(--radius-md);
|
|
840
|
+
background: var(--color-bg-alt);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
.prose .markdown-alert-title {
|
|
844
|
+
display: flex;
|
|
845
|
+
align-items: center;
|
|
846
|
+
gap: var(--spacing-sm);
|
|
847
|
+
margin: 0 0 var(--spacing-sm) 0;
|
|
848
|
+
font-weight: 600;
|
|
849
|
+
font-style: normal;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.prose .markdown-alert-title svg {
|
|
853
|
+
flex-shrink: 0;
|
|
854
|
+
width: 16px;
|
|
855
|
+
height: 16px;
|
|
856
|
+
fill: currentColor;
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* Make SVG icons lighter in dark mode */
|
|
860
|
+
[data-theme="dark"] .prose .markdown-alert-title svg {
|
|
861
|
+
fill: currentColor;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.prose .markdown-alert p:last-child {
|
|
865
|
+
margin-bottom: 0;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/* Note Alert */
|
|
869
|
+
.prose .markdown-alert-note {
|
|
870
|
+
border-left-color: #0969da;
|
|
871
|
+
background: rgba(9, 105, 218, 0.08);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
.prose .markdown-alert-note .markdown-alert-title {
|
|
875
|
+
color: #0969da;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
[data-theme="dark"] .prose .markdown-alert-note {
|
|
879
|
+
background: rgba(9, 105, 218, 0.12);
|
|
880
|
+
border-left-color: #58a6ff;
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
[data-theme="dark"] .prose .markdown-alert-note .markdown-alert-title {
|
|
884
|
+
color: #58a6ff;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
[data-theme="dark"] .prose .markdown-alert-note .markdown-alert-title svg {
|
|
888
|
+
fill: #58a6ff;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/* Tip Alert */
|
|
892
|
+
.prose .markdown-alert-tip {
|
|
893
|
+
border-left-color: #1a7f37;
|
|
894
|
+
background: rgba(26, 127, 55, 0.08);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
.prose .markdown-alert-tip .markdown-alert-title {
|
|
898
|
+
color: #1a7f37;
|
|
899
|
+
}
|
|
900
|
+
|
|
901
|
+
[data-theme="dark"] .prose .markdown-alert-tip {
|
|
902
|
+
background: rgba(26, 127, 55, 0.12);
|
|
903
|
+
border-left-color: #3fb950;
|
|
904
|
+
}
|
|
905
|
+
|
|
906
|
+
[data-theme="dark"] .prose .markdown-alert-tip .markdown-alert-title {
|
|
907
|
+
color: #3fb950;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
[data-theme="dark"] .prose .markdown-alert-tip .markdown-alert-title svg {
|
|
911
|
+
fill: #3fb950;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
/* Important Alert */
|
|
915
|
+
.prose .markdown-alert-important {
|
|
916
|
+
border-left-color: #8250df;
|
|
917
|
+
background: rgba(130, 80, 223, 0.08);
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
.prose .markdown-alert-important .markdown-alert-title {
|
|
921
|
+
color: #8250df;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
[data-theme="dark"] .prose .markdown-alert-important {
|
|
925
|
+
background: rgba(130, 80, 223, 0.12);
|
|
926
|
+
border-left-color: #a371f7;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
[data-theme="dark"] .prose .markdown-alert-important .markdown-alert-title {
|
|
930
|
+
color: #a371f7;
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
[data-theme="dark"] .prose .markdown-alert-important .markdown-alert-title svg {
|
|
934
|
+
fill: #a371f7;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
/* Warning Alert */
|
|
938
|
+
.prose .markdown-alert-warning {
|
|
939
|
+
border-left-color: #9a6700;
|
|
940
|
+
background: rgba(154, 103, 0, 0.08);
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
.prose .markdown-alert-warning .markdown-alert-title {
|
|
944
|
+
color: #9a6700;
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
[data-theme="dark"] .prose .markdown-alert-warning {
|
|
948
|
+
background: rgba(154, 103, 0, 0.12);
|
|
949
|
+
border-left-color: #d29922;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
[data-theme="dark"] .prose .markdown-alert-warning .markdown-alert-title {
|
|
953
|
+
color: #d29922;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
[data-theme="dark"] .prose .markdown-alert-warning .markdown-alert-title svg {
|
|
957
|
+
fill: #d29922;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
/* Caution Alert */
|
|
961
|
+
.prose .markdown-alert-caution {
|
|
962
|
+
border-left-color: #cf222e;
|
|
963
|
+
background: rgba(207, 34, 46, 0.08);
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
.prose .markdown-alert-caution .markdown-alert-title {
|
|
967
|
+
color: #cf222e;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
[data-theme="dark"] .prose .markdown-alert-caution {
|
|
971
|
+
background: rgba(207, 34, 46, 0.12);
|
|
972
|
+
border-left-color: #f85149;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
[data-theme="dark"] .prose .markdown-alert-caution .markdown-alert-title {
|
|
976
|
+
color: #f85149;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
[data-theme="dark"] .prose .markdown-alert-caution .markdown-alert-title svg {
|
|
980
|
+
fill: #f85149;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/* ===== Task Lists (Checkboxes) ===== */
|
|
984
|
+
.prose ul.contains-task-list,
|
|
985
|
+
.prose ol.contains-task-list {
|
|
986
|
+
list-style: none;
|
|
987
|
+
padding-left: 0;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
.prose .task-list-item {
|
|
991
|
+
display: flex;
|
|
992
|
+
align-items: flex-start;
|
|
993
|
+
gap: var(--spacing-sm);
|
|
994
|
+
margin-bottom: 0.35em;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.prose .task-list-item input[type="checkbox"] {
|
|
998
|
+
margin-top: 0.2em;
|
|
999
|
+
cursor: pointer;
|
|
1000
|
+
width: 1em;
|
|
1001
|
+
height: 1em;
|
|
1002
|
+
flex-shrink: 0;
|
|
1003
|
+
accent-color: var(--color-primary);
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
.prose .task-list-item input[type="checkbox"]:checked {
|
|
1007
|
+
accent-color: var(--color-primary);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/* ===== Strikethrough ===== */
|
|
1011
|
+
.prose del,
|
|
1012
|
+
.prose s {
|
|
1013
|
+
text-decoration: line-through;
|
|
1014
|
+
text-decoration-color: var(--color-text-muted);
|
|
1015
|
+
opacity: 0.7;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
/* ===== Footnotes ===== */
|
|
1019
|
+
.prose section[data-footnotes],
|
|
1020
|
+
.prose .footnotes {
|
|
1021
|
+
margin-top: 2em;
|
|
1022
|
+
padding-top: var(--spacing-lg);
|
|
1023
|
+
border-top: 1px solid var(--color-border);
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
.prose section[data-footnotes] h2,
|
|
1027
|
+
.prose .footnotes h2 {
|
|
1028
|
+
font-size: 0.95rem;
|
|
1029
|
+
font-weight: 600;
|
|
1030
|
+
margin-bottom: var(--spacing-md);
|
|
1031
|
+
color: var(--color-text-muted);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.prose section[data-footnotes] ol,
|
|
1035
|
+
.prose .footnotes ol {
|
|
1036
|
+
padding-left: 1.5em;
|
|
1037
|
+
font-size: 0.9rem;
|
|
1038
|
+
color: var(--color-text-muted);
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
.prose section[data-footnotes] li,
|
|
1042
|
+
.prose .footnotes li {
|
|
1043
|
+
margin-bottom: var(--spacing-sm);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.prose .footnote-ref {
|
|
1047
|
+
font-size: 0.85em;
|
|
1048
|
+
vertical-align: super;
|
|
1049
|
+
text-decoration: none;
|
|
1050
|
+
color: var(--color-primary);
|
|
1051
|
+
margin-left: 0.2em;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
.prose .footnote-ref:hover {
|
|
1055
|
+
text-decoration: underline;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
.prose .footnote-backref {
|
|
1059
|
+
text-decoration: none;
|
|
1060
|
+
color: var(--color-primary);
|
|
1061
|
+
margin-left: var(--spacing-xs);
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
.prose .footnote-backref:hover {
|
|
1065
|
+
text-decoration: underline;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
809
1068
|
/* ===== Empty State ===== */
|
|
810
1069
|
.empty-message {
|
|
811
1070
|
text-align: center;
|
package/lib/build.js
CHANGED
|
@@ -201,6 +201,15 @@ export async function build(options = {}) {
|
|
|
201
201
|
// Load configuration
|
|
202
202
|
const config = loadConfig(options.rootDir || process.cwd());
|
|
203
203
|
|
|
204
|
+
// Only show drafts in dev mode if explicitly enabled in config
|
|
205
|
+
// For production builds, always disable showDrafts
|
|
206
|
+
if (!options.devMode) {
|
|
207
|
+
if (config.server) {
|
|
208
|
+
config.server.showDrafts = false;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
// If devMode is true, use the config value (which defaults to false)
|
|
212
|
+
|
|
204
213
|
// Clean output directory if requested
|
|
205
214
|
if (options.clean !== false) {
|
|
206
215
|
cleanOutput(config);
|
package/lib/config.js
CHANGED
package/lib/content.js
CHANGED
|
@@ -283,7 +283,15 @@ export function loadCollection(config, collectionName) {
|
|
|
283
283
|
return null;
|
|
284
284
|
}
|
|
285
285
|
})
|
|
286
|
-
.filter(item =>
|
|
286
|
+
.filter(item => {
|
|
287
|
+
if (item === null) return false;
|
|
288
|
+
// Include drafts if showDrafts is enabled in server config
|
|
289
|
+
if (item.draft && config.server?.showDrafts) {
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
// Otherwise, exclude drafts
|
|
293
|
+
return !item.draft;
|
|
294
|
+
});
|
|
287
295
|
|
|
288
296
|
// Sort items
|
|
289
297
|
const sortBy = collectionConfig.sortBy || 'date';
|
package/lib/server.js
CHANGED
|
@@ -188,7 +188,7 @@ function setupWatcher(config, wss) {
|
|
|
188
188
|
console.log('š Rebuilding...\n');
|
|
189
189
|
|
|
190
190
|
try {
|
|
191
|
-
await build({ clean: false, rootDir: config.rootDir });
|
|
191
|
+
await build({ clean: false, rootDir: config.rootDir, devMode: true });
|
|
192
192
|
notifyReload(wss);
|
|
193
193
|
} catch (err) {
|
|
194
194
|
console.error('ā Rebuild failed:', err.message);
|
|
@@ -213,8 +213,8 @@ export async function startServer(options = {}) {
|
|
|
213
213
|
|
|
214
214
|
console.log('\nā” Sia - Development Server\n');
|
|
215
215
|
|
|
216
|
-
// Initial build
|
|
217
|
-
await build({ clean: true, rootDir: config.rootDir });
|
|
216
|
+
// Initial build with devMode enabled to show drafts if configured
|
|
217
|
+
await build({ clean: true, rootDir: config.rootDir, devMode: true });
|
|
218
218
|
|
|
219
219
|
// Create servers
|
|
220
220
|
const httpServer = createHttpServer(config, wsPort);
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -131,8 +131,18 @@ pagination:
|
|
|
131
131
|
|
|
132
132
|
server:
|
|
133
133
|
port: 3000
|
|
134
|
+
showDrafts: false # Set to true to show draft posts in dev server
|
|
134
135
|
```
|
|
135
136
|
|
|
137
|
+
### Server Configuration
|
|
138
|
+
|
|
139
|
+
| Option | Description | Default |
|
|
140
|
+
|-------|-------------|---------|
|
|
141
|
+
| `port` | Port number for development server | `3000` |
|
|
142
|
+
| `showDrafts` | Show draft posts when using `sia dev` | `false` |
|
|
143
|
+
|
|
144
|
+
When `showDrafts` is set to `true`, draft posts (posts with `draft: true` in front matter) will be included in the development server build. This is useful for previewing draft content locally. Drafts are always excluded from production builds.
|
|
145
|
+
|
|
136
146
|
## Front Matter
|
|
137
147
|
|
|
138
148
|
Each markdown file can have YAML front matter:
|
|
@@ -158,7 +168,7 @@ excerpt: "Custom excerpt text"
|
|
|
158
168
|
| `tags` | Array of tags |
|
|
159
169
|
| `layout` | Template to use |
|
|
160
170
|
| `permalink` | Custom URL |
|
|
161
|
-
| `draft` | If true, excluded from build |
|
|
171
|
+
| `draft` | If true, excluded from build (unless `server.showDrafts` is enabled) |
|
|
162
172
|
| `excerpt` | Custom excerpt |
|
|
163
173
|
|
|
164
174
|
## Markdown Features
|