Do you have an idea for a post and want to contribute as a guest writer? That's awesome! Thanks for your contribution. The process for contributing is still being worked out. In the future, I hope to smooth out the contribution process and make it more straightforward. So, thank you for bearing with me at the moment.
For now, here is some helpful information on how you can begin contributing. If you have any questions or are having trouble with getting started, don't hesistate to reach out. Thanks again!
To be able to contribute as a writer or developer of this site, you will need to download the source code for the site to a local directory on your computer. The source code and posts for this website are open source. You can find the repository on GitHub.
To download the code to a local directory on your computer, perform the following steps:
git clone https://github.com/philipstubbs13/next-netlify-blog.gitRunning this will create a directory called
next-netlify-blog
within the directory in which you ran this command.Perform the following steps to create a post.
next-netlify-blog/posts
directory of this project and create a .md
file within the posts
directory.The name of the file should be similar to the title of your blog post where each word is hyphenated (also known as snake case).
There should be no spaces in the filename and should be all lowercase. For example, if the title of your blog post is My Awesome Post, then a good filename for the post would be my-awesome-blog-post.md
.
The naming of the file is important because the name of the file will be used to construct the url to the post content on the site. For example, a file name of my-awesome-blog-post.md
will have a url of /post/my-awesome-blog-post
when the post is live on the site.
.md
fil you just created, copy and paste the starter code from next-netlify-blog/example-post/example-post.md
into your new file.This is the template for writing a blog post for this site. If you follow this template, you should have no problem contributing and getting a post added.
Note that posts for this site are written in Markdown syntax. If you are unfamiliar with Markdown, refer to this guide for more information: Markdown guide.
After you have created a post, it is a good idea and highly recommended to preview your post to make sure everything looks good before it goes live on the site.
To preview your post and see what it would look like before it goes live, perform the following steps:
node.js
on your computer from here.next-netlify-blog
directory of the project.cd next-netlify-blog
package.json
file if you are curious):npm install
npm run dev
If the website started correctly with no errors, you should be able to preview your post by opening up a browser and going to the following url:
http://localhost:3000/post/example-post
Where example-post
is the name of the .md
file you created.
After you have created a post, previewed it, and you are satisfied with it, follow these steps to get your changes published:
master
branch to this repository on GitHub.master
branch.