127 lines
5.3 KiB
Markdown
127 lines
5.3 KiB
Markdown
1. Add contact form script.
|
|
SMTP_HOST = "smtp.postmarkapp.com"
|
|
SMTP_PORT = 587
|
|
SMTP_USER =
|
|
SMTP =
|
|
authentication: TLS, CRAM-MD5, or Plain text
|
|
Once script built. I will add the credentials. We need to add fastapi and not sure what else - python if we use a py script. Map to the form already published via Hugo, which goes into the home page, or index.html.
|
|
|
|
Changed the injected contact form in sync_content_to_hugo.py to post to /api/contact.
|
|
Added browser submit handling at contact-form.js.
|
|
Added FastAPI contact handler at contact_app.py.
|
|
Added VM/runtime notes at CONTACT_FORM_DEPLOYMENT.md.
|
|
|
|
Changed message home page to use form for contact, email subscribe or change email preferences.
|
|
|
|
Updated the generated contact form injection in sync_content_to_hugo.py.
|
|
Form now posts to /api/contact.
|
|
Added hidden honeypot field.
|
|
Added inline status message area.
|
|
Added frontend submit handling:
|
|
hugo-html-builder/static/assets/js/contact-form.js
|
|
Published to public/assets/js/contact-form.js
|
|
Added FastAPI contact form backend:
|
|
api/contact_app.py
|
|
Endpoint: /api/contact
|
|
Health check: /api/contact/healthz
|
|
Uses Postmark SMTP via environment variables.
|
|
Added dependency file:
|
|
requirements-contact-api.txt
|
|
Added deployment notes:
|
|
CONTACT_FORM_DEPLOYMENT.md
|
|
Created local/VM Python virtual environment approach for the contact API.
|
|
Avoided system-wide pip install due to externally managed Python environment.
|
|
Installed FastAPI, Uvicorn, and form parsing dependencies in .venv-contact.
|
|
On the server, we installed/added support for the contact form by setting up:
|
|
|
|
A Python virtual environment in the site repo:
|
|
/path/to/structured-website-builder/.venv-contact/
|
|
Python packages from:
|
|
/path/to/structured-website-builder/requirements-contact-api.txt
|
|
Those installed:
|
|
|
|
fastapi
|
|
python-multipart
|
|
uvicorn
|
|
plus their dependencies.
|
|
|
|
A FastAPI app from the repo:
|
|
/path/to/structured-website-builder/api/contact_app.py
|
|
A systemd service, likely:
|
|
/etc/systemd/system/indx-contact.service
|
|
which runs:
|
|
|
|
/path/to/structured-website-builder/.venv-contact/bin/uvicorn api.contact_app:app --host 0.0.0.0 --port 8091
|
|
An env file for SMTP/Postmark credentials:
|
|
/etc/indx-contact.env
|
|
A UFW rule allowing the Caddy router/LAN to reach the API on port 8091.
|
|
|
|
A Caddy route so:
|
|
|
|
https://indx.earth/api/contact
|
|
proxies to:
|
|
|
|
<contact-api-host>:8091
|
|
|
|
Added .gitignore so .venv-contact/, __pycache__/, and Python bytecode are not committed.
|
|
Added missing date: 2026-05-10 to the two May 10 community summary markdown files so Hugo sorts them newest-first.
|
|
Configured production contact API support:
|
|
Ran Uvicorn contact API on app VM port 8091.
|
|
Adjusted Uvicorn binding from 127.0.0.1 to 0.0.0.0 so Caddy router can reach it.
|
|
Confirmed Docker ports do not conflict:
|
|
Discourse/community container: 8080
|
|
iNDX front container: 8090
|
|
Contact API: 8091
|
|
Opened UFW access for port 8091 from LAN/Caddy router.
|
|
Updated Caddy routing for indx.earth so /api/contact* proxies to <contact-api-host>:8091.
|
|
Verified:
|
|
https://indx.earth/api/contact/healthz returns {"status":"ok"}.
|
|
Public POST to https://indx.earth/api/contact returns {"ok":true}.
|
|
Email send test succeeded through Postmark.
|
|
server file with smpt creds is /etc/indx-contact.env
|
|
|
|
2. Page fixes:
|
|
- under C:\path\to\structured-website-builder\content\community-summaries\home-health, made minor text adjustments so repulish these pages
|
|
- under C:\path\to\structured-website-builder\content\community-summaries\paddling, made minor text adjustments so repulish these pages
|
|
- under C:\path\to\structured-website-builder\content, home.md page: added line breaks between sitemap links for better reading
|
|
|
|
DOne.
|
|
|
|
3. make summary pages with published pages in descending order, not ascending for data added: C:\path\to\structured-website-builder\public\community-summaries\home-health\index.html and C:\path\to\structured-website-builder\public\community-summaries\paddling\index.html
|
|
|
|
Added missing date: 2026-05-10 to the two May 10 summary pages so Hugo can sort them newest-first.
|
|
|
|
4. fix page template anchors co+ platform summaries to sitemap. This link at topof page: CO+ Platform Summaries - anchor should be to sitemap (https://indx.earth/#sitemap). This is an adjustment to the page template: C:\path\to\structured-website-builder\hugo-html-builder\layouts\_default\baseof.html THis adjustment was made manually by me. Now republish all pages with this correct template.
|
|
|
|
Done
|
|
|
|
5. wider screen view change in template. I think we make to 90% of page width. in C:\path\to\structured-website-builder\hugo-html-builder\layouts\_default\baseof.html I see several parameters around width
|
|
|
|
.site-container {
|
|
width: min(1120px, calc(100% - 32px));
|
|
margin: 0 auto;
|
|
padding: 20px 0 40px;
|
|
}
|
|
|
|
main {
|
|
max-width: 860px;
|
|
}
|
|
|
|
Which needs to be adjusted? Adjusted and then we will test.
|
|
|
|
Done
|
|
|
|
6. add favicon. It is this file added to assets folder: C:\path\to\structured-website-builder\public\assets\images\logo_earth.png
|
|
|
|
added
|
|
|
|
7. Add google analytics tracking code to C:\path\to\structured-website-builder\hugo-html-builder\layouts\_default\baseof.html : <google-analytics-measurement-id> This is themeausrement ID. Is this the proper artifact to add, or is it stream ID?
|
|
|
|
added
|
|
|
|
submitted to google and bing sitemap
|
|
|
|
Create new git release v0.2.0
|
|
|
|
Removed Cloudflare bots blocking. Created manage rules for blocking bots on subdomains.
|