Skip to content

Commit

Permalink
Configure docusaurus (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
Havret authored Jun 5, 2024
1 parent cea7277 commit d864820
Show file tree
Hide file tree
Showing 18 changed files with 8,137 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docusaurus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Docusaurus

on:
push:
branches:
- master

jobs:
publish:
name: Publish Website
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false

- uses: actions/setup-node@v1
with:
node-version: 18.x

- name: Install and Build 🔧
working-directory: ./website
run: |
yarn install --frozen-lockfile
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: website/build # The folder the action should deploy.
CLEAN: true
15 changes: 15 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
id: getting-started
title: Getting started
sidebar_label: Getting Started
---

.NET ActiveMQ Artemis Core Client is an open-source effort to equip .NET developers with a powerful, straightforward client for Apache ActiveMQ Artemis. Utilizing the broker's Core protocol, this library focuses on high-performance messaging, ensuring compatibility and comprehensive feature support with Apache ActiveMQ Artemis.

## Installation

.NET ActiveMQ Artemis Core Client is distributed via [NuGet](https://www.nuget.org/packages/ArtemisNetCoreClient). You can add ArtemisNetCoreClient NuGet package using dotnet CLI:

```sh
dotnet add package ArtemisNetCoreClient --prerelease
```
20 changes: 20 additions & 0 deletions website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
33 changes: 33 additions & 0 deletions website/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Website

This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

```
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
94 changes: 94 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
module.exports = {
title: '.NET Core Client for ActiveMQ Artemis',
tagline: 'Unofficial .NET client library for Apache ActiveMQ Artemis utilizing the CORE protocol',
url: 'https://havret.github.io',
baseUrl: '/dotnet-activemq-artemis-core-client',
favicon: 'img/favicon.ico',
organizationName: 'havret', // Usually your GitHub org/user name.
projectName: 'dotnet-activemq-artemis-core-client', // Usually your repo name.
themeConfig: {
navbar: {
title: '.NET CORE Client for ActiveMQ Artemis',
logo: {
alt: 'My Site Logo',
src: 'img/logo.svg',
},
items: [
{
to: 'docs/getting-started',
activeBasePath: 'docs',
label: 'Docs',
position: 'right',
},
{
to: 'https://github.com/Havret/dotnet-activemq-artemis-core-client',
label: 'GitHub',
position: 'right',
},
{
to: 'https://www.nuget.org/packages/ArtemisNetCoreClient',
label: 'Download',
position: 'right',
}
],
},
footer: {
style: 'dark',
links: [
{
title: 'Docs',
items: [
{
label: 'Get Started',
to: 'docs/getting-started',
}
],
},

{
title: 'More',
items: [
{
label: 'GitHub',
href: 'https://github.com/Havret/dotnet-activemq-artemis-core-client',
},
],
},
],
copyright: `Copyright © ${new Date().getFullYear()} Havret. Built with Docusaurus.`,
},
prism: {
additionalLanguages: ['csharp']
},
algolia : {
appId: 'RMXXLJY88T',
apiKey: 'bdcaf022e9869ccbf8537bbc9bd7e75f',
indexName: 'dotnet-activemq-artemis-client',
contextualSearch: false
},
announcementBar: {
id: 'supportus',
content:
'⭐️ If you like .NET CORE Client for ActiveMQ Artemis, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/Havret/dotnet-activemq-artemis-core-client">GitHub</a>! ⭐️',
},
},
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
path: '../docs',
sidebarPath: require.resolve('./sidebars.js'),
routeBasePath: "/docs",
// Please change this to your repo.
editUrl:
'https://github.com/Havret/dotnet-activemq-artemis-core-client/edit/master/website/',
},
blog: false,
theme: {
customCss: require.resolve('./src/css/custom.css'),
},
},
],
],
};
32 changes: 32 additions & 0 deletions website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "website",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"classnames": "2.3.2",
"immer": "9.0.18",
"react": "18.2.0",
"react-dom": "18.2.0",
"trim": ">=1.0.1"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
5 changes: 5 additions & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
someSidebar: {
Introduction: ['getting-started']
},
};
25 changes: 25 additions & 0 deletions website/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* stylelint-disable docusaurus/copyright-header */
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/

/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: rgb(33, 175, 144);
--ifm-color-primary-darker: rgb(31, 165, 136);
--ifm-color-primary-darkest: rgb(26, 136, 112);
--ifm-color-primary-light: rgb(70, 203, 174);
--ifm-color-primary-lighter: rgb(102, 212, 189);
--ifm-color-primary-lightest: rgb(146, 224, 208);
--ifm-code-font-size: 95%;
}

.docusaurus-highlight-code-line {
background-color: rgb(72, 77, 91);
display: block;
margin: 0 calc(-1 * var(--ifm-pre-padding));
padding: 0 var(--ifm-pre-padding);
}
94 changes: 94 additions & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
import React from 'react';
import classnames from 'classnames';
import Layout from '@theme/Layout';
import Link from '@docusaurus/Link';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';

const features = [
{
title: <>Built with the Latest .NET Features</>,
imageUrl: 'img/dot-net-core.svg',
description: (
<>
Leveraging the newest capabilities of the latest .NET version, the .NET ActiveMQ Artemis Client ensures top performance and cutting-edge functionality.
</>
),
},
{
title: <>Asynchronous</>,
imageUrl: 'img/undraw_synchronize_ccxk.svg',
description: (
<>
.NET ActiveMQ Artemis Core Client was designed from the ground up to be fully asynchronous.
</>
),
},
{
title: <>High Performance</>,
imageUrl: 'img/undraw_To_the_stars_qhyy.svg',
description: (
<>
Utilizes the core protocol of Apache ActiveMQ Artemis to provide optimized speed and efficiency in processing messages.
</>
),
},
];

function Feature({ imageUrl, title, description }) {
const imgUrl = useBaseUrl(imageUrl);
return (
<div className={classnames('col col--4', styles.feature)}>
{imgUrl && (
<div className="text--center">
<img className={styles.featureImage} src={imgUrl} alt={title} />
</div>
)}
<h3>{title}</h3>
<p>{description}</p>
</div>
);
}

function Home() {
const context = useDocusaurusContext();
const { siteConfig = {} } = context;
return (
<Layout
title={siteConfig.title}
description="Unofficial ActiveMQ Artemis .NET Client for .NET Core and .NET Framework">
<header className={classnames('hero hero--primary', styles.heroBanner)}>
<div className="container">
<h1 className="hero__title">{siteConfig.title}</h1>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link
className={classnames(
'button button--outline button--secondary button--lg',
styles.getStarted,
)}
to={useBaseUrl('docs/getting-started')}>
Get Started
</Link>
</div>
</div>
</header>
<main>
{features && features.length && (
<section className={styles.features}>
<div className="container">
<div className="row">
{features.map((props, idx) => (
<Feature key={idx} {...props} />
))}
</div>
</div>
</section>
)}
</main>
</Layout>
);
}

export default Home;
36 changes: 36 additions & 0 deletions website/src/pages/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/* stylelint-disable docusaurus/copyright-header */
/**
* CSS files with the .module.css suffix will be treated as CSS modules
* and scoped locally.
*/

.heroBanner {
padding: 4rem 0;
text-align: center;
position: relative;
overflow: hidden;
}

@media screen and (max-width: 966px) {
.heroBanner {
padding: 2rem;
}
}

.buttons {
display: flex;
align-items: center;
justify-content: center;
}

.features {
display: flex;
align-items: center;
padding: 2rem 0;
width: 100%;
}

.featureImage {
height: 200px;
width: 200px;
}
Empty file added website/static/.nojekyll
Empty file.
Loading

0 comments on commit d864820

Please sign in to comment.