-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/about' into develop
- Loading branch information
Showing
7 changed files
with
302 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Community Charter | ||
description: "The Community Charter of the Rocky Enterprise Software Foundation" | ||
--- | ||
|
||
### Preamble | ||
|
||
Enterprise organizations are becoming concerned with using open source software due to recent events where projects have changed licensing or pivoted to limit usage due to competition, business models, conflicts of interest, or other motivation. | ||
|
||
We do not assume the open source mindset lightly. It is not a marketing tool, or a business endeavor. Open source is a development model designed to engage and foster collaboration and usage. It is a decision which should be carefully considered, as it should be expected that others, including competitors, will make use of the technologies that are created by it. | ||
|
||
The Rocky Enterprise Software Foundation (RESF) has been created to organize a community around enterprise, research, academia, individuals, and other institutions to collaborate on building and maintaining the open source tools that these organizations need. | ||
|
||
Our mission is to provide the confidence and stability necessary to build on open source projects. Together, we can create a stable foundation of open source software that companies can use internally, or as the basis for their commercial needs. | ||
|
||
### Purpose | ||
|
||
The purpose of this document is to define the vision, mission, principles, and values of the Rocky Enterprise Software Foundation. We stand together, voluntarily accountable to this charter by our peers and the enterprise community at large. | ||
|
||
### Vision | ||
|
||
A community of individuals and organizations, committed to working together to provide a stable foundation of open source software within the enterprise. | ||
|
||
### Mission | ||
|
||
- Build a community of individuals and organizations to develop and foster enterprise-grade, open source solutions. | ||
- Work together to provide for the needs of the enterprise community. | ||
- The security, stability, and integrity of our projects are paramount. | ||
- Enable knowledge sharing, inclusiveness, collaboration, and open communication. | ||
- Coordinate with the commercial, research, academic, and public sectors to help bring their products, technologies, and support into enterprise environments. | ||
- Always make decisions in the best interest of the enterprise community while being beholden to no specific organization(s) | ||
|
||
### Principles | ||
|
||
Principles are fundamental truths, immutable, and they guide the decisions we make and the goals that we set. No action can be made by us that is contrary to the following principles: | ||
|
||
- Community responsibility. The Rocky Enterprise Software Foundation is responsible and accountable only to the community that consumes its projects. RESF shall be structured and governed in a way that ensures that no single entity, organization, corporation, association, etc. will be permitted to have a controlling influence over the RESF or its projects. | ||
- Our projects are free and open source. With few exceptions (branding, legal, etc.), the work generated by the RESF and its community will be released under an existing OSI permissive open source license (non-copyleft). | ||
- Trust is paramount. While decisions may sometimes need to be made that balance opposing perspectives, at all times we strive toward building and maintaining the overall trust such that the community feels confident in leveraging and standardizing on the resulting work of this organization for both commercial and internal usage. | ||
- Remain transparent. To the degree that we are reasonably able, the RESF will remain transparent to the community as defined by our [data security policy](https://forums.rockylinux.org/t/rfc-data-classification-policy/1513). | ||
- Equality of Opportunity: The RESF will strive to build and maintain a collaborative and respectful environment that provides equal access to opportunities and resources for everyone within the community. | ||
|
||
### Values | ||
|
||
We derive our values from our principles. It is with these values in mind that we make decisions, always striving to make the best decision possible with the data we have at hand. | ||
|
||
- Be practical. As open source advocates, our inclination toward solving problems is to use tools that are themselves permissible open source, but the best practical solution to a problem may preclude that. We use the right tool for the right job. | ||
- Be reasonable. Respect is given and trust is earned. Input from all contributors are valued, and all perspectives are sought after and considered. Knowledge and righteousness does not follow seniority. | ||
- Team ahead of self. Sycophants are not valuable to an organization, but neither are contrarians. We respectfully vocalize our concerns but pull together to drive forward once a decision has been reached. | ||
- Enable the enterprise community. While we are starting with creating a stable downstream enterprise distribution of Linux, our goals are much broader, including attention to the needs of special interests, project hosting, education, collaboration, workshops, meetups, and individuals. | ||
- Consider the human. Rocky Linux is developed and supported by a wide group of diverse individuals from all walks of life. We are strictly apolitical and will always assume the best intentions of others. | ||
|
||
### Get Involved | ||
|
||
We welcome feedback for this charter, and we encourage participation and engagement from the community. As always, you can get in touch with us for this or other matters on our [website](https://rockylinux.org), [forums](https://forums.rockylinux.org), or through [chat](https://chat.rockylinux.org). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useTranslations } from "next-intl"; | ||
|
||
export default function SlugNotFound() { | ||
const t = useTranslations("global.notFound"); | ||
|
||
return ( | ||
<div className="py-24 sm:py-32"> | ||
<div className="mx-auto max-w-3xl text-base leading-7"> | ||
<h1 className="mt-2 text-3xl font-bold tracking-tight sm:text-4xl mb-12 text-center font-display"> | ||
{t("title")} | ||
</h1> | ||
<div className="prose dark:prose-invert prose-headings:font-display prose-a:text-primary prose-pre:bg-muted prose-pre:py-3 prose-pre:px-4 prose-pre:rounded prose-img:rounded-md max-w-none text-center"> | ||
{t("description")} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { checkIfSlugIsValid, getContentData } from "@/lib/aboutPages"; | ||
import { notFound } from "next/navigation"; | ||
|
||
export type Params = { | ||
slug: string; | ||
}; | ||
|
||
export type Props = { | ||
params: Params; | ||
}; | ||
|
||
export type pageData = { | ||
title: string; | ||
description: string; | ||
contentHtml: string; | ||
}; | ||
|
||
export async function generateMetadata({ params }: Props) { | ||
const slug = params.slug; | ||
|
||
if (!(await checkIfSlugIsValid(slug))) { | ||
return { | ||
title: "Not Found", | ||
}; | ||
} | ||
|
||
const pageData: pageData = await getContentData(slug); | ||
|
||
return { | ||
title: `${pageData.title} - Rocky Linux`, | ||
}; | ||
} | ||
|
||
export default async function Page({ params }: Props) { | ||
const slug = params.slug; | ||
|
||
if (!(await checkIfSlugIsValid(slug))) { | ||
notFound(); | ||
} | ||
|
||
const pageData: pageData = await getContentData(slug); | ||
|
||
return ( | ||
<div className="py-24 sm:py-32"> | ||
<div className="mx-auto max-w-3xl text-base leading-7"> | ||
<h1 className="text-3xl font-bold tracking-tight sm:text-4xl mb-12 text-center font-display"> | ||
{pageData.title} | ||
</h1> | ||
<div | ||
className="prose dark:prose-invert prose-headings:font-display prose-a:text-primary prose-pre:bg-muted prose-pre:py-3 prose-pre:px-4 prose-pre:rounded prose-img:rounded-md max-w-none mb-12" | ||
dangerouslySetInnerHTML={{ __html: pageData.contentHtml }} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import { useTranslations } from "next-intl"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
const AboutPage = () => { | ||
const t = useTranslations("about"); | ||
|
||
return ( | ||
<div className="relative isolate overflow-hidden py-24 sm:py-32"> | ||
<div className="mx-auto max-w-7xl px-2 lg:px-0"> | ||
<div className="mx-auto max-w-2xl lg:mx-0"> | ||
<p className="text-lg font-semibold leading-8 tracking-tight text-primary uppercase font-display"> | ||
{t("headings.subTitle")} | ||
</p> | ||
<h1 className="mt-2 text-3xl font-bold tracking-tight sm:text-4xl font-display"> | ||
{t("headings.title")} | ||
</h1> | ||
<p className="mt-6 text-xl leading-8"> | ||
{t.rich("intro", { | ||
link: (chunks) => ( | ||
<Link | ||
target="_blank" | ||
href="https://blog.centos.org/2020/12/future-is-centos-stream/#comment-183642" | ||
className="text-primary underline" | ||
> | ||
{chunks} | ||
</Link> | ||
), | ||
})} | ||
</p> | ||
</div> | ||
<div className="mx-auto mt-16 grid max-w-2xl grid-cols-1 gap-x-8 gap-y-16 lg:mx-0 lg:mt-10 lg:max-w-none lg:grid-cols-12"> | ||
<div className="relative lg:order-last lg:col-span-5"> | ||
<svg | ||
className="absolute -top-[40rem] left-1 -z-10 h-[64rem] w-[175.5rem] -translate-x-1/2 stroke-muted [mask-image:radial-gradient(64rem_64rem_at_111.5rem_0%,white,transparent)]" | ||
aria-hidden="true" | ||
> | ||
<defs> | ||
<pattern | ||
id="e87443c8-56e4-4c20-9111-55b82fa704e3" | ||
width={200} | ||
height={200} | ||
patternUnits="userSpaceOnUse" | ||
> | ||
<path d="M0.5 0V200M200 0.5L0 0.499983" /> | ||
</pattern> | ||
</defs> | ||
<rect | ||
width="100%" | ||
height="100%" | ||
strokeWidth={0} | ||
fill="url(#e87443c8-56e4-4c20-9111-55b82fa704e3)" | ||
/> | ||
</svg> | ||
<figure className="border-l border-primary pl-8"> | ||
<blockquote className="text-xl font-semibold leading-8 tracking-tight font-display"> | ||
<p>{t("quote.quote")}</p> | ||
</blockquote> | ||
<figcaption className="mt-8 flex gap-x-4"> | ||
<Image | ||
src="/images/gmk.jpg" | ||
alt="Profile Photo of Gregory Kurtzer" | ||
className="mt-1 h-10 w-10 flex-none rounded-full bg-gray-50" | ||
height={200} | ||
width={200} | ||
/> | ||
<div className="text-sm leading-6"> | ||
<div className="font-semibold font-display"> | ||
{t("quote.author")} | ||
</div> | ||
<div className="text-foreground/80 font-display"> | ||
{t("quote.role")} | ||
</div> | ||
</div> | ||
</figcaption> | ||
</figure> | ||
</div> | ||
<div className="max-w-xl text-base leading-7 lg:col-span-7"> | ||
<p>{t("releaseInfo")}</p> | ||
<h2 className="mt-16 text-2xl font-bold tracking-tight font-display"> | ||
{t("organizationInfo.title")} | ||
</h2> | ||
<p className="mt-6"> | ||
{t.rich("organizationInfo.info", { | ||
link: (chunks) => ( | ||
<Link | ||
target="_blank" | ||
href="https://www.resf.org/about" | ||
className="text-primary underline" | ||
> | ||
{chunks} | ||
</Link> | ||
), | ||
})} | ||
</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AboutPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import fs from "fs"; | ||
import path from "path"; | ||
|
||
import matter from "gray-matter"; | ||
import { processMarkdownAsHTML } from "@/utils/remarkUtils"; | ||
|
||
const contentDirectory = path.join(process.cwd(), "about"); | ||
|
||
export async function checkIfSlugIsValid(slug: string) { | ||
if (!slug || typeof slug !== "string") { | ||
return false; | ||
} | ||
|
||
// Check that the slug does not contain any slashes to prevent directory traversal | ||
if (slug.includes("/") || slug.includes("\\")) { | ||
return false; | ||
} | ||
|
||
const fullPath = path.join(contentDirectory, `${slug}.md`); | ||
|
||
try { | ||
await fs.promises.access(fullPath); | ||
return true; | ||
} catch { | ||
return false; | ||
} | ||
} | ||
|
||
export async function getContentData(slug: string) { | ||
const fullPath = path.join(contentDirectory, `${slug}.md`); | ||
|
||
const fileContents = await fs.promises.readFile(fullPath, "utf8"); | ||
|
||
if (!fileContents) { | ||
throw new Error(`Page with slug "${slug}" does not exist.`); | ||
} | ||
|
||
const matterResult = matter(fileContents); | ||
|
||
const contentHtml = await processMarkdownAsHTML(matterResult.content); | ||
|
||
return { | ||
slug, | ||
contentHtml, | ||
...(matterResult.data as { title: string; description: string }), | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.