my blog https://overreacted.io

Add smartypants

+156 -3
+2
app/[slug]/page.js
··· 3 3 import { MDXRemote } from "next-mdx-remote/rsc"; 4 4 import Link from "../Link"; 5 5 import { sans } from "../fonts"; 6 + import remarkSmartpants from "remark-smartypants"; 6 7 import rehypePrettyCode from "rehype-pretty-code"; 7 8 import overnight from "overnight/themes/Overnight-Slumber.json"; 8 9 import "./markdown.css"; ··· 50 51 }} 51 52 options={{ 52 53 mdxOptions: { 54 + remarkPlugins: [remarkSmartpants], 53 55 rehypePlugins: [ 54 56 [ 55 57 rehypePrettyCode,
+2 -2
app/feed.js
··· 7 7 author: { 8 8 name: "Dan Abramov", 9 9 email: "dan.abramov@gmail.com", 10 - link: site_url 10 + link: site_url, 11 11 }, 12 12 description: metadata.description, 13 13 favicon: `${site_url}/icon.png`, ··· 32 32 }); 33 33 } 34 34 35 - return feed 35 + return feed; 36 36 }
+1 -1
app/page.js
··· 35 35 } 36 36 37 37 export default async function Home() { 38 - const posts = await getPosts() 38 + const posts = await getPosts(); 39 39 return ( 40 40 <div className="relative -top-[10px] flex flex-col gap-8"> 41 41 {posts.map((post) => (
+150
package-lock.json
··· 19 19 "react": "^18", 20 20 "react-dom": "^18", 21 21 "rehype-pretty-code": "^0.10.2", 22 + "remark-smartypants": "^2.0.0", 22 23 "shiki": "^0.14.5", 23 24 "ws": "^8.14.2" 24 25 }, ··· 978 979 "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.33.tgz", 979 980 "integrity": "sha512-AuHIyzR5Hea7ij0P9q7vx7xu4z0C28ucwjAZC0ja7JhINyCnOw8/DnvAPQQ9TfOlCtZAmCERKQX9+o1mgQhuOQ==" 980 981 }, 982 + "node_modules/@types/nlcst": { 983 + "version": "1.0.4", 984 + "resolved": "https://registry.npmjs.org/@types/nlcst/-/nlcst-1.0.4.tgz", 985 + "integrity": "sha512-ABoYdNQ/kBSsLvZAekMhIPMQ3YUZvavStpKYs7BjLLuKVmIMA0LUgZ7b54zzuWJRbHF80v1cNf4r90Vd6eMQDg==", 986 + "dependencies": { 987 + "@types/unist": "^2" 988 + } 989 + }, 981 990 "node_modules/@types/prop-types": { 982 991 "version": "15.7.9", 983 992 "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz", ··· 1242 1251 }, 1243 1252 "funding": { 1244 1253 "url": "https://github.com/sponsors/ljharb" 1254 + } 1255 + }, 1256 + "node_modules/array-iterate": { 1257 + "version": "2.0.1", 1258 + "resolved": "https://registry.npmjs.org/array-iterate/-/array-iterate-2.0.1.tgz", 1259 + "integrity": "sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==", 1260 + "funding": { 1261 + "type": "github", 1262 + "url": "https://github.com/sponsors/wooorm" 1245 1263 } 1246 1264 }, 1247 1265 "node_modules/array-union": { ··· 6867 6885 "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 6868 6886 "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" 6869 6887 }, 6888 + "node_modules/nlcst-to-string": { 6889 + "version": "3.1.1", 6890 + "resolved": "https://registry.npmjs.org/nlcst-to-string/-/nlcst-to-string-3.1.1.tgz", 6891 + "integrity": "sha512-63mVyqaqt0cmn2VcI2aH6kxe1rLAmSROqHMA0i4qqg1tidkfExgpb0FGMikMCn86mw5dFtBtEANfmSSK7TjNHw==", 6892 + "dependencies": { 6893 + "@types/nlcst": "^1.0.0" 6894 + }, 6895 + "funding": { 6896 + "type": "opencollective", 6897 + "url": "https://opencollective.com/unified" 6898 + } 6899 + }, 6870 6900 "node_modules/node-releases": { 6871 6901 "version": "2.0.13", 6872 6902 "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", ··· 7287 7317 }, 7288 7318 "engines": { 7289 7319 "node": ">=4" 7320 + } 7321 + }, 7322 + "node_modules/parse-latin": { 7323 + "version": "5.0.1", 7324 + "resolved": "https://registry.npmjs.org/parse-latin/-/parse-latin-5.0.1.tgz", 7325 + "integrity": "sha512-b/K8ExXaWC9t34kKeDV8kGXBkXZ1HCSAZRYE7HR14eA1GlXX5L8iWhs8USJNhQU9q5ci413jCKF0gOyovvyRBg==", 7326 + "dependencies": { 7327 + "nlcst-to-string": "^3.0.0", 7328 + "unist-util-modify-children": "^3.0.0", 7329 + "unist-util-visit-children": "^2.0.0" 7330 + }, 7331 + "funding": { 7332 + "type": "github", 7333 + "url": "https://github.com/sponsors/wooorm" 7290 7334 } 7291 7335 }, 7292 7336 "node_modules/parse-numeric-range": { ··· 7891 7935 "url": "https://opencollective.com/unified" 7892 7936 } 7893 7937 }, 7938 + "node_modules/remark-smartypants": { 7939 + "version": "2.0.0", 7940 + "resolved": "https://registry.npmjs.org/remark-smartypants/-/remark-smartypants-2.0.0.tgz", 7941 + "integrity": "sha512-Rc0VDmr/yhnMQIz8n2ACYXlfw/P/XZev884QU1I5u+5DgJls32o97Vc1RbK3pfumLsJomS2yy8eT4Fxj/2MDVA==", 7942 + "dependencies": { 7943 + "retext": "^8.1.0", 7944 + "retext-smartypants": "^5.1.0", 7945 + "unist-util-visit": "^4.1.0" 7946 + }, 7947 + "engines": { 7948 + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" 7949 + } 7950 + }, 7894 7951 "node_modules/resolve": { 7895 7952 "version": "1.22.8", 7896 7953 "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", ··· 7925 7982 "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" 7926 7983 } 7927 7984 }, 7985 + "node_modules/retext": { 7986 + "version": "8.1.0", 7987 + "resolved": "https://registry.npmjs.org/retext/-/retext-8.1.0.tgz", 7988 + "integrity": "sha512-N9/Kq7YTn6ZpzfiGW45WfEGJqFf1IM1q8OsRa1CGzIebCJBNCANDRmOrholiDRGKo/We7ofKR4SEvcGAWEMD3Q==", 7989 + "dependencies": { 7990 + "@types/nlcst": "^1.0.0", 7991 + "retext-latin": "^3.0.0", 7992 + "retext-stringify": "^3.0.0", 7993 + "unified": "^10.0.0" 7994 + }, 7995 + "funding": { 7996 + "type": "opencollective", 7997 + "url": "https://opencollective.com/unified" 7998 + } 7999 + }, 8000 + "node_modules/retext-latin": { 8001 + "version": "3.1.0", 8002 + "resolved": "https://registry.npmjs.org/retext-latin/-/retext-latin-3.1.0.tgz", 8003 + "integrity": "sha512-5MrD1tuebzO8ppsja5eEu+ZbBeUNCjoEarn70tkXOS7Bdsdf6tNahsv2bY0Z8VooFF6cw7/6S+d3yI/TMlMVVQ==", 8004 + "dependencies": { 8005 + "@types/nlcst": "^1.0.0", 8006 + "parse-latin": "^5.0.0", 8007 + "unherit": "^3.0.0", 8008 + "unified": "^10.0.0" 8009 + }, 8010 + "funding": { 8011 + "type": "opencollective", 8012 + "url": "https://opencollective.com/unified" 8013 + } 8014 + }, 8015 + "node_modules/retext-smartypants": { 8016 + "version": "5.2.0", 8017 + "resolved": "https://registry.npmjs.org/retext-smartypants/-/retext-smartypants-5.2.0.tgz", 8018 + "integrity": "sha512-Do8oM+SsjrbzT2UNIKgheP0hgUQTDDQYyZaIY3kfq0pdFzoPk+ZClYJ+OERNXveog4xf1pZL4PfRxNoVL7a/jw==", 8019 + "dependencies": { 8020 + "@types/nlcst": "^1.0.0", 8021 + "nlcst-to-string": "^3.0.0", 8022 + "unified": "^10.0.0", 8023 + "unist-util-visit": "^4.0.0" 8024 + }, 8025 + "funding": { 8026 + "type": "opencollective", 8027 + "url": "https://opencollective.com/unified" 8028 + } 8029 + }, 8030 + "node_modules/retext-stringify": { 8031 + "version": "3.1.0", 8032 + "resolved": "https://registry.npmjs.org/retext-stringify/-/retext-stringify-3.1.0.tgz", 8033 + "integrity": "sha512-767TLOaoXFXyOnjx/EggXlb37ZD2u4P1n0GJqVdpipqACsQP+20W+BNpMYrlJkq7hxffnFk+jc6mAK9qrbuB8w==", 8034 + "dependencies": { 8035 + "@types/nlcst": "^1.0.0", 8036 + "nlcst-to-string": "^3.0.0", 8037 + "unified": "^10.0.0" 8038 + }, 8039 + "funding": { 8040 + "type": "opencollective", 8041 + "url": "https://opencollective.com/unified" 8042 + } 8043 + }, 7928 8044 "node_modules/reusify": { 7929 8045 "version": "1.0.4", 7930 8046 "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", ··· 8699 8815 "url": "https://github.com/sponsors/ljharb" 8700 8816 } 8701 8817 }, 8818 + "node_modules/unherit": { 8819 + "version": "3.0.1", 8820 + "resolved": "https://registry.npmjs.org/unherit/-/unherit-3.0.1.tgz", 8821 + "integrity": "sha512-akOOQ/Yln8a2sgcLj4U0Jmx0R5jpIg2IUyRrWOzmEbjBtGzBdHtSeFKgoEcoH4KYIG/Pb8GQ/BwtYm0GCq1Sqg==", 8822 + "funding": { 8823 + "type": "github", 8824 + "url": "https://github.com/sponsors/wooorm" 8825 + } 8826 + }, 8702 8827 "node_modules/unified": { 8703 8828 "version": "10.1.2", 8704 8829 "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", ··· 8738 8863 "url": "https://opencollective.com/unified" 8739 8864 } 8740 8865 }, 8866 + "node_modules/unist-util-modify-children": { 8867 + "version": "3.1.1", 8868 + "resolved": "https://registry.npmjs.org/unist-util-modify-children/-/unist-util-modify-children-3.1.1.tgz", 8869 + "integrity": "sha512-yXi4Lm+TG5VG+qvokP6tpnk+r1EPwyYL04JWDxLvgvPV40jANh7nm3udk65OOWquvbMDe+PL9+LmkxDpTv/7BA==", 8870 + "dependencies": { 8871 + "@types/unist": "^2.0.0", 8872 + "array-iterate": "^2.0.0" 8873 + }, 8874 + "funding": { 8875 + "type": "opencollective", 8876 + "url": "https://opencollective.com/unified" 8877 + } 8878 + }, 8741 8879 "node_modules/unist-util-position-from-estree": { 8742 8880 "version": "1.1.2", 8743 8881 "resolved": "https://registry.npmjs.org/unist-util-position-from-estree/-/unist-util-position-from-estree-1.1.2.tgz", ··· 8783 8921 "@types/unist": "^2.0.0", 8784 8922 "unist-util-is": "^5.0.0", 8785 8923 "unist-util-visit-parents": "^5.1.1" 8924 + }, 8925 + "funding": { 8926 + "type": "opencollective", 8927 + "url": "https://opencollective.com/unified" 8928 + } 8929 + }, 8930 + "node_modules/unist-util-visit-children": { 8931 + "version": "2.0.2", 8932 + "resolved": "https://registry.npmjs.org/unist-util-visit-children/-/unist-util-visit-children-2.0.2.tgz", 8933 + "integrity": "sha512-+LWpMFqyUwLGpsQxpumsQ9o9DG2VGLFrpz+rpVXYIEdPy57GSy5HioC0g3bg/8WP9oCLlapQtklOzQ8uLS496Q==", 8934 + "dependencies": { 8935 + "@types/unist": "^2.0.0" 8786 8936 }, 8787 8937 "funding": { 8788 8938 "type": "opencollective",
+1
package.json
··· 22 22 "react": "^18", 23 23 "react-dom": "^18", 24 24 "rehype-pretty-code": "^0.10.2", 25 + "remark-smartypants": "^2.0.0", 25 26 "shiki": "^0.14.5", 26 27 "ws": "^8.14.2" 27 28 },