Skip to content

Commit e306d2d

Browse files
committed
Finish migrating md -> mdx
1 parent c373a9e commit e306d2d

11 files changed

+138
-180
lines changed

.astro/types.d.ts

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -236,20 +236,20 @@ declare module 'astro:content' {
236236
collection: "post";
237237
data: InferEntrySchema<"post">
238238
} & { render(): Render[".mdx"] };
239-
"deploying-wagtail.md": {
240-
id: "deploying-wagtail.md";
239+
"deploying-wagtail.mdx": {
240+
id: "deploying-wagtail.mdx";
241241
slug: "deploying-wagtail";
242242
body: string;
243243
collection: "post";
244244
data: InferEntrySchema<"post">
245-
} & { render(): Render[".md"] };
246-
"developing-wagtail.md": {
247-
id: "developing-wagtail.md";
245+
} & { render(): Render[".mdx"] };
246+
"developing-wagtail.mdx": {
247+
id: "developing-wagtail.mdx";
248248
slug: "developing-wagtail";
249249
body: string;
250250
collection: "post";
251251
data: InferEntrySchema<"post">
252-
} & { render(): Render[".md"] };
252+
} & { render(): Render[".mdx"] };
253253
"dropout.mdx": {
254254
id: "dropout.mdx";
255255
slug: "dropout";
@@ -285,13 +285,13 @@ declare module 'astro:content' {
285285
collection: "post";
286286
data: InferEntrySchema<"post">
287287
} & { render(): Render[".mdx"] };
288-
"gaussian-anomaly-detection.md": {
289-
id: "gaussian-anomaly-detection.md";
288+
"gaussian-anomaly-detection.mdx": {
289+
id: "gaussian-anomaly-detection.mdx";
290290
slug: "gaussian-anomaly-detection";
291291
body: string;
292292
collection: "post";
293293
data: InferEntrySchema<"post">
294-
} & { render(): Render[".md"] };
294+
} & { render(): Render[".mdx"] };
295295
"gibbs-sampling.mdx": {
296296
id: "gibbs-sampling.mdx";
297297
slug: "gibbs-sampling";
@@ -397,13 +397,13 @@ declare module 'astro:content' {
397397
collection: "post";
398398
data: InferEntrySchema<"post">
399399
} & { render(): Render[".mdx"] };
400-
"metropolis-hastings.md": {
401-
id: "metropolis-hastings.md";
400+
"metropolis-hastings.mdx": {
401+
id: "metropolis-hastings.mdx";
402402
slug: "metropolis-hastings";
403403
body: string;
404404
collection: "post";
405405
data: InferEntrySchema<"post">
406-
} & { render(): Render[".md"] };
406+
} & { render(): Render[".mdx"] };
407407
"minkowski-dirichlet.mdx": {
408408
id: "minkowski-dirichlet.mdx";
409409
slug: "minkowski-dirichlet";
@@ -460,48 +460,48 @@ declare module 'astro:content' {
460460
collection: "post";
461461
data: InferEntrySchema<"post">
462462
} & { render(): Render[".mdx"] };
463-
"rejection-sampling.md": {
464-
id: "rejection-sampling.md";
463+
"rejection-sampling.mdx": {
464+
id: "rejection-sampling.mdx";
465465
slug: "rejection-sampling";
466466
body: string;
467467
collection: "post";
468468
data: InferEntrySchema<"post">
469-
} & { render(): Render[".md"] };
469+
} & { render(): Render[".mdx"] };
470470
"residual-net.mdx": {
471471
id: "residual-net.mdx";
472472
slug: "residual-net";
473473
body: string;
474474
collection: "post";
475475
data: InferEntrySchema<"post">
476476
} & { render(): Render[".mdx"] };
477-
"scrapy-long-running.md": {
478-
id: "scrapy-long-running.md";
477+
"scrapy-long-running.mdx": {
478+
id: "scrapy-long-running.mdx";
479479
slug: "scrapy-long-running";
480480
body: string;
481481
collection: "post";
482482
data: InferEntrySchema<"post">
483-
} & { render(): Render[".md"] };
484-
"slice-sampling.md": {
485-
id: "slice-sampling.md";
483+
} & { render(): Render[".mdx"] };
484+
"slice-sampling.mdx": {
485+
id: "slice-sampling.mdx";
486486
slug: "slice-sampling";
487487
body: string;
488488
collection: "post";
489489
data: InferEntrySchema<"post">
490-
} & { render(): Render[".md"] };
490+
} & { render(): Render[".mdx"] };
491491
"theano-pde.mdx": {
492492
id: "theano-pde.mdx";
493493
slug: "theano-pde";
494494
body: string;
495495
collection: "post";
496496
data: InferEntrySchema<"post">
497497
} & { render(): Render[".mdx"] };
498-
"twitter-auth-flask.md": {
499-
id: "twitter-auth-flask.md";
498+
"twitter-auth-flask.mdx": {
499+
id: "twitter-auth-flask.mdx";
500500
slug: "twitter-auth-flask";
501501
body: string;
502502
collection: "post";
503503
data: InferEntrySchema<"post">
504-
} & { render(): Render[".md"] };
504+
} & { render(): Render[".mdx"] };
505505
"vae-pytorch.mdx": {
506506
id: "vae-pytorch.mdx";
507507
slug: "vae-pytorch";
@@ -523,13 +523,13 @@ declare module 'astro:content' {
523523
collection: "post";
524524
data: InferEntrySchema<"post">
525525
} & { render(): Render[".mdx"] };
526-
"wagtail-dev-env.md": {
527-
id: "wagtail-dev-env.md";
526+
"wagtail-dev-env.mdx": {
527+
id: "wagtail-dev-env.mdx";
528528
slug: "wagtail-dev-env";
529529
body: string;
530530
collection: "post";
531531
data: InferEntrySchema<"post">
532-
} & { render(): Render[".md"] };
532+
} & { render(): Render[".mdx"] };
533533
"wasserstein-gan.mdx": {
534534
id: "wasserstein-gan.mdx";
535535
slug: "wasserstein-gan";

bun.lockb

0 Bytes
Binary file not shown.
Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Ok, let's get started. Oh, before that, I'll make some disclaimer. Because this
1111

1212
First, we need to prepare our system. For this, I use cloud VPS. After investigated some of cloud providers out there, I chose DigitalOcean because it's so simple and so cheap. For the basic tier, you'll be charged just 5 bucks a month. Granted there are more powerful cloud provider out there, with Amazon AWS being the prime example. Unfortunately it doesn't have the simplicity DigitalOcean has. AWS's pricing is so convoluted and sophisticated I feel, and also it's directed to power user like devops guys.
1313

14-
To prepare the production environment, I'm strongly urge you to follow this guide: <https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-14-04>.
14+
To prepare the production environment, I'm strongly urge you to follow this guide: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-14-04.
1515

1616
When everything (nginx, uwsgi) is ready, we can begin to really deploy our blog in the cloud. Here's the workflow that I use whenever I made some code change to this blog:
1717

@@ -31,17 +31,15 @@ For number 7, we need to restart uwsgi because when uwsgi started, it will "comp
3131
We already know that Django has multiple setting files: base.py, dev.py, and production.py. In our production environment we surely want to use production.py file to override our base.py. To make our life easier, we can put a script to automatically pick which setting file we have to use depending on what environment we are in. To do this, we'll edit our `__init__.py` inside the settings directory.
3232

3333
```python
34-
3534
# settings/**init**.py
36-
3735
import os
3836

3937
ENV = os.getenv('MYBLOG_ENV', 'dev')
4038

4139
if ENV == 'dev':
42-
from .dev import *
40+
from .dev import *
4341
elif ENV == 'prod':
44-
from .production import *
42+
from .production import *
4543
```
4644

4745
First, we find an environment variable named 'MYBLOG_ENV' in our operating system, with 'dev' as the default value. If that environment variable value is 'dev', we use dev.py, otherwise we use production.py. As simple as that. To create the environment variable, there are two ways, first by add it directly to the system, or put it in uwsgi. I will go with the second option because, just like the use of virtualenv, it aligns with our spirit of software environment isolation. This this line to your uwsgi config file, and restart uwsgi to apply the change:
@@ -56,8 +54,8 @@ Now, our Wagtail app in the production server will always use production.py, and
5654

5755
I spent a lot of time trying to figure out how to deploy this blog. I'd say most of my time creating this blog is here, in the deployment stage, debugging things that didn't work. Here's the list of some problems that I encountered while trying to make this blog up and running:
5856

59-
_Error 400:_ Check your setting, make sure you've added your domain/IP in "allowed*sites" field
60-
\_Error 500:* Don't forget to do all of the above steps! I encountered this problem because I didn't compress my static files
57+
_Error 400:_ Check your setting, make sure you've added your domain/IP in `allowed_sites` field
58+
_Error 500:_ Don't forget to do all of the above steps! I encountered this problem because I didn't compress my static files
6159
Cannot upload image: The root cause is you don't have libjpeg and libpng in your machine
6260

6361
```bash

0 commit comments

Comments
 (0)