@studiocms/blog 0.1.0-beta.10
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/LICENSE +21 -0
- package/README.md +1 -0
- package/dist/blog.d.js +0 -0
- package/dist/blog.d.ts +8 -0
- package/dist/components/BaseHead.astro +73 -0
- package/dist/components/Footer.astro +26 -0
- package/dist/components/Navigation.astro +83 -0
- package/dist/components/PageList.astro +46 -0
- package/dist/components/PostHeader.astro +24 -0
- package/dist/components/RSSIcon.astro +6 -0
- package/dist/components/navigation.css +155 -0
- package/dist/components.d.js +0 -0
- package/dist/components.d.ts +13 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +81 -0
- package/dist/layouts/Layout.astro +60 -0
- package/dist/lib.d.js +0 -0
- package/dist/lib.d.ts +82 -0
- package/dist/renderer.d.js +0 -0
- package/dist/renderer.d.ts +9 -0
- package/dist/routes/[...slug].astro +36 -0
- package/dist/routes/blog/[...slug].astro +44 -0
- package/dist/routes/blog/index.astro +32 -0
- package/dist/routes/rss.xml.d.ts +2 -0
- package/dist/routes/rss.xml.js +34 -0
- package/dist/routes/rss.xml.ts +44 -0
- package/dist/routes/sitemap-md.xml.d.ts +2 -0
- package/dist/routes/sitemap-md.xml.js +22 -0
- package/dist/routes/sitemap-md.xml.ts +28 -0
- package/dist/routes/sitemap-posts.xml.d.ts +2 -0
- package/dist/routes/sitemap-posts.xml.js +30 -0
- package/dist/routes/sitemap-posts.xml.ts +38 -0
- package/dist/sdk.d.js +0 -0
- package/dist/sdk.d.ts +56 -0
- package/dist/styles/base.css +245 -0
- package/dist/types.d.ts +34 -0
- package/dist/types.js +0 -0
- package/package.json +71 -0
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--accent: #2337ff;
|
|
3
|
+
--accent-dark: #000d8a;
|
|
4
|
+
--black:
|
|
5
|
+
15,
|
|
6
|
+
18,
|
|
7
|
+
25;
|
|
8
|
+
--gray:
|
|
9
|
+
96,
|
|
10
|
+
115,
|
|
11
|
+
159;
|
|
12
|
+
--gray-light:
|
|
13
|
+
229,
|
|
14
|
+
233,
|
|
15
|
+
240;
|
|
16
|
+
--gray-dark:
|
|
17
|
+
34,
|
|
18
|
+
41,
|
|
19
|
+
57;
|
|
20
|
+
--gray-gradient: rgba(var(--gray-light), 50%), #fff;
|
|
21
|
+
--box-shadow:
|
|
22
|
+
0 2px 6px rgba(var(--gray), 25%),
|
|
23
|
+
0 8px 24px rgba(var(--gray), 33%),
|
|
24
|
+
0 16px 32px rgba(var(--gray), 33%);
|
|
25
|
+
}
|
|
26
|
+
body {
|
|
27
|
+
font-family: "Atkinson Hyperlegible", sans-serif;
|
|
28
|
+
margin: 0;
|
|
29
|
+
padding: 0;
|
|
30
|
+
text-align: left;
|
|
31
|
+
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
|
32
|
+
background-size: 100% 600px;
|
|
33
|
+
word-wrap: break-word;
|
|
34
|
+
overflow-wrap: break-word;
|
|
35
|
+
color: rgb(var(--gray-dark));
|
|
36
|
+
font-size: 20px;
|
|
37
|
+
line-height: 1.7;
|
|
38
|
+
}
|
|
39
|
+
main {
|
|
40
|
+
width: 960px;
|
|
41
|
+
max-width: calc(100% - 2em);
|
|
42
|
+
margin: auto;
|
|
43
|
+
padding: 3em 1em;
|
|
44
|
+
}
|
|
45
|
+
h1,
|
|
46
|
+
h2,
|
|
47
|
+
h3,
|
|
48
|
+
h4,
|
|
49
|
+
h5,
|
|
50
|
+
h6 {
|
|
51
|
+
margin: 0 0 0.5rem 0;
|
|
52
|
+
color: rgb(var(--black));
|
|
53
|
+
line-height: 1.2;
|
|
54
|
+
}
|
|
55
|
+
h1 {
|
|
56
|
+
font-size: 3.052em;
|
|
57
|
+
}
|
|
58
|
+
h2 {
|
|
59
|
+
font-size: 2.441em;
|
|
60
|
+
}
|
|
61
|
+
h3 {
|
|
62
|
+
font-size: 1.953em;
|
|
63
|
+
}
|
|
64
|
+
h4 {
|
|
65
|
+
font-size: 1.563em;
|
|
66
|
+
}
|
|
67
|
+
h5 {
|
|
68
|
+
font-size: 1.25em;
|
|
69
|
+
}
|
|
70
|
+
strong,
|
|
71
|
+
b {
|
|
72
|
+
font-weight: 700;
|
|
73
|
+
}
|
|
74
|
+
a {
|
|
75
|
+
color: var(--accent);
|
|
76
|
+
}
|
|
77
|
+
a:hover {
|
|
78
|
+
color: var(--accent);
|
|
79
|
+
}
|
|
80
|
+
p {
|
|
81
|
+
margin-bottom: 1em;
|
|
82
|
+
}
|
|
83
|
+
.prose p {
|
|
84
|
+
margin-bottom: 2em;
|
|
85
|
+
}
|
|
86
|
+
textarea {
|
|
87
|
+
width: 100%;
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
}
|
|
90
|
+
input {
|
|
91
|
+
font-size: 16px;
|
|
92
|
+
}
|
|
93
|
+
table {
|
|
94
|
+
width: 100%;
|
|
95
|
+
}
|
|
96
|
+
img {
|
|
97
|
+
max-width: 100%;
|
|
98
|
+
height: auto;
|
|
99
|
+
border-radius: 8px;
|
|
100
|
+
}
|
|
101
|
+
code {
|
|
102
|
+
padding: 2px 5px;
|
|
103
|
+
background-color: rgb(var(--gray-light));
|
|
104
|
+
border-radius: 2px;
|
|
105
|
+
}
|
|
106
|
+
pre {
|
|
107
|
+
padding: 1.5em;
|
|
108
|
+
border-radius: 8px;
|
|
109
|
+
}
|
|
110
|
+
pre > code {
|
|
111
|
+
all: unset;
|
|
112
|
+
}
|
|
113
|
+
blockquote {
|
|
114
|
+
border-left: 4px solid var(--accent);
|
|
115
|
+
padding: 0 0 0 20px;
|
|
116
|
+
margin: 0px;
|
|
117
|
+
font-size: 1.333em;
|
|
118
|
+
}
|
|
119
|
+
hr {
|
|
120
|
+
border: none;
|
|
121
|
+
border-top: 1px solid rgb(var(--gray-light));
|
|
122
|
+
}
|
|
123
|
+
@media (max-width: 720px) {
|
|
124
|
+
body {
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
}
|
|
127
|
+
main {
|
|
128
|
+
padding: 1em;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
footer {
|
|
132
|
+
padding: 2em 1em 6em 1em;
|
|
133
|
+
background: linear-gradient(var(--gray-gradient)) no-repeat;
|
|
134
|
+
color: rgb(var(--gray));
|
|
135
|
+
text-align: center;
|
|
136
|
+
}
|
|
137
|
+
.social-links {
|
|
138
|
+
display: flex;
|
|
139
|
+
justify-content: center;
|
|
140
|
+
gap: 1em;
|
|
141
|
+
margin-top: 1em;
|
|
142
|
+
}
|
|
143
|
+
.social-links a {
|
|
144
|
+
text-decoration: none;
|
|
145
|
+
color: rgb(var(--gray));
|
|
146
|
+
}
|
|
147
|
+
.social-links a:hover {
|
|
148
|
+
color: rgb(var(--gray-dark));
|
|
149
|
+
}
|
|
150
|
+
.sr-only {
|
|
151
|
+
border: 0;
|
|
152
|
+
padding: 0;
|
|
153
|
+
margin: 0;
|
|
154
|
+
position: absolute !important;
|
|
155
|
+
height: 1px;
|
|
156
|
+
width: 1px;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
clip: rect(1px 1px 1px 1px);
|
|
159
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
160
|
+
clip-path: inset(50%);
|
|
161
|
+
white-space: nowrap;
|
|
162
|
+
}
|
|
163
|
+
ul {
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-wrap: wrap;
|
|
166
|
+
gap: 2rem;
|
|
167
|
+
list-style-type: none;
|
|
168
|
+
margin: 0;
|
|
169
|
+
padding: 0;
|
|
170
|
+
}
|
|
171
|
+
ul li {
|
|
172
|
+
width: calc(50% - 1rem);
|
|
173
|
+
}
|
|
174
|
+
ul li * {
|
|
175
|
+
text-decoration: none;
|
|
176
|
+
transition: 0.2s ease;
|
|
177
|
+
}
|
|
178
|
+
ul li:first-child {
|
|
179
|
+
width: 100%;
|
|
180
|
+
margin-bottom: 1rem;
|
|
181
|
+
text-align: center;
|
|
182
|
+
}
|
|
183
|
+
ul li:first-child img {
|
|
184
|
+
width: 100%;
|
|
185
|
+
}
|
|
186
|
+
ul li:first-child .title {
|
|
187
|
+
font-size: 2.369rem;
|
|
188
|
+
}
|
|
189
|
+
ul li img {
|
|
190
|
+
margin-bottom: 0.5rem;
|
|
191
|
+
border-radius: 12px;
|
|
192
|
+
}
|
|
193
|
+
ul li a {
|
|
194
|
+
display: block;
|
|
195
|
+
}
|
|
196
|
+
.title {
|
|
197
|
+
margin: 0;
|
|
198
|
+
color: rgb(var(--black));
|
|
199
|
+
font: bold;
|
|
200
|
+
font-weight: bold;
|
|
201
|
+
line-height: 1;
|
|
202
|
+
display: inline;
|
|
203
|
+
}
|
|
204
|
+
.date {
|
|
205
|
+
margin: 0;
|
|
206
|
+
color: rgb(var(--gray));
|
|
207
|
+
font: normal;
|
|
208
|
+
line-height: normal;
|
|
209
|
+
display: inline;
|
|
210
|
+
}
|
|
211
|
+
.description {
|
|
212
|
+
margin: 0;
|
|
213
|
+
color: rgb(var(--black));
|
|
214
|
+
width: 720px;
|
|
215
|
+
display: -webkit-box;
|
|
216
|
+
-webkit-box-orient: vertical;
|
|
217
|
+
-webkit-line-clamp: 2;
|
|
218
|
+
line-clamp: 2;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
}
|
|
221
|
+
ul li a:hover span,
|
|
222
|
+
ul li a:hover .date {
|
|
223
|
+
color: rgb(var(--accent));
|
|
224
|
+
}
|
|
225
|
+
ul a:hover img {
|
|
226
|
+
box-shadow: var(--box-shadow);
|
|
227
|
+
}
|
|
228
|
+
@media (max-width: 720px) {
|
|
229
|
+
ul {
|
|
230
|
+
gap: 0.5em;
|
|
231
|
+
}
|
|
232
|
+
ul li {
|
|
233
|
+
width: 100%;
|
|
234
|
+
text-align: center;
|
|
235
|
+
}
|
|
236
|
+
ul li:first-child {
|
|
237
|
+
margin-bottom: 0;
|
|
238
|
+
}
|
|
239
|
+
ul li:first-child .title {
|
|
240
|
+
font-size: 1.563em;
|
|
241
|
+
}
|
|
242
|
+
ul li:first-child .description {
|
|
243
|
+
width: 100%;
|
|
244
|
+
}
|
|
245
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for configuring the StudioCMS Blog.
|
|
3
|
+
*/
|
|
4
|
+
export interface StudioCMSBlogOptions {
|
|
5
|
+
/**
|
|
6
|
+
* Enable sitemap generation
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
sitemap?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Inject routes
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
injectRoutes?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The configuration for the blog
|
|
17
|
+
*/
|
|
18
|
+
blog?: {
|
|
19
|
+
/**
|
|
20
|
+
* The title of the blog
|
|
21
|
+
*/
|
|
22
|
+
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Enable RSS feed
|
|
25
|
+
*/
|
|
26
|
+
enableRSS?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The route for the blog
|
|
29
|
+
* @default '/blog'
|
|
30
|
+
* @example '/news'
|
|
31
|
+
*/
|
|
32
|
+
route?: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
package/dist/types.js
ADDED
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@studiocms/blog",
|
|
3
|
+
"version": "0.1.0-beta.10",
|
|
4
|
+
"description": "Add a blog to your StudioCMS project with ease!",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Adam Matthiesen | Jacob Jenkins | Paul Valladares",
|
|
7
|
+
"url": "https://studiocms.dev"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/withstudiocms/studiocms.git",
|
|
12
|
+
"directory": "packages/studiocms_blog"
|
|
13
|
+
},
|
|
14
|
+
"contributors": [
|
|
15
|
+
"Adammatthiesen",
|
|
16
|
+
"jdtjenkins",
|
|
17
|
+
"dreyfus92"
|
|
18
|
+
],
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"astro",
|
|
22
|
+
"astrocms",
|
|
23
|
+
"astrodb",
|
|
24
|
+
"astrostudio",
|
|
25
|
+
"astro-integration",
|
|
26
|
+
"astro-studio",
|
|
27
|
+
"astro-studiocms",
|
|
28
|
+
"cms",
|
|
29
|
+
"studiocms",
|
|
30
|
+
"withastro",
|
|
31
|
+
"blog",
|
|
32
|
+
"studio-blog",
|
|
33
|
+
"astro-blog",
|
|
34
|
+
"astro-studio-blog",
|
|
35
|
+
"studiocms-blog",
|
|
36
|
+
"plugin",
|
|
37
|
+
"studiocms-plugin"
|
|
38
|
+
],
|
|
39
|
+
"homepage": "https://studiocms.dev",
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public",
|
|
42
|
+
"provenance": true
|
|
43
|
+
},
|
|
44
|
+
"sideEffects": false,
|
|
45
|
+
"files": [
|
|
46
|
+
"dist"
|
|
47
|
+
],
|
|
48
|
+
"exports": {
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./dist/index.d.ts",
|
|
51
|
+
"import": "./dist/index.js"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"type": "module",
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@astrojs/rss": "^4.0.11",
|
|
57
|
+
"astro-integration-kit": "^0.18"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/node": "^20.14.11"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"astro": "^5.4.0",
|
|
64
|
+
"vite": "^6.2.0",
|
|
65
|
+
"studiocms": "0.1.0-beta.10"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "build-scripts build 'src/**/*.{ts,css}'",
|
|
69
|
+
"dev": "build-scripts dev 'src/**/*.{ts,css}'"
|
|
70
|
+
}
|
|
71
|
+
}
|