Thank you for your interest in contributing to the OpenObserve blog! Please follow the steps below to write, preview, and submit your blog post.
To contribute to the OpenObserve blog, begin by forking the repository:
- Go to the OpenObserve GitHub repository.
- Click the "Fork" button in the top-right corner. This will create a copy of the repository under your own GitHub account.
Now, clone your forked repository to your local machine:
-
In your GitHub account, navigate to the forked repository.
-
Click the "Code" button and copy the repository URL.
-
In your terminal, run the following command to clone the repository:
git clone https://github.com/your-username/website4.git
-
Navigate into the cloned repository:
cd website4
To keep your forked repository up to date with the original repository, you need to set up the upstream remote.
-
Add the upstream repository:
git remote add upstream https://github.com/openobserve/website4
-
Verify the new remote:
git remote -v
This will allow you to pull changes from the main repository whenever necessary.
It's a good practice to create a new branch for your blog post:
-
Create and switch to a new branch:
git checkout -b add-new-blog
Navigate to the blog directory where all blog posts are stored:
- In the
content/blog
directory, create a new .md file for your blog. The filename should correspond to the URL of your blog post. For example, if your blog post URL ishttps://openobserve.io/blog/monitoring-kubernetes/
, name your filemonitoring-kubernetes.md
. - Write your blog content in this markdown file. Refer to previous blog posts for formatting guidance.
Update your author information in the authors.json
file located in the content/blog
directory. Add details like your name, bio, image, and social media links. Author images are stored in public/img/blog/authors/
. Make sure to add your image to this folder and reference it in authors.json
.
Save the images you plan to use in your blog in the public/img/blog
directory. If necessary, create a folder (named after your blog post) inside this directory to organize your images. You can then reference these images in your markdown file.
Before previewing your blog locally, install the required dependencies:
In the root of the project, open a terminal and run:
npm install
This will install all necessary libraries and dependencies for the website.
Now, you can preview the website locally to ensure your blog looks correct:
Run the following command to start the development server:
npm run dev
Open your browser and navigate to http://localhost:3000/
. Here, you can view your blog post on the local version of the OpenObserve website.
Check if your blog content and images appear correctly. If everything looks good, you are ready to submit your work!
Before pushing your changes, it's a good idea to sync your fork with the upstream repository:
-
Fetch the latest changes from upstream:
git fetch upstream
-
Merge the changes into your current branch:
git merge upstream/main
Once your blog post is ready, commit your changes:
-
Add the changes:
git add .
-
Commit the changes:
git commit -m "Added new blog post: [your blog title]"
-
Push the changes to your fork:
git push origin add-new-blog
Now that your changes are pushed to your forked repository, you can submit them for review:
- Go to your forked repository on GitHub.
- Click on the "Compare & pull request" button.
- Add a title and description for your pull request.
- Click on "Create pull request."
Your pull request will be reviewed, and if everything looks good, it will be merged into the main repository. Thank you for contributing to the OpenObserve blog!