Skip to content

Commit 36a4c11

Browse files
Merge pull request #129 from anveshmuppeda/dev
Adding Additional Features to the Website
2 parents 99142f3 + 4ff0aa3 commit 36a4c11

File tree

5 files changed

+43
-20
lines changed

5 files changed

+43
-20
lines changed

k8swebsite.config.ts

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import type * as Preset from '@docusaurus/preset-classic';
44

55
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
66

7+
const { version } = require('./package.json'); // Import version from package.json
8+
79
const config: Config = {
810
// Update the title and tagline
911
title: 'Kubernetes Hands-On Guides',
@@ -54,16 +56,11 @@ const config: Config = {
5456
// Remove this to remove the "edit this page" links.
5557
editUrl:
5658
'https://github.com/anveshmuppeda/kubernetes/tree/dev/',
57-
// Useful options to enforce blogging best practices
59+
// Useful options to enforce blogging best practices
5860
onInlineTags: 'warn',
5961
onInlineAuthors: 'warn',
6062
onUntruncatedBlogPosts: 'warn',
6163
},
62-
// commands: {
63-
// sidebarPath: './sidebars.ts',
64-
// editUrl:
65-
// '',
66-
// },
6764
theme: {
6865
customCss: './src/css/custom.css',
6966
},
@@ -93,10 +90,17 @@ const config: Config = {
9390
],
9491

9592
themeConfig: {
96-
// Replace with your project's social card
93+
announcementBar: {
94+
id: 'announcement', // Unique ID for the announcement
95+
content:
96+
'⭐️ If you like this project, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/anveshmuppeda/kubernetes">GitHub</a> and follow me on <a target="_blank" rel="noopener noreferrer" href="https://www.linkedin.com/in/anveshmuppeda/">LinkedIn</a> ⭐️',
97+
backgroundColor: '#fafbfc', // Background color
98+
textColor: '#091E42', // Text color
99+
isCloseable: true, // Allow users to close the bar
100+
},
97101
image: 'img/docusaurus-social-card.jpg',
98102
navbar: {
99-
title: 'Kubernetes Guides',
103+
title: 'Kubernetes Guides', // Keep the title as is
100104
logo: {
101105
alt: 'Kubernetes Logo',
102106
src: 'img/logo.png',
@@ -123,6 +127,12 @@ const config: Config = {
123127
type: 'search', // Add the search bar to the navbar
124128
position: 'right',
125129
},
130+
{
131+
type: 'html', // Use a custom component for the version number
132+
position: 'right', // Place it after the search bar
133+
value: `<a href="https://github.com/anveshmuppeda/kubernetes/releases/tag/${version}" target="_blank" rel="noopener noreferrer" class="navbar-version">Version ${version}</a>`, // Use a link with a custom class
134+
},
135+
126136
],
127137
},
128138
footer: {
@@ -138,7 +148,7 @@ const config: Config = {
138148
{
139149
label: 'Commands',
140150
to: '/commands/intro',
141-
}
151+
},
142152
],
143153
},
144154
{

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Kubernetes Hands-on Labs",
3-
"version": "0.0.0",
3+
"version": "v1.5.1",
44
"private": true,
55
"scripts": {
66
"start": "docusaurus start --config k8swebsite.config.ts",

src/components/HomepageFeatures/index.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ type FeatureItem = {
77
title: string;
88
Svg: React.ComponentType<React.ComponentProps<'svg'>>;
99
description: ReactNode;
10+
link: string; // Add a link property
1011
};
1112

1213
const FeatureList: FeatureItem[] = [
@@ -18,6 +19,7 @@ const FeatureList: FeatureItem[] = [
1819
Learn Kubernetes with detailed, step-by-step tutorials designed for beginners and advanced users alike. Start mastering Kubernetes today!
1920
</>
2021
),
22+
link: '/kubernetes/docs/intro', // Add a specific link
2123
},
2224
{
2325
title: 'Comprehensive Blogs',
@@ -27,6 +29,7 @@ const FeatureList: FeatureItem[] = [
2729
Stay updated with the latest Kubernetes trends, tips, and best practices through our regularly updated blogs.
2830
</>
2931
),
32+
link: '/kubernetes/blog', // Add a specific link
3033
},
3134
{
3235
title: 'Kubernetes Tools & Commands',
@@ -36,17 +39,23 @@ const FeatureList: FeatureItem[] = [
3639
Explore essential Kubernetes tools and commands to simplify your workflow and manage your clusters effectively.
3740
</>
3841
),
42+
link: '/kubernetes/commands/intro', // Add a specific link
3943
},
4044
];
4145

42-
function Feature({title, Svg, description}: FeatureItem) {
46+
function Feature({title, Svg, description, link}: FeatureItem) {
4347
return (
4448
<div className={clsx('col col--4')}>
4549
<div className="text--center">
46-
<Svg className={styles.featureSvg} role="img" />
50+
{/* Use the link property for the hyperlink */}
51+
<a href={link}>
52+
<Svg className={styles.featureSvg} role="img" />
53+
</a>
4754
</div>
4855
<div className="text--center padding-horiz--md">
49-
<Heading as="h3">{title}</Heading>
56+
<a href={link}>
57+
<Heading as="h3">{title}</Heading>
58+
</a>
5059
<p>{description}</p>
5160
</div>
5261
</div>

src/css/custom.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@
2828
--ifm-color-primary-lightest: #4fddbf;
2929
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
3030
}
31+
32+
/* Style the version link in the navbar */
33+
.navbar-version {
34+
font-weight: bold;
35+
color: #4caf50; /* Green color */
36+
text-decoration: none;
37+
}
38+
39+
.navbar-version:hover {
40+
text-decoration: underline;
41+
}

src/pages/index.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ function HomepageHeader() {
2424
Start Kubernetes Hands-On - 5min ⏱️
2525
</Link>
2626
</div>
27-
<div className={styles.buttons}>
28-
<Link
29-
className="button button--outline button--lg"
30-
to="/blog">
31-
Read Latest Blogs 📝
32-
</Link>
33-
</div>
3427
{/* Centered Website Views Counter */}
3528
<div
3629
className={styles.hitCounter}

0 commit comments

Comments
 (0)