Skip to content

Commit dace4ed

Browse files
committed
Fixups for customizations that broke in new version
1 parent 33d4c0e commit dace4ed

File tree

6 files changed

+107
-46
lines changed

6 files changed

+107
-46
lines changed

docs/.vuepress/client.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { defineClientConfig } from '@vuepress/client'
22
import '@docsearch/css'
3+
import Layout from "./layouts/Layout.vue";
4+
import NotFound from "./layouts/NotFound.vue";
35

46
declare const VERSION: string;
57
declare const VERSION_FULL: string;
@@ -11,6 +13,10 @@ declare const CLI_VERSION: string;
1113

1214

1315
export default defineClientConfig({
16+
layouts: {
17+
Layout,
18+
NotFound,
19+
},
1420
enhance({ app, router, siteData }) {
1521
Object.defineProperties(app.config.globalProperties, {
1622
$rundeckVersion: { get: () => VERSION },

docs/.vuepress/components/HomePageAnnounce.vue

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/.vuepress/components/SidebarAnnounce.vue

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/.vuepress/config.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { registerComponentsPlugin } from '@vuepress/plugin-register-components';
99
import { dateSorter } from "@vuepress/helper";
1010
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics';
1111
import { removePwaPlugin } from '@vuepress/plugin-remove-pwa';
12-
import { prismjsPlugin } from '@vuepress/plugin-prismjs';
1312

1413
// sidebars
1514
import sidebarAdmin from './sidebar-menus/administration'
@@ -97,7 +96,7 @@ export default defineUserConfig({
9796

9897
//Theme Config
9998
theme: hopeTheme({
100-
debug: true,
99+
debug: process.env.NODE_ENV === 'development',
101100
logo: '/images/RundeckbyPagerDuty.svg',
102101
repo: 'rundeck/docs',
103102
docsDir: 'docs',
@@ -322,22 +321,6 @@ export default defineUserConfig({
322321
{ custom: true },
323322
),
324323
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-
),
341324
},
342325
//Plugins Config
343326
plugins: [

docs/.vuepress/layouts/Layout.vue

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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>

docs/.vuepress/layouts/NotFound.vue

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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>

0 commit comments

Comments
 (0)