Skip to content

Commit a17b733

Browse files
authored
Merge pull request #207 from performant-software/develop
Develop into master
2 parents 970868f + 4e593e5 commit a17b733

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+2982
-921
lines changed

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,9 @@ Copy the `/data/users.json` file into your content repository to `/content/users
3131

3232
| Key | Type | Description |
3333
|----------------------------------------|---------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
34-
| branding | Object | Branding configuration |
35-
| branding.primary | String | Primary theme color for website, in hex format (must be full six-digit hex, e.g. `#ffffff`) |
36-
| branding.header_logo | String | URL of logo image to appear in header |
37-
| branding.header_hide_title | Boolean | If true, suppresses the text title from the header |
38-
| branding.footer_logo | String | URL of logo image to appear in footer |
39-
| branding.footer_hide_logo | Boolean | If true, suppresses the text title from the footer and displays a larger version of the logo |
40-
| branding.footer_orgs | Array | Logos and links for organizations/partners to appear in footer |
41-
| branding.footer_orgs.logo | String | URL of logo of an included organization |
42-
| branding.footer_orgs.url | String | URL to which the logo of this org should link |
43-
| branding.footer_orgs.alt | String | Alt text for the logo of this org (e.g. the org title) |
44-
| branding.footer_login | Boolean | If true, displays links in the footer to log into Core Data and TinaCMS |
45-
| content | Array | Array of content keys to allow for data entry and routing: "posts", "paths" |
34+
| content | Object | TinaCMS content collections configuration |
35+
| content.collections | Array | Array of content keys to allow for data entry and routing: "posts", "paths" |
36+
| content.localize_pages | Boolean | If `true` pages content will be pulled from a locale directory (e.g. `/en/My-Awesome-Page.mdx`) |
4637
| core_data | Object | Core Data configuration |
4738
| core_data.url | String | URL of the Core Data application |
4839
| core_data.project_ids | Array | Numeric array of Core Data project IDs to be included |
@@ -146,7 +137,7 @@ Move the `.mdx` files in the `content/about`, `content/paths`, `/content/posts`
146137

147138
If using Astro, media will typically be stored in `/src/assets`. These media files will need to be moved to the newly created S3 bucket and the paths in the `.mdx` files will need to be updated accordingly.
148139

149-
##### Search detail filtering
140+
## Search detail filtering
150141

151142
You can filter what is shown in the detail pane when clicking an item in the search view. This is accomplished by adding a result_filtering object to the search block in the config.json file in the content directory.
152143

@@ -184,3 +175,31 @@ The following related records can be excluded:
184175
```
185176
"exclude":["name", "2f400af6-ee3f-42e4-8321-7b92c5a7cd23", "place_layers", "relatedOrganizations"]
186177
```
178+
179+
## Static Build
180+
Follow the instructions below to build a static version of a site to host on GitHub Pages, Reclaim Hosting, AWS, etc. The steps will include instructions for building the site on a local development machine and uploading the assets to a static hosting service.
181+
182+
#### Core Data on Heroku
183+
For Core Data applications hosted on Heroku, it may be advisable to scale the dyno infrastructure, either by upgrading the web dynos and/or adding more dynos.
184+
185+
#### 1. Build
186+
From `/path/to/core-data-places` run the following:
187+
188+
```
189+
npm install && npm run build
190+
```
191+
192+
This command will install all node dependencies, and build the AstroJS site. The time required to build the site will be directly proportional to the amount of data contained in the Core Data project as it will:
193+
- Fetch all of the records from Core Data to store in the Astro Content Layer
194+
- Build static pages and API endpoints for each of the records
195+
196+
Build times can also be affected by the number of content records (paths, posts, pages, etc) added to TinaCMS, but this will likely be trivial compared to the number of Core Data records.
197+
198+
#### 2. Compress
199+
After building has completed, assets will be exported to the `/dist` directory. Use a compression utility to zip the contents of the directory.
200+
201+
#### 3. Transfer
202+
Using a FTP/SFTP service, transfer compressed assets to the static hosting platform.
203+
204+
#### 4. Extract
205+
Extract the contents of the compressed assets to the root path of the webserver.

astro.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import mdx from '@astrojs/mdx';
22
import netlify from '@astrojs/netlify';
33
import react from '@astrojs/react';
44
import sitemap from '@astrojs/sitemap';
5-
import tailwind from '@astrojs/tailwind';
65
import { defineConfig } from 'astro/config';
6+
import tailwindcss from '@tailwindcss/vite';
77
import { loadEnv } from 'vite';
88
import config from './public/config.json';
99

@@ -23,7 +23,7 @@ export default defineConfig({
2323
},
2424
output: STATIC_BUILD === 'true' ? 'static' : 'server',
2525
adapter: netlify(),
26-
integrations: [mdx(), tailwind(), sitemap(), react(), auth()],
26+
integrations: [mdx(), sitemap(), react(), auth()],
2727
vite: {
2828
optimizeDeps: {
2929
esbuildOptions: {
@@ -36,6 +36,7 @@ export default defineConfig({
3636
noExternal: ['clsx', '@phosphor-icons/*', '@radix-ui/*']
3737
}
3838
},
39+
plugins: [tailwindcss()],
3940
resolve: {
4041
preserveSymlinks: true,
4142
mainFields: [

0 commit comments

Comments
 (0)