File tree Expand file tree Collapse file tree
java/com/raysmond/blog/services
resources/templates/posts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ public List<Post> getArchivePosts() {
114114 Post cachedPost = new Post ();
115115 cachedPost .setId (post .getId ());
116116 cachedPost .setTitle (post .getTitle ());
117+ cachedPost .setPermalink (post .getPermalink ());
117118 cachedPost .setCreatedAt (post .getCreatedAt ());
118119 cachedPosts .add (cachedPost );
119120 }
Original file line number Diff line number Diff line change @@ -19,5 +19,6 @@ block content
1919 span.month
2020 = viewHelper .getMonthAndDay (post .getCreatedAt ())
2121 span ·
22- a( href ="/posts/#{post .getId ()} " ) #{post .getTitle ()}
22+ a( href ="/posts/#{post .getPermalink () == null ? post .getId () : post .getPermalink ()} " )
23+ = post .getTitle ()
2324
Original file line number Diff line number Diff line change 55 .meta
66 .time #{viewHelper .getFormattedDate (post .getCreatedAt ())}
77 h2.title
8- a( href ="/posts/#{post .getId ()} " )
8+ a( href ="/posts/#{post .getPermalink () == null ? post . getId () : post . getPermalink ()} " )
99 = post .getTitle ()
1010
1111 .content
You can’t perform that action at this time.
0 commit comments