Skip to content

Zynith-SEO/zynith-wordpress-plugin

Repository files navigation

Contributors Forks Stargazers Issues MIT License

image

Zynith SEO Plugin

Zynith SEO is a powerful, performance-optimized WordPress SEO plugin, designed specifically for SEOs. Our community is dedicated to helping SEO professionals maximize their WordPress sites through Zynith SEO, and it's available built-in tools and utilities.

Report Bug · Feature Request

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Build Logic
  5. Roadmap
  6. Contributing
  7. Acknowledgments

About The Project

Built With

(back to top)

Getting Started

All plugin files live inside of the /src folder. These are the instructions on setting up your project locally. To get a local copy up and running follow these simple steps.

Prerequisites

For all of the awesome people using Node Version Manager (NVM) instead of Node.js, we have an .nvmrc file in the repo. For everyone else, please check this file to make sure that your Node.js version matches.

  • Switch to correct Node.js Version
nvm use

Installation

  1. Clone the repo.
    git clone https://github.com/Zynith-SEO/zynith-wordpress-plugin.git
  2. Install NPM packages.
    npm install
  3. Run the start command to watch and build files.
npm run start:dev

(back to top)

Usage

Below, you will find our common commands and notes for general usage.

  1. Run npm run build:dev.

    • When you build in dev, the plugin folder IS NOT ZIPPED. This is for those situations where you're working with local instance of WordPress using XAMP, LAMP, MAMP, etc. or even the LocalWP tool (which we use). Those steps are:
      • Build the new plugin folder.
      • Delete the current folder in your WP website.
      • Copy your new plugin folder into the website's plugins folder.
  2. Run npm run build:plugin.

    • When you build the plugin, the plugin folder IS ZIPPED and ready for upload to a WP website.
  3. Run npm run start:dev.

    • This is runs the default vite command. The terminal will tell you to open the browser to a localhost port. We do not use the browser.
    • A custom hot reload plugin is located in the Vite config file to watch all files in the /src folder.
    • Each time a file is changed, the hot reload will trigger a npm run build:dev.

(back to top)

Build Logic

Vite Build

Vite will convert all of your .scss to .css. These files, along with all .js files, will all be placed in a /dist folder, and will be minified.

Build Plugin

This covers the series of tasks that are used to initially build the plugin folder. Found in both build:dev and build:plugin scripts.

  1. create-plugin-folders

    • This will check to see if the folder zynith-seo exists. If not, this folder will be created.
  2. copy-php-to-plugin-folder

    • This copies the /src/php folder over to zynith-seo.
  3. copy-assets-from-dist-to-plugin-folder

    • This copies the assets folder from dist/assets over to zynith-seo/assets.
  1. copy-xsl-to-plugin-assets

    • This copies the *.xsl file from src/**/* (which is where the sitemap file is located) over to zynith-seo/assets.
  2. convert-php-encoding

    • With Vite, the PHP files don't get the correct file encoding. This step properly converts them to utf-8 for WordPress.
  3. delete-empty-folders

    • This will recursively delete all empty folders from the parent plugin folder zynith-seo.
  4. zip-plugin-core

    • This will zip up folder zynith-seo and name the new zip with the current version found in the package.json file, example zynith-seo-10.4.18.zip.

Cleanup Plugin

This covers the series of tasks that are used to clean up the plugin folder after the zip file is created. Found in the build:dev and build:plugin scripts.

  1. delete-plugin-build-folders

    • Delete the /dist folder that is generated by Vite.
    • Delete the plugin folder (i.e., /zynith-seo).

(back to top)

Roadmap

We don't have a dedicated roadmap outside of Github. Simply check the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Acknowledgments

Without these people and tools, life would be too complicated.

  • Good food.
  • Good company.
  • Good tools.

(back to top)