Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing breadcrumbs #551

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/.vuepress/breadcrumbs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
export default {
functional: true,
render(h, context) {
const frontmatter = context.parent.$page.frontmatter;

const pathMap = {
'Migration': { path: '/migration/', linkable: true },
'ELevate Project': { path: '/elevate/', linkable: true },
'Installation': {path: '/', linkable: true },
'Repositories': {path: '/repos/', linkable: true },
'Extra Repositories': {path: '/repos/extras', linkable: true},
'Release Notes': {path: '/release-notes/', linkable: true },
'Older AlmaLinux 8 releases': {linkable: false},
'Older AlmaLinux 9 releases': {linkable: false},
'AlmaLinux 8 betas': {linkable: false},
'AlmaLinux 9 betas': {linkable: false},
'ALESCo': {path: '/alesco', linkable: true},
'ALESCo Meeting Minutes': {path: '/alesco/meeting-minutes', linkable: true},
'Contribute': {linkable: false},
'Special interest groups (SIGs)': {path: '/sigs/', linkable: true},
'The Process for Creating a New SIG* in the AlmaLinux Community': {path: '/sigs/ProcessForCreatingNewSIG', linkable: true},
'Marketing': {path: '/sigs/Marketing', linkable: true},
'Development': {linkable: false},
'Private Keys': {linkable: false},
'Documentation': {linkable: false},
'Howto Series': {path: '/series/', linkable: true},
'Nginx Series': {path: '/series/nginx/', linkable: true},
'System Series': {path: '/series/system/', linkable: true},
'Security Guides': {path: '/documentation/guides', linkable: true},
'Installation': {linkable: false},
'Cloud Images': {path: '/cloud/', linkable: true},
'Generic Cloud (Cloud-init)': {linkable: false},
'AWS': {linkable: false},
'Containers': {path: '/containers/', linkable: true},
'Foundation': {linkable: false},

// Add more mappings for other pages here...
};

const breadcrumbs = [];
['grandparent', 'parent', 'child'].forEach((level) => {
if (frontmatter[level] && pathMap[frontmatter[level]]) {
breadcrumbs.push({
text: frontmatter[level],
path: pathMap[frontmatter[level]].path,
linkable: pathMap[frontmatter[level]].linkable,
});
}
});

breadcrumbs.push({
text: frontmatter.title,
path: context.parent.$route.path,
linkable: false, // Current page is usually not a link
});

return h(
'nav',
{ class: 'breadcrumbs' },
breadcrumbs.map((crumb, index) =>
h('span', {}, [
crumb.linkable
? h('router-link', { attrs: { to: crumb.path } }, crumb.text)
: h('span', {}, crumb.text), // Render plain text if not linkable
index < breadcrumbs.length - 1 ? ' > ' : ''
])
)
);
}
};
12 changes: 11 additions & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

