Files
structured-website-builder-…/tasks-workflows/2026-05-15-fixes.md
T

126 lines
5.3 KiB
Markdown
Raw Permalink Normal View History

2026-06-09 11:57:54 -06:00
1. Add contact form script.
SMTP_HOST = "smtp.postmarkapp.com"
2026-06-06 06:37:41 -06:00
SMTP_PORT = 587
SMTP_USER =
2026-06-09 11:57:54 -06:00
SMTP =
2026-06-06 06:37:41 -06:00
authentication: TLS, CRAM-MD5, or Plain text
2026-06-09 11:57:54 -06:00
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.
2026-06-06 06:37:41 -06:00
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.
2026-06-09 11:57:54 -06:00
Changed message home page to use form for contact, email subscribe or change email preferences.
2026-06-06 06:37:41 -06:00
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
2026-06-09 11:57:54 -06:00
Uses Postmark SMTP via environment variables.
2026-06-06 06:37:41 -06:00
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
2026-06-09 11:57:54 -06:00
An env file for SMTP/Postmark credentials:
2026-06-06 06:37:41 -06:00
/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}.
2026-06-09 11:57:54 -06:00
Email send test succeeded through Postmark.
2026-06-06 06:37:41 -06:00
server file with smpt creds is /etc/indx-contact.env
2026-06-09 11:57:54 -06:00
2. Page fixes:
2026-06-06 06:37:41 -06:00
- 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
2026-06-09 11:57:54 -06:00
DOne.
2026-06-06 06:37:41 -06:00
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.
2026-06-09 11:57:54 -06:00
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.
2026-06-06 06:37:41 -06:00
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;
}
2026-06-09 11:57:54 -06:00
Which needs to be adjusted? Adjusted and then we will test.
2026-06-06 06:37:41 -06:00
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
2026-06-09 11:57:54 -06:00
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?
2026-06-06 06:37:41 -06:00
added
submitted to google and bing sitemap
Create new git release v0.2.0
2026-06-09 11:57:54 -06:00
Removed Cloudflare bots blocking. Created manage rules for blocking bots on subdomains.