Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate server-rendered files #84

Closed
7 tasks
joshbruce opened this issue Nov 11, 2021 · 2 comments · Fixed by #125
Closed
7 tasks

Consolidate server-rendered files #84

joshbruce opened this issue Nov 11, 2021 · 2 comments · Fixed by #125

Comments

@joshbruce
Copy link
Member

joshbruce commented Nov 11, 2021

Describe the feature

.
├── content/
│   └── public/
│       ├── .htacces
│       ├── content.md
│       ├── error-*.md
│       └── sitemap.xml
├── site-dynamic-php/
│   └── public/
│       ├── .htaccess (appended compared to site-static-html)
│       ├── error-500.html
│       ├── index.php
│       └── robots.txt
└── site-static-html/
    └── public/
        ├── .htaccess
        ├── error-*.html
        ├── index.html
        ├── sitemap.xml    
        └── robots.txt

Two commands??

php amos compile:dynamic

php amos compile:static
  1. compile:server will only update site-dynamic-php.
    • Will append .htaccess.
    • Will only copy error-500.html.
    • Will copy robots.txt.
  2. compile:static will update site-dynamic-php and site-static-html.
    • Will run compile:server.
    • Will do everything compile currently does.

The .html files should be the same between the two styles.

.htaccess haș the addition of the mod_rewrite to "floor" the server.

Why is this feature necessary?

Maintenance and consistency until or unless we choose one or the other.

Let the server be a server.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

@joshbruce
Copy link
Member Author

Thinking the safest and easiest approach would be to create two commands for the generator script.

  1. That renders the static site
  2. The other renders and copies the root files into site-static-html and site-dynamic-php

@joshbruce joshbruce pinned this issue Nov 11, 2021
@joshbruce
Copy link
Member Author

The site-dynamic-php doesn't actually use any of the static HTML files except error-500.html.

  • Sitemap is generated dynamically.
  • Error responses are handled dynamically.

@joshbruce joshbruce mentioned this issue Nov 16, 2021
7 tasks
@joshbruce joshbruce unpinned this issue Nov 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant