Endangered-Language-Alliance / ela-website

Endangered Language Alliance website
1 stars 0 forks source link

This is a Next.js project bootstrapped with create-next-app.

Netlify

Netlify
Status

The site is hosted on Netlify. Overview is here.

Documentation for CMSing

Plugins

In addition to built-in WP features, these plugins are doing the bulk of the work:

With the exception of Post Type Description the Projects or Languages CPT, avoid messing with the plugin stuff unless you're Jason. The Post Type Description field is an easy hack to allow content managers to control the Projects and Languages landing "hero" summary text in lieu of an Excerpt since those pages don't actually exist anywhere in WP.

How/where to edit content??

Usage

Development

  1. Run the development server: yarn dev
  2. Open http://localhost:3000 with your browser to see the result.
  3. You can start editing the page by modifying pages/index.js. The page auto-updates as you edit the file.
  4. API routes can be accessed on http://localhost:3000/api/hello. This endpoint can be edited in pages/api/hello.js.

The pages/api directory is mapped to /api/*. Files in this directory are treated as API routes instead of React pages.

Generate TS from WP GQL

Yusssss GraphQL/WP/TS Codegen magic

npm run create-wp-gql-ts

Sitemap

The sitemap.xml is created post-build using next-sitemap.js and the next-sitemap npm tool. Followed this guide to obtain the settings.

Setup Notes

Main site

DNS

Great explanation of why not all the records from GoDaddy are needed in a Netlify DNS domain (just the MX). Other than that pretty much just pointed the Name Servers in GoDaddy to Netlify. Guide here.

Content site

https://content.endangeredlanguagealliance.org/

HTTPS (SSL)

Followed this to enable it after pointing an A DNS record to AWS Lightsail instance IP address (MUST BE STATIC IP) in GoDaddy with content as the host (followed this).

Not sure if it was needed, probably not since never had to change GoDaddy nameservers, but did add a DNS zone in LightSail:

GoDaddy's nameservers for endangeredlanguagealliance.org:

Backup files from bncert output:

bncert makes automatic renewals 👏

wp-config.php SSL

Had to manually set the WP_HOME and WP_SITEURL settings here.

SSH

~~Followed this using default key.~~ No longer works, need to use the browser/client SSH. Once you're in, find the wordpress install here:

cd apps/wordpress/htdocs

...and note that the <Esc> key had to be remapped in ~/.vimrc because ESC does not work within the SSH window. 😠

Permissions

Waaaaay too much trouble but followed this for media perms.

Email

Followed this tutorial to set up OAuth.

When Lightsail Crashes

...or at least when Apache crashes? SSH in via web UI, then:

sudo /opt/bitnami/ctlscript.sh restart

Tuts to Consider

https://codepen.io/the_ruther4d/post/custom-query-string-vars-in-wordpress

things