You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
@@ -76,10 +78,12 @@ Here's is an abbreviated version of the project structure. Certain config files
76
78
| ├── devii.md // this page!
77
79
├── whatever.md // every MD file in this directory becomes a blog post
78
80
├── components
81
+
| ├── BlogPost.tsx
79
82
| ├── Code.tsx
80
-
| ├── Markdown.tsx
81
-
| ├── Header.tsx
83
+
| ├── Footer.tsx
82
84
| ├── Header.tsx
85
+
| ├── Markdown.tsx
86
+
| ├── Meta.tsx
83
87
| ├── <various>
84
88
├── loader.ts // contains utility functions for loading/parsing Markdown
85
89
├── node_modules
@@ -113,10 +117,6 @@ Just add a Markdown file under `md/blog/` to create a new blog post:
113
117
2. Add in some basic Markdown content
114
118
3. Then go to `http://localhost:3000/blog/foo`. You should see the new post.
115
119
116
-
## Google Analytics
117
-
118
-
Just add your Google Analytics ID (e.g. 'UA-999999999-1') to `globals.ts` and Devii will automatically add the appropriate Google Analytics snippet to your site. Go to `/pages/_app.ts` to see how this works or customize this behavior.
119
-
120
120
## Frontmatter support
121
121
122
122
Every Markdown file can include a "frontmatter block" containing various metadata. Devii provides a `loadPost` utility that loads a Markdown file, parses it's frontmatter metadata, and returns a structured `PostData` object:
@@ -157,6 +157,10 @@ thumbnailPhoto: /brook.jpg
157
157
158
158
View `/loader.ts` to see how this works.
159
159
160
+
## Google Analytics
161
+
162
+
Just add your Google Analytics ID (e.g. 'UA-999999999-1') to `globals.ts` and Devii will automatically add the appropriate Google Analytics snippet to your site. Go to `/pages/_app.ts` to see how this works or customize this behavior.
163
+
160
164
## Medium-inspired design
161
165
162
166
The Markdown renderer (`Markdown.tsx`) provides a default style inspired by Medium. Just modify the CSS in `Markdown.tsx` to customize the design to your liking.
0 commit comments