Friday 19 November 2021

Release 3.0 #2 IPC144

Introduction

 After doing the Docusaurus Lab, I was keen on doing an issue related to it.  At the time, issue-10 was one of the few issues in IPC144 website.  I have mixed feelings after seeing how complicated this implementation could get, but I am glad I have taken on this challenge.  This is definitely one of the hardest issues I have worked on for Github to date, because the documentation on Facebook Algolia website is not very clear on the entire process of implementating search and that it is outdated if you used their service.  Therefore I found out that I have to build my own index using a custom scrapper application.  I broken the issue down into just building the index for my pull request and branching to two more issues, #69 and #70 for the future.

Steps to Creating Index

Based on the CONTRIBUTION.md file I modified, I added the following

1. sign up for an account on https://www.algolia.com/users/sign_in

2. create a project for the purpose of creating the index

3. add an 'INDEX_NAME' called 'docusaurus'

4. Add API_KEY and give rights (`search, addObject, deleteObject, editSearch)` for the key

5. SITE_URL is the deploy site, but siteindex needs to match it in order to crawl it

Implementation

The Algolia scrapper is run on the Docker platform on Ubuntu linux and I made a bash script for it called scrape.sh, in which the Github Actions CI is run to call it.


















The bash script is as follows:

Just running the script locally gives the following result.


The Experience

The practice of working with Git on this repository is a good experience especially reviewing squash and re-basing over twenty commits is a unique experience.  The order to get things merged and reviewing other's pull request is also interesting.


Useful links

Algolia Integration Docs

Using Algolia Search

Deployment

Algolia API

Algolia Docsearch-action

Take care Release 0.3

Kind Regards, Eugene Chung

No comments:

Post a Comment

What I learned from Project 1 of Udacity's Data Science with Python bootcamp

Introduction As part of the project I completed successfully, I used SQL to explore a database related to movie rentals. SQL queries was ran...