File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import type { MetadataRoute } from "next" ;
2+
3+ export default function manifest ( ) : MetadataRoute . Manifest {
4+ return {
5+ name : "Jacob Moy" ,
6+ short_name : "Jacob Moy" ,
7+ description : "Jacob Moy's portfolio website." ,
8+ start_url : "/" ,
9+ display : "standalone" ,
10+ background_color : "#fff" ,
11+ theme_color : "#fff" ,
12+ icons : [
13+ {
14+ src : "/favicon.ico" ,
15+ sizes : "any" ,
16+ type : "image/x-icon" ,
17+ } ,
18+ ] ,
19+ } ;
20+ }
Original file line number Diff line number Diff line change 1+ import type { MetadataRoute } from "next" ;
2+
3+ export default function robots ( ) : MetadataRoute . Robots {
4+ return {
5+ rules : {
6+ userAgent : "*" ,
7+ allow : "/" ,
8+ disallow : "/private/" ,
9+ } ,
10+ sitemap : "https://jacobmoy.com/sitemap.xml" ,
11+ } ;
12+ }
Original file line number Diff line number Diff line change 1+ import type { MetadataRoute } from "next" ;
2+ import { posts } from "@/utils/posts" ;
3+
4+ export default function sitemap ( ) : MetadataRoute . Sitemap {
5+ const allPosts = posts . getPosts ( ) ;
6+
7+ const blogs = allPosts . map ( ( post ) => ( {
8+ url : `https://jacobmoy.com/blog/${ post . slug } ` ,
9+ lastModified : new Date ( post . date ) . toISOString ( ) . split ( "T" ) [ 0 ] ,
10+ } ) ) ;
11+
12+ const routes = [ "" , "/blog" , "/quick-links" ] . map ( ( route ) => ( {
13+ url : `https://jacobmoy.com${ route } ` ,
14+ lastModified : new Date ( ) . toISOString ( ) . split ( "T" ) [ 0 ] ,
15+ } ) ) ;
16+
17+ return [ ...routes , ...blogs ] ;
18+ }
You can’t perform that action at this time.
0 commit comments