Merge pull request #54 from DuroCodes/main

Add category files, fix some capitalization, and add new blog post
This commit is contained in:
Jacob Nguyen
2024-03-15 11:09:12 -05:00
committed by GitHub
8 changed files with 114 additions and 67 deletions

View File

@@ -0,0 +1,36 @@
---
slug: railway-deploy
title: Deploying sern with Railway
authors: [Duro]
tags: [guides]
---
In this guide, I'll be showing you how to deploy your sern bot with [Railway](https://railway.app/).
This guide assumes you have a sern bot already set up and ready to deploy. If you don't, you can follow the [Getting Started](/blog/getting-started) guide to set up your bot.
## GitHub Repository
The first thing you'll need to deploy your bot is a GitHub repository for your bot. If you don't have one, you can create one by following the [GitHub guide](https://docs.github.com/en/get-started/quickstart/create-a-repo).
Once you have your repository set up, you can push your bot's code to the repository, and you're ready to deploy using Railway.
## Railway Setup
After you have your bot's code in a GitHub repository, you'll need to create an account on Railway. You can sign up using your GitHub account at [railway.app](https://railway.app/).
Once you've created your account, navigate to the [dashboard](https://railway.app/dashboard) and click the "New Project" button. Click the "Deploy from GitHub repo" button, and select your bot's repository.
Once you've selected your repository, click the "Add Variables" button to add your bot's environment variables. You'll need your environment variables from your `.env` file to add to Railway. (You can also add these later if you want.)
## Deploy
Once you've added your environment variables, click the "Deploy" button, and Railway will start deploying your bot. Once the deployment is complete, you'll be able to see your bot's URL and logs.
:::note
Make sure you add your environment variables, and your node start script is correct in your `package.json` file.
If you have any issues deploying your bot, you can check the logs for any errors.
:::
That's it! Your bot is now deployed and running on Railway. If you have any issues or questions, feel free to ask in the [sern Discord server](https://sern.dev/discord).

View File

@@ -17,3 +17,8 @@ Murtatrxx:
title: Developer
url: https://github.com/Murtatrxx
image_url: https://github.com/Murtatrxx.png
Duro:
name: Duro
title: Developer
url: https://github.com/DuroCodes
image_url: https://github.com/DuroCodes.png

View File

@@ -44,8 +44,9 @@ const config = {
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
blogSidebarCount: 'ALL',
},
pages : {
pages: {
path: 'src/pages',
routeBasePath: '/',
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
@@ -66,23 +67,23 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'https://sern.dev/img/logo.png',
algolia: {
appId: 'AA9S5J9NYT',
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
indexName: 'sern',
insights: true,
container: 'div',
debug: false,
contextualSearch: true,
externalUrlRegex: 'external\\.com|domain\\.com',
replaceSearchResultPathname: {
from: '/docs/api',
to: '/docs/api',
},
image: 'https://sern.dev/img/logo.png',
algolia: {
appId: 'AA9S5J9NYT',
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
indexName: 'sern',
insights: true,
container: 'div',
debug: false,
contextualSearch: true,
externalUrlRegex: 'external\\.com|domain\\.com',
replaceSearchResultPathname: {
from: '/docs/api',
to: '/docs/api',
},
searchParameters: {},
searchPagePath: 'search',
},
},
navbar: {
title: 'Home',
logo: {
@@ -96,7 +97,7 @@ const config = {
position: 'left',
label: 'Docs & Guide',
},
{to: '/blog', label: 'Blog', position: 'left'},
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/sern-handler',
label: 'GitHub',
@@ -133,7 +134,7 @@ const config = {
href: 'https://discord.gg/DwbF5H5JgQ',
},
{
label : 'Open Collective',
label: 'Open Collective',
href: 'https://opencollective.com/sern'
}
],
@@ -146,7 +147,7 @@ const config = {
to: '/blog',
},
{
label: 'GitHub',
label: 'GitHub',
href: 'https://github.com/sern-handler',
},
],
@@ -154,16 +155,16 @@ const config = {
],
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
},
metadata : [
metadata: [
{ name: 'og:title', content: 'sern - Handlers. Redefined.' },
{ name: 'og:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'og:url', content: 'https://sern.dev' },
{ name: 'og:type', content: 'website' },
{ name: 'twitter:site', content: '@sern-handler' },
{ property: 'og:image:alt', content: 'sernlogo' },
{ property: 'og:image:alt', content: 'sernlogo' },
{ name: 'twitter:title', content: 'sern - Handlers. Redefined.' },
{ name: 'twitter:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern'},
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern' },
{ name: 'twitter:image', content: 'https://sern.dev/img/logo.png' },
{ name: 'twitter:url', content: 'https://sern.dev' },
{ property: 'og:image:height', content: '512' },

View File

@@ -0,0 +1 @@
label: Getting Started

View File

@@ -0,0 +1 @@
label: Walkthrough

View File

@@ -1,6 +1,9 @@
---
sidebar_position: 7
---
# Dependency Injection
:::warning
This contains version 2 code. Please view [transitioning to v3](./transition)
:::

View File

@@ -2,8 +2,7 @@
sidebar_position: 3
---
# transition from v2 to v3
# Transition from v2 to v3
```diff title="src/index.ts"
- Sern.makeDependencies({ build: () => {} })

View File

@@ -46,8 +46,9 @@ const config = {
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
blogSidebarCount: 'ALL',
},
pages : {
pages: {
path: 'src/pages',
routeBasePath: '/',
include: ['**/*.{js,jsx,ts,tsx,md,mdx}'],
@@ -68,23 +69,23 @@ const config = {
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
image: 'https://sern.dev/img/logo.png',
algolia: {
appId: 'AA9S5J9NYT',
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
indexName: 'sern',
insights: true,
container: 'div',
debug: false,
contextualSearch: true,
externalUrlRegex: 'external\\.com|domain\\.com',
replaceSearchResultPathname: {
from: '/docs/api',
to: '/docs/api',
},
image: 'https://sern.dev/img/logo.png',
algolia: {
appId: 'AA9S5J9NYT',
apiKey: 'ccfe6abc4d12ac6f882565a9d0caafb1',
indexName: 'sern',
insights: true,
container: 'div',
debug: false,
contextualSearch: true,
externalUrlRegex: 'external\\.com|domain\\.com',
replaceSearchResultPathname: {
from: '/docs/api',
to: '/docs/api',
},
searchParameters: {},
searchPagePath: 'search',
},
},
navbar: {
title: 'Home',
logo: {
@@ -98,7 +99,7 @@ const config = {
position: 'left',
label: 'Docs & Guide',
},
{to: '/blog', label: 'Blog', position: 'left'},
{ to: '/blog', label: 'Blog', position: 'left' },
{
href: 'https://github.com/sern-handler',
label: 'GitHub',
@@ -135,7 +136,7 @@ const config = {
href: 'https://discord.gg/DwbF5H5JgQ',
},
{
label : 'Open Collective',
label: 'Open Collective',
href: 'https://opencollective.com/sern'
}
],
@@ -148,7 +149,7 @@ const config = {
to: '/blog',
},
{
label: 'GitHub',
label: 'GitHub',
href: 'https://github.com/sern-handler',
},
],
@@ -156,16 +157,16 @@ const config = {
],
copyright: `Built with ❤️ by the sern Handler team and its contributors`,
},
metadata : [
metadata: [
{ name: 'og:title', content: 'sern - Handlers. Redefined.' },
{ name: 'og:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'og:url', content: 'https://sern.dev' },
{ name: 'og:type', content: 'website' },
{ name: 'twitter:site', content: '@sern-handler' },
{ property: 'og:image:alt', content: 'sernlogo' },
{ property: 'og:image:alt', content: 'sernlogo' },
{ name: 'twitter:title', content: 'sern - Handlers. Redefined.' },
{ name: 'twitter:description', content: 'A modular, customizable, fast Discord.js framework to streamline bot development' },
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern'},
{ name: 'keywords', content: 'discord, bot, handler, framework, documentation, sern' },
{ name: 'twitter:image', content: 'https://sern.dev/img/logo.png' },
{ name: 'twitter:url', content: 'https://sern.dev' },
{ property: 'og:image:height', content: '512' },
@@ -177,28 +178,28 @@ const config = {
darkTheme: darkCodeTheme,
},
}),
plugins: [
/* [
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
], */
[
"@dipakparmar/docusaurus-plugin-umami",
{
websiteID: "e82ff65c-b08f-47b5-8e74-5c31cbcec0ad",
analyticsDomain: "analytics.srizan.dev",
scriptName: 'ua.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
dataDomains: "sern.dev",
},
]
plugins: [
/* [
'docusaurus-plugin-typedoc',
{
//if you're editing website, please change this to your local branch of sern to generate documentation
entryPoints: ['../sernHandlerV2/src/index.ts'],
tsconfig: '../sernHandlerV2/tsconfig.json',
},
], */
[
"@dipakparmar/docusaurus-plugin-umami",
{
websiteID: "e82ff65c-b08f-47b5-8e74-5c31cbcec0ad",
analyticsDomain: "analytics.srizan.dev",
scriptName: 'ua.js',
dataAutoTrack: true,
dataDoNotTrack: true,
dataCache: true,
dataDomains: "sern.dev",
},
]
]
};
module.exports = config;