Skip to content

clintrandall/endeavor-business-media

 
 

Repository files navigation

BaseCMS Websites for Endeavor Business Media

This monorepo contains the codebase for websites managed by Endeavor Business Media. All sites within this repository utilize the @base-cms/base-cms packages, most notably the marko-web and web-cli.

First Steps

$ ./scripts/yarn.sh

$ docker-compose up [site-name.com]

Ex: docker-compose up laserfocusworld.com

Errors

GraphQL error: The provided application context does not match the app for the user.

Resolution

Clear your browser cookies. This could be caused by user login context.

Copy Method

If you wish to use an existing site as a starting point,begin by creating a new branch and then copy the site directory (recursively) to the new site name:

cp -R sites/sitetocopy sites/mynewsite

This is a good time for the first commit, as you can then commit each change below individually (helps with code review later).

Next, update the following files:

# /docker-compose.yml
# Be sure to increment ports to unused values
+  my-new-site:
+    <<: *node
+    <<: *site-cmd
+    working_dir: /root/sites/mynewsite
+    environment:
+      <<: *env
+      <<: *env-clustername-staging
+      PORT: 80
+      EXPOSED_PORT: 9711
+      LIVERELOAD_PORT: 19711
+      TENANT_KEY: mynewsite_key
+      CDN_IMAGE_HOSTNAME: img.mynewsite.com
+      CDN_ASSET_HOSTNAME: cdn.mynewsite.com
+    ports:
+      - "9711:80"
+      - "19711:19711"
# /travis.yml
+    - stage: deploy
+      name: My New Site
+      script: deploy/index.js mynewsite clustername
+      install: skip
# /sites/mynewsite/package.json
-  "name": "@endeavor-business-media/sitetocopy",
+  "name": "@endeavor-business-media/mynewsite",
-  "author": "John Doe <[email protected]>",
+  "author": "Jack Smith <[email protected]>",
-  "repository": "https://github.com/base-cms-websites/your-repository/tree/master/sites/sitetocopy",
+  "repository": "https://github.com/base-cms-websites/your-repository/tree/master/sites/mynewsite",
# /sites/mynewsite/config/core.js
-  siteName: 'Site to Copy',
+  siteName: 'My New Site',
# /sites/mynewsite/config/gam.js
-  const config = new GAMConfiguration('###########', { basePath: 'OLD' });
+  const config = new GAMConfiguration('###########', { basePath: 'NEW' });

# Add/Remove setAliasAdUnits values as needed
# /sites/mynewsite/config/gcse.js
-  const config = new GCSEConfiguration('#####################:aaaaaaaaaaa');
+  const config = new GCSEConfiguration('#####################:bbbbbbbbbbb');
# /sites/mynewsite/config/native-x.js
# Add/Remove setAliasPlacements values as needed
# /sites/mynewsite/config/navigation.js
# Update values as needed
# /sites/mynewsite/config/site.js
# Update values as needed
# /sites/mynewsite/server/styles/index.scss
# Update values as needed
# /sites/mynewsite/server/public/robots.txt
+  Disallow: /
-  Sitemap: https://www.sitetocopy.com/sitemap.xml
+  Sitemap: https://www.mynewsite.com/sitemap.xml
-  Sitemap: https://www.sitetocopy.com/sitemap-google-news.xml
+  Sitemap: https://www.mynewsite.com/sitemap-google-news.xml
# /sites/mynewsite/server/templates/subscribe/index.marko
# Update subscribe URL (found in old /sites/mynewsite/config/site.js)
# /sites/mynewsite/server/public
# Replace all icon files

When copying sites, ensure that unused components, templates, and routes are not copied inadvertently.

About

BaseCMS Websites for Endeavor Business Media

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 69.9%
  • Marko 25.2%
  • SCSS 3.3%
  • Vue 1.6%