const path = require('path');
module.exports = {
title: 'AlmaLinux Wiki',
description: 'AlmaLinux OS Documentation',
Expand Down Expand Up @@ -26,6 +26,16 @@ module.exports = {
{ text: 'Mailing Lists', link: 'https://lists.almalinux.org/' },
{ text: 'Bugs', link: 'https://bugs.almalinux.org/' }
],
plugins: [
[
'@vuepress/plugin-register-components',
{
components: {
Breadcrumbs: path.resolve(__dirname, './breadcrumbs.js'),
},
},
],
],
sidebar: [
{
title: 'About',
Expand Down
5 changes: 5 additions & 0 deletions docs/.vuepress/enhanceApp.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Breadcrumbs from './breadcrumbs.js';

export default ({ Vue, options, router, siteData }) => {
Vue.component('Breadcrumbs', Breadcrumbs);
};
15 changes: 15 additions & 0 deletions docs/.vuepress/styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,18 @@ tr:nth-child(2n)
.custom-block.danger
background-color $dangerBgColor
border-color $dangerBorderColor

.breadcrumbs {
font-size: 14px;
margin: 10px 0;
}

.breadcrumbs a {
text-decoration: none;
color: #017698;
}

.breadcrumbs a:hover {
text-decoration: underline;
}

11 changes: 7 additions & 4 deletions docs/Comparison.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
---
title: "Enterprise Linux Comparison"
title: 'Enterprise Linux Comparison'
parent: 'Documentation'
---

# Enterprise Linux Comparison

###### Last updated 2024-09-09

<Breadcrumbs />

# Enterprise Linux Comparison

When deciding what OS to use, there are many factors that come into play for a variety of reasons. This page attempts to outline some of the specific differences, while focusing on the reasons that many in the AlmaLinux community have cited as the reasons they pick AlmaLinux. The enterprise linux ecosystem is vast and has many differentiators that are nuanced, hard to articulated, and don't fit easily into charts, but we have attempted to capture some of the differentiations below.

## Build Sources
Expand Down Expand Up @@ -64,4 +67,4 @@ At the outset, it was important to the founding members of the AlmaLinux OS proj
[almalinux.fips]: https://almalinux.org/blog/2023-09-19-fips-validation-for-almalinux/
[oracle.fips]: https://www.oracle.com/corporate/security-practices/assurance/development/external-security-evaluations/fips/certifications.html
[rocky.fips]: https://rockylinux.org/news/certifications-fips-2022-06-11
[RHEL.fips]: https://access.redhat.com/articles/compliance_activities_and_gov_standards#fips-140-2-and-fips-140-3-2
[RHEL.fips]: https://access.redhat.com/articles/compliance_activities_and_gov_standards#fips-140-2-and-fips-140-3-2
3 changes: 3 additions & 0 deletions docs/Contribute-to-AlmaLinux-Build-System.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: 'AlmaLinux Build System'
parent: 'Contribute'
---

###### last updated: 2024-10-16

<Breadcrumbs />

# Contribute to AlmaLinux Build System

The AlmaLinux Build System is managed by the [SIG/Build System](/sigs/Build-System) SIG.
Expand Down
3 changes: 3 additions & 0 deletions docs/Contribute-to-Documentation.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: 'Documentation'
parent: 'Contribute'
---

###### last updated: 2024-03-25

<Breadcrumbs />

# Contribute to AlmaLinux Documentation

If you are interested in contributing to AlmaLinux Wiki Documentation, we recommend you follow these guidelines.
Expand Down
3 changes: 3 additions & 0 deletions docs/Contribute-to-Packaging.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: 'Packaging'
parent: 'Contribute'
---

###### last updated: 2024-09-20

<Breadcrumbs />

# Contribute to Packaging

AlmaLinux OS is, at its base, a collection of packages. For anyone who would like to contribute to the operating system, we have a collection of ways to help!
Expand Down
3 changes: 3 additions & 0 deletions docs/Contribute-to-Testing.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: 'Testing'
parent: 'Contribute'
---

###### last updated: 2024-08-30

<Breadcrumbs />

# Contribute to Testing

At AlmaLinux, we're dedicated to providing a high-quality experience for our community. We believe that thorough testing is crucial to guaranteeing the quality and reliability of the distribution. We put a lot of effort into testing and making sure everything works smoothly regardless of where or what you run.
Expand Down
4 changes: 4 additions & 0 deletions docs/Contribute.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: 'Help AlmaLinux OS'
parent: 'Contribute'
---

<Breadcrumbs />

# Contributing to the AlmaLinux project

AlmaLinux OS development, infrastructure management, and overall project promotion are organized using our community chat. There are many ways to contribute to AlmaLinux OS - testing, quality assurance, documentation, and more. We'd love to welcome you! To help get you started, here is a Q&A video on the subject:
Expand Down
4 changes: 4 additions & 0 deletions docs/Election2022.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: 'Election 2022'
parent: 'Foundation'
---

<Breadcrumbs />

# AlmaLinux Board of Directors Election 2022

# Sept 19, 2022 - Election Results
Expand Down
3 changes: 3 additions & 0 deletions docs/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
---
title: 'FAQ'
parent: 'Documentation'
---
###### last updated: 2023-10-02

<Breadcrumbs />

# Frequently asked questions

### What is AlmaLinux?
Expand Down
6 changes: 5 additions & 1 deletion docs/Help-translating-site.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: 'Help translating site'
parent: Contribute'
---

<Breadcrumbs />

# Help translating the site

The [almalinux.org website](https://almalinux.org/) localization and translation is managed by [Weblate](https://hosted.weblate.org/engage/almalinux/) and supported by contributors. The translations that get submitted through Weblate are automatically submitted to the [almalinux.org repo](https://github.com/AlmaLinux/almalinux.org) as a pull request.
Expand Down Expand Up @@ -35,4 +39,4 @@ After translating from English to your chosen language (.e.g Hebrew) press on "S

You can request new languages to be added by creating a ticket in [GitHub issues](https://github.com/AlmaLinux/almalinux.org/issues), like so:

![image](/images/weblate-ask-new-lang.png)
![image](/images/weblate-ask-new-lang.png)
5 changes: 4 additions & 1 deletion docs/Howto.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
title: "Howtos"
\title: "Howtos"
parent: 'Documentation'
---

<Breadcrumbs />

# AlmaLinux Howto Guides (external)

## Installation Guides
Expand Down
6 changes: 5 additions & 1 deletion docs/LiveMedia.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: "Live Media"
title: 'Live Media'
parent: 'Installation'
---

<Breadcrumbs />

# Live Media

## About Live Media
Expand Down
4 changes: 4 additions & 0 deletions docs/Mirrors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
---
title: 'Mirrors'
parent: 'Contribute'
---

<Breadcrumbs />

# How to create a public mirror for AlmaLinux

Mirrors are extremely important to provide a fast and reliable
Expand Down
7 changes: 7 additions & 0 deletions docs/Transparency.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
title: 'AlmaLinux OS Foundation'
parent: 'Foundation'
---

<Breadcrumbs />

# AlmaLinux OS Foundation

The AlmaLinux OS Foundation is 501(c)(6) non-profit organization. It owns all assets related to AlmaLinux OS. It is governed by a set of [Bylaws](https://almalinux.org/p/foundation-bylaws/).
Expand Down
5 changes: 4 additions & 1 deletion docs/alesco/meeting-minutes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
Title: 'ALESCo Meeting Minutes'
title: 'ALESCo Meeting Minutes'
parent: 'ALESCo'
---

<Breadcrumbs />

Each meeting of ALESCo is public, and future meetings can be found on [events.almalinux.org](https://events.almalinux.org/category/7/)

# ALESCo Meeting Minutes
Expand Down
8 changes: 8 additions & 0 deletions docs/alesco/meeting-minutes/2024-07-24.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
title: 'ALESCo Meeting Minutes (2024-07-24)'
parent: 'ALESCo Meeting Minutes'
grandparent: 'ALESCo'
---

<Breadcrumbs />

# ALESCo Meeting Minutes (2024-07-24)
Minutes recorded by Cody Robertson.

Expand Down
8 changes: 8 additions & 0 deletions docs/alesco/meeting-minutes/2024-08-21.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
title: 'ALESCo Meeting Minutes (2024-08-21)'
parent: 'ALESCo Meeting Minutes'
grandparent: 'ALESCo'
---

<Breadcrumbs />

# ALESCo Meeting Minutes (2024-08-21)
Minutes recorded by Jonathan Wright.

Expand Down
8 changes: 8 additions & 0 deletions docs/alesco/meeting-minutes/2024-09-04.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
title: 'ALESCo Meeting Minutes (2024-09-04)'
parent: 'ALESCo Meeting Minutes'
grandparent: 'ALESCo'
---

<Breadcrumbs />

# ALESCo Meeting Minutes (2024-09-04)
Minutes recorded by Jonathan Wright.

Expand Down
8 changes: 8 additions & 0 deletions docs/alesco/meeting-minutes/2024-10-02.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
---
title: 'ALESCo Meeting Minutes (2024-10-02)'
parent: 'ALESCo Meeting Minutes'
grandparent: 'ALESCo'
---

<Breadcrumbs />

# ALESCo Meeting Minutes (2024-10-02)
Minutes recorded by Cody Robertson.

Expand Down
6 changes: 6 additions & 0 deletions docs/cloud/AWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
title: 'AWS'
parent: 'Cloud Images'
grandparent: 'Installation'
child: 'AWS'
---

<Breadcrumbs />

# AlmaLinux OS Amazon Web Services AMIs

AlmaLinux OS offers Amazon Machine Images in a number of formats and regions for consumption on AWS. All AlmaLinux OS AMIs are completely free of charge regardless of the deployment channel.
Expand Down
5 changes: 5 additions & 0 deletions docs/cloud/Azure.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
title: 'Azure'
parent: 'Cloud Images'
grandparent: 'Installation'
---

<Breadcrumbs />

# AlmaLinux OS in Azure Cloud

AlmaLinux offers images for Azure across all Azure regions via the Azure Marketplace. Images are deployable via the marketplace, portal and CLI and for both Gen1 and Gen2 machines. The images are completely free of charge regardless of the deployment channel.
Expand Down
5 changes: 5 additions & 0 deletions docs/cloud/EC2-instance-connect.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
---
title: 'EC2 Instance Connect'
parent: 'Cloud Images'
grandparent: 'Installation'
child: 'AWS'
---

###### last modified: 2024-03-05

<Breadcrumbs />

# How to use EC2 Instance Connect

## About EC2 Instance Connect
Expand Down
Loading