File tree Expand file tree Collapse file tree 6 files changed +107
-46
lines changed Expand file tree Collapse file tree 6 files changed +107
-46
lines changed Original file line number Diff line number Diff line change 1
1
import { defineClientConfig } from '@vuepress/client'
2
2
import '@docsearch/css'
3
+ import Layout from "./layouts/Layout.vue" ;
4
+ import NotFound from "./layouts/NotFound.vue" ;
3
5
4
6
declare const VERSION : string ;
5
7
declare const VERSION_FULL : string ;
@@ -11,6 +13,10 @@ declare const CLI_VERSION: string;
11
13
12
14
13
15
export default defineClientConfig ( {
16
+ layouts : {
17
+ Layout,
18
+ NotFound,
19
+ } ,
14
20
enhance ( { app, router, siteData } ) {
15
21
Object . defineProperties ( app . config . globalProperties , {
16
22
$rundeckVersion : { get : ( ) => VERSION } ,
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
9
9
import { dateSorter } from "@vuepress/helper" ;
10
10
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics' ;
11
11
import { removePwaPlugin } from '@vuepress/plugin-remove-pwa' ;
12
- import { prismjsPlugin } from '@vuepress/plugin-prismjs' ;
13
12
14
13
// sidebars
15
14
import sidebarAdmin from './sidebar-menus/administration'
@@ -97,7 +96,7 @@ export default defineUserConfig({
97
96
98
97
//Theme Config
99
98
theme : hopeTheme ( {
100
- debug : true ,
99
+ debug : process . env . NODE_ENV === 'development' ,
101
100
logo : '/images/RundeckbyPagerDuty.svg' ,
102
101
repo : 'rundeck/docs' ,
103
102
docsDir : 'docs' ,
@@ -322,22 +321,6 @@ export default defineUserConfig({
322
321
{ custom : true } ,
323
322
) ,
324
323
alias : {
325
- "@theme-hope/components/HomePage" : path . resolve (
326
- __dirname ,
327
- "./components/HomePageAnnounce.vue" ,
328
- ) ,
329
- "@theme-hope/modules/sidebar/components/Sidebar" : path . resolve (
330
- __dirname ,
331
- "./components/SidebarAnnounce.vue" ,
332
- ) ,
333
- "@theme-hope/layouts/NotFound" : path . resolve (
334
- __dirname ,
335
- "./components/notFoundCustom.vue" ,
336
- ) ,
337
- "@theme-hope/modules/navbar/components/Navbar" : path . resolve (
338
- __dirname ,
339
- "./components/CustomNavBar.vue" ,
340
- ) ,
341
324
} ,
342
325
//Plugins Config
343
326
plugins : [
Original file line number Diff line number Diff line change
1
+ <script setup lang="ts">
2
+ import { Layout } from " vuepress-theme-hope/client" ;
3
+ import { usePageData } from " @vuepress/client" ;
4
+ import { computed } from " vue" ;
5
+
6
+ const pageData = usePageData ();
7
+ const isHomePage = computed (() => pageData .value .frontmatter .home === true );
8
+ </script >
9
+
10
+ <template >
11
+ <Layout >
12
+ <!-- Adding announcement before content (works on all pages) -->
13
+ <template #heroAfter >
14
+ <div v-if =" isHomePage" class =" homepage-announce" >
15
+ <p >
16
+ <b >The <i >resources.rundeck.com</i > site has been consolidated here! Check our our <a href =' /learning/solutions/' >Solutions</a > page for Automation use cases. </b >
17
+ </p >
18
+ </div >
19
+ </template >
20
+
21
+ <!-- Adding announcement to sidebar -->
22
+ <template #sidebarTop >
23
+ <div v-if =" !isHomePage" class =" sidebar-announce" >
24
+ <p >
25
+ <b >Process Automation On Prem</b > is now <b >Runbook Automation Self-Hosted</b >
26
+ </p >
27
+ </div >
28
+ </template >
29
+ </Layout >
30
+ </template >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <NotFound >
3
+ <template #default >
4
+ <div class =" custom-404-content" >
5
+ <div class =" not-found-container" >
6
+ <div class =" not-found-hint" >
7
+ <p class =" error-code" >404</p >
8
+ <h1 class =" error-title" >Page not found</h1 >
9
+ <p >You've landed on a link that doesn't exist. Try the Search!</p >
10
+ </div >
11
+ </div >
12
+ </div >
13
+ </template >
14
+ </NotFound >
15
+ </template >
16
+
17
+ <script setup lang="ts">
18
+ import { NotFound } from " vuepress-theme-hope/client" ;
19
+ import { onMounted } from ' vue' ;
20
+
21
+ onMounted (() => {
22
+ if (typeof gtag !== ' undefined' ) {
23
+ gtag (' event' , ' 404_error' , {
24
+ ' app_name' : ' Rundeck_Docs' ,
25
+ ' screen_name' : ' 404 Error'
26
+ });
27
+ }
28
+ });
29
+ </script >
30
+
31
+ <style scoped>
32
+ .custom-404-content {
33
+ width : 100% ;
34
+ min-height : 50vh ;
35
+ display : flex ;
36
+ justify-content : center ;
37
+ align-items : center ;
38
+ padding : 2rem 0 ;
39
+ }
40
+
41
+ .not-found-container {
42
+ max-width : 600px ;
43
+ text-align : center ;
44
+ padding : 3rem 2rem ;
45
+ background-color : white ;
46
+ border-radius : 12px ;
47
+ box-shadow : 0 4px 20px rgba (0 ,0 ,0 ,0.1 );
48
+ }
49
+
50
+ .error-code {
51
+ font-size : 6rem ;
52
+ font-weight : bold ;
53
+ color : #999 ;
54
+ margin : 0 0 1rem 0 ;
55
+ line-height : 1 ;
56
+ }
57
+
58
+ .error-title {
59
+ font-size : 2rem ;
60
+ margin : 1rem 0 ;
61
+ color : #333 ;
62
+ font-weight : 600 ;
63
+ }
64
+
65
+ .not-found-hint p :last-child {
66
+ font-size : 1.1rem ;
67
+ color : #666 ;
68
+ margin : 1.5rem 0 0 0 ;
69
+ }
70
+ </style >
You can’t perform that action at this time.
0 commit comments