Jekyll to your GitHub Project

Dew
2 min readSep 11, 2023

--

Adding Jekyll to your GitHub project allows you to create a static website to document your project, share updates, or provide information to users and contributors.

Here are the steps to add Jekyll to your GitHub Android project :

  1. Create a docs Folder:
  • In your GitHub repository, create a new folder named docs at the root level. This folder will store your Jekyll website files.

2. Initialize a Git Repository Inside docs (Optional):

  • If you want to version control your Jekyll website separately from your Android project, you can initialize a new Git repository inside the docs folder. This step is optional, but it can be useful if you plan to make frequent changes to your website.
cd docs
git init

3. Create a Jekyll Website:

  • Inside the docs folder, create a new Jekyll website by running the following command:
gem install bundler jekyll  # Install Bundler and Jekyll (if not already installed)
jekyll new . --force # Create a new Jekyll site in the current folder

This command initializes a basic Jekyll website in the docs folder. You can now customize it to fit your project's needs. Modify the _config.yml file, create pages and posts, and add content as required.

4. Customize the Jekyll Website:

  • Open and edit the _config.yml file and other Jekyll template files as needed to customize the appearance and content of your website. You can add documentation, project details, blog posts, or any other information relevant to your Android project.

5. Test Locally (Optional):

  • You can test your Jekyll website locally by running the following command within the docs folder:
bundle exec jekyll serve

This command starts a local development server, and you can view your website at http://localhost:4000 in your web browser. This step helps you ensure that your website looks and works as expected before deploying it.

6. Commit and Push Your Changes:

  • If you created a separate Git repository for your Jekyll website inside the docs folder, commit your changes and push them to GitHub:
git add .
git commit -m "Initial Jekyll website commit"
git push origin master # or the branch you're using

7. Enable GitHub Pages:

  • Go to your GitHub repository’s Settings.
  • Scroll down to the GitHub Pages section.
  • In the Source dropdown, select master branch /docs folder.
  • GitHub will automatically build and host your Jekyll website at https://<username>.github.io/<repository>.

8. Access Your Jekyll Website:

  • After a few moments, your Jekyll website will be accessible online. You can access it at https://<username>.github.io/<repository>.

Now, your GitHub Android project has a Jekyll-powered website in the docs folder, allowing you to document your project and share information with others. You can continue to update and customize your website as needed by pushing changes to your repository.

--

--

Dew

Passionate Android developer with a deep interest in crafting elegant and efficient mobile applications. https://letmedo.in/