Skip to content

gosopagex is a tool that allows html pages to be properly indexed by the Apache Solr search platform.

License

Notifications You must be signed in to change notification settings

b-nova-openhub/solr-page-exposer

Repository files navigation

sopagex-header

gosopagex (go-solr-page-exposer)

GoDoc GitHub repo size GitHub contributors GitHub stars GitHub forks Twitter Follow

gosopagex is a tool that allows content maintainers to do expose html content to the Apache Solr search platform.

More specifically, gosopagex is microservice written in Go that maintains html files in a desired solr-friendly format and exposes them RESTful interface. It is operates on the principles of KISS and is best integrated in a JAMstack.

Prerequisites

Before you begin, ensure you have met the following requirements:

  • You have installed the latest version of go1.16.5
  • You have a Linux/Mac OS machine with working knowledge of the underlying filesystem and Go build process.

Installing gosopagex

If you want to try out on your local machine, you can simply install gosopagex system-wide with the following command:

$ ❯  go install -v ./...

Alternatively, you can build a binary and run that one with a configurable shell script. See how to build stapagen with the Makefile further down below (#Makefile).

Running gosopagex

To run gosopagex, follow these steps:

$ ❯  sopagex

If you have build stapagen with the Makefile, you can simply adjust the parameters in the shell script stapagen.sh and then launch the script.

$ ❯  ./sopagex.sh

This method is preferable as you're more flexible and don't have to retype the binary arguments everytime.

Reading gosopagex's API

Once gosopagex is running, it does clone the git repository, converts its markdown files to html pages and forwards them over a RESTful api. That api can be accessed over locally if the executable was run on your local machine (http:https://localhost:8080) or over a K8s service definition.

Makefile

There is a Makefile which automates the building process of the stapagen application. The Makefile has 6 build targets: test, vet, fmt, mod, build, run, install and all. It can simply be run as such:

$ ❯  make build

Dockerfile

There is also a Dockerfile by which one can containerize the stapagen application. The port that is being exposed is the default 8080.

Deployment to K8s

{coming soon}

Quick Deployment to DigitalOcean's Kubernetes

Deploy to DO

Contributing to gosopagex

To contribute to gosopagex, follow these steps:

  1. Fork this repository.
  2. Create a branch: git checkout -b <branch_name>.
  3. Make your changes and commit them: git commit -m '<commit_message>'
  4. Push to the original branch: git push origin <project_name>/<location>
  5. Create the pull request.

Alternatively see the GitHub documentation on creating a pull request .

Contributors

Thanks to the following people who have contributed to this project:

You might want to consider using something like the All Contributors specification and its emoji key.

Contact

If you want to contact me you can reach me at [email protected].

License

This project uses the following license: MIT License

About

gosopagex is a tool that allows html pages to be properly indexed by the Apache Solr search platform.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published