Skip to main content

Static Site Generation Tutorials guide

[last update: June 27 2022 by [email protected]]

What is tutorial pages

To increase search queries about making plugins or apps for web pages, we decided to make many pages with different content, meta and urls to cash in on the search engine. Each page of the tutorial provides guidance on how to create a plugin or app on a chosen platform, such as shopify, wix, etc.

Entities to make tutorial page

  • App Details - provides a data about choosen app and has data about app_type, slug, alias, tags and etc

    • app_type is app name to identify
    • slug app name to find his App Slug Simple Copy
    • alias is a father App Detail of this App Detail
    • other fields is for fill content of the tutorial page
  • App Slug Simple Copy - internalisated (12s lang) version of App Detail's slug for urls and some content fields

    • app_detail_id is a relationship field for connecting to App Detail
  • General Copies - provides content data with I18n translation by name

    • name identification of the field to search for the required content data
    • sentence_x translated to different language content data

Code guide

  • download_all.js - gets all needed data from strapi, stores as JSON as object to get data like a hash map

  • api/tutorials.js file to manage data that has been saved as JSON and then from this data is created for pathes and parameters to draw the tutorial

  • loccales.js - helper module to create localed url from app_details, paltforms and locale

  • pages/[locale]/[platformId]/[appId].js is the root path to create paths and params for each page. []- means responsive path.

    • getStaticPaths() that calls creation of paths by locale getTutorialsByLocale.
    • getTutorialData generates params for content and meta of tutorial page from platformId, localizedAppSlug and locale
  • components/supah_long.js is the camponent that draws all the tutoral page