====== Publishing on a Pubnix ======
How tildes serve user content. The model is the same across town, pink, club, green, envs, and sdf.
===== The Directories =====
^ Dir in ''~'' ^ Served at ^ Protocol ^
| ''public_html/'' | ''host.tld/~you/'' | http |
| ''public_gopher/'' | ''host.tld'' port 70 | gopher |
| ''public_gemini/'' | ''gemini://host.tld/~you/'' | gemini |
Anything dropped in is live immediately. No deploy step, no build queue: the server is just a web server reading your home directory.
===== Permissions =====
The thing everyone forgets:
chmod 755 ~ # home must be traversable
chmod 755 ~/public_html # dirs: 755
chmod 644 ~/public_html/index.html # files: 644
chmod 664 file # communal file: group-write
chmod 775 dir # communal dir
The symptom of getting this wrong is a ''403 Forbidden'' on a file that definitely exists. It is always permissions.
===== The Workflow =====
Edit locally, push with rsync:
rsync -avhP --delete ~/site/ host:public_html/
rsync -avhP ~/site/ you@tilde.town:public_html/
* ''--delete'' mirrors exactly. Preview with ''-n'' (dry run) first.
* ''sshfs'' works too (''sshfs host:public_html ~/mnt''), but rsync does not depend on connection quality.
* On the host, everything is editable live: ssh in, edit ''~/public_html/index.html'' in nano or vim, done.
===== Town-Specific Conventions =====
* **ttbp** ("feels"): the town diary tool. One plaintext entry per day, renders to ''~/public_html/feels/'' and gopher. See [[tilde:tools|tilde.town Tools]].
* **town planet**: the blog aggregator. List your feed URL in ''~/.planetfeeds'' to join it. See [[indieweb:rss_by_hand|RSS by Hand]] for making a feed.
* **town square**: ''/town/square/public_html'' maps to ''tilde.town/square''. Shared and world-writable. See [[tilde:town_square|Town Square]].
* **guestbook.txt**: convention for leaving notes. Link it from your index so visitors know it exists.
===== What Feels Native =====
* Hand-written or lightly generated HTML. Heavy JS sites feel alien on a pubnix.
* Link to your other tildes. Webring and badge culture is still active: 88x31 buttons are the convention.
* ''robots.txt'' and a favicon are cheap politeness.
* A ''.plan'' file (what ''finger you@host'' shows) is the old-school status line. See [[terminal:shell:plan|.plan and .project]].
===== See Also =====
* [[tilde:start|tilde.town]]
* [[tilde:accounts|A Tilde Account]]
* [[indieweb:bashblog|bashblog]]
* [[indieweb:tiny_ssg|Minimal Static Site Generators]]
* [[protocols:gopher:start|Gopher]] ยท [[protocols:gemini:start|Gemini]]
* [[start|Return to wiki home]]