Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 27 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
SBLG = sblg
LOWDOWN = lowdown
PREFIX = $(PWD)/site
BLOG_SRC_TOP_DIR = blogsource/content
BLOG_POST_SRC_DIR = $(BLOG_SRC_TOP_DIR)/post
BLOG_POST_OUT_TOP_DIR = blog
BLOG_POST_OUT_DIR = $(BLOG_POST_OUT_TOP_DIR)/post
BLOG_POSTS = $(wildcard $(BLOG_POST_SRC_DIR)/*.md)
BLOG_POSTS_OUT = $(subst $(BLOG_POST_SRC_DIR), $(BLOG_POST_OUT_DIR), $(BLOG_POSTS:.md=.html))
BLOG_POSTS_OUT = $(subst $(BLOG_POST_SRC_DIR), $(BLOG_POST_OUT_DIR), $(BLOG_POSTS:.md=.html))
CONTRIBUTORS_SRC_DIR = blogsource/content/contributors
CONTRIBUTORS_OUT_DIR = contributors
CONTRIBUTORS = $(wildcard $(CONTRIBUTORS_SRC_DIR)/*.md)
PAGES_SRC_DIR = pagesource
PAGES_SRC = $(wildcard $(PAGES_SRC_DIR)/*.xml)
PAGES = $(subst $(PAGES_SRC_DIR)/,,$(PAGES_SRC:.xml=.html))
PAGES_SRC = $(wildcard $(PAGES_SRC_DIR)/*.md)
PAGES_XML = $(subst $(PAGES_SRC_DIR)/,,$(PAGES_SRC:.md=.xml))
PAGES = $(PAGES_XML:.xml=.html)
REDIRECTS_DIR = pageredirects
REDIRECTS_SRC = $(wildcard $(REDIRECTS_DIR)/*.html)
REDIRECTS = $(subst $(REDIRECTS_DIR)/,,$(REDIRECTS_SRC))
Expand Down Expand Up @@ -40,17 +42,32 @@ install: index.html $(PAGES) themegallery.html $(BLOG_POSTS_OUT) $(BLOG_POST_OU
cp -p -r tarballs $(PREFIX)


index.html: landing-template.xml index.xml profanity_version.txt
index.html: landing-template.xml index.md profanity_version.txt
sed -e 's/$${version}/$(VERSION)/g' \
-e 's/$${tar_xz_sha256}/$(TAR_XZ_SHA256)/g' \
-e 's/$${zip_sha256}/$(ZIP_SHA256)/g' index.xml > index.gen.xml
$(SBLG) -o $@ -t landing-template.xml -c index.gen.xml
rm -f index.gen.xml
-e 's/$${zip_sha256}/$(ZIP_SHA256)/g' index.md > index.tmpmd
echo "<article data-sblg-article=\"1\" data-sblg-set-title=\"Profanity, a console based XMPP client - Home\" data-sblg-set-subtitle=\"A console based XMPP client\">" >$(@:.html=.xml)
$(LOWDOWN) --html-no-head-ids --html-no-skiphtml --html-no-escapehtml index.tmpmd >>$(@:.html=.xml)
echo "</article>" >>$(@:.html=.xml)
sed -e 's|<p>$${div_content}</p>|<div id="content">|g' $(@:.html=.xml) > $(@:.html=.tmpxml)
sed -e 's|<p>$${div_features}</p>|<div id="features">|g' $(@:.html=.tmpxml) > $(@:.html=.xml)
sed -e 's|<p>$${div_screenshots}</p>|<div id="screenshots">|g' $(@:.html=.xml) > $(@:.html=.tmpxml)
sed -e 's|<p>$${div_end}</p>|</div>|g' $(@:.html=.tmpxml) > $(@:.html=.xml)
$(SBLG) -o $@ -t landing-template.xml -c index.xml
rm -f index.xml index.tmpxml index.tmpmd

$(PAGES): manual-template.xml
cp --preserve=mode,ownership,timestamps $(addprefix $(PAGES_SRC_DIR)/,$(@:.html=.xml)) .
$(PAGES): manual-template.xml $(PAGES_XML)
$(SBLG) -o $@ -t manual-template.xml -c $(@:.html=.xml)
rm -f $(PAGES:.html=.xml)
rm -f $(@:.html=.xml)

$(PAGES_XML): $(PAGES_SRC)
cp $(addprefix $(PAGES_SRC_DIR)/,$(@:.xml=.md)) .
echo "<article id=\"manual\" data-sblg-article=\"1\" data-sblg-set-title=\"`$(LOWDOWN) -X title $(@:.xml=.md)`\" data-sblg-set-subtitle=\"`$(LOWDOWN) -X subtitle $(@:.xml=.md)`\">" >$@
$(LOWDOWN) --html-no-skiphtml --html-no-escapehtml $(subst .xml,.md,$@) >>$@
echo "</article>" >>$@
sed -e 's|<p>$${section_start}</p>|<section>|g' $@ > $(@:.xml=.tmpxml)
sed -e 's|<p>$${section_end}</p>|</section>|g' $(@:.xml=.tmpxml) > $@
rm -f $(@:.xml=.md) $(@:.xml=.tmpxml)

themegallery.html: gallery-template.xml
$(SBLG) -o $@ -t gallery-template.xml -c themegallery.xml
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Sources for https://profanity-im.github.io

The website is generated from XML and Markdown sources using [sblg](https://kristaps.bsd.lv/sblg/) and [lowdown](https://kristaps.bsd.lv/lowdown).
The website is generated from XML templates and Markdown sources using [sblg](https://kristaps.bsd.lv/sblg/) and [lowdown](https://kristaps.bsd.lv/lowdown).

## Reference

| To Change... | Edit File(s) | Format |
| :--- | :--- | :--- |
| **Home Page (Landing)** | `index.xml` | XML Fragment |
| **Top-Level Pages** (FAQ, Donate, etc.) | `pagesource/*.xml` | XML Fragment |
| **Home Page (Landing)** | `index.content.md`, `index.features.md` and `index.screenshots.md` | Markdown |
| **Top-Level Pages** (FAQ, Donate, etc.) | `pagesource/*.md` | Markdown |
| **Blog Posts** | `blogsource/content/post/*.md` | Markdown |
| **Blog User Profiles** | `blogsource/content/contributors/*.md` | Markdown |
| **Site Header/Footer (Home)** | `landing-template.xml` | HTML Template |
Expand All @@ -17,7 +17,7 @@ The website is generated from XML and Markdown sources using [sblg](https://kris
| **Style** | `css/*.css` | CSS |

### Page Sources
The source files for the landing page (`index.xml`) and other top level pages in `pagesource/` are XML fragments. They contain the HTML content for the body, which is then injected into the appropriate header and footer templates.
The source files for the landing page (`index.content.md`, `index.features.md` and `index.screenshots.md`) and other top level pages in `pagesource/` are writen in Markdown. They are transformed to HTML and then injected into the appropriate header and footer templates.

### Blog
Blog posts and contributor profiles are written in Markdown.
Expand Down Expand Up @@ -47,6 +47,6 @@ When a new version of Profanity is released:

1. Update the version string in `profanity_version.txt`.
2. Add the new `.tar.xz` and `.zip` source tarballs to the `tarballs/` directory.
3. Generate the documentation for the new version (`profanity docgen` see RELEASE_NOTES.md in the profanity repo) and copy it to a new subdirectory in `guide/`. Add a link to the new guide in `pagesource/userguide.xml`.
3. Generate the documentation for the new version (`profanity docgen` see RELEASE_NOTES.md in the profanity repo) and copy it to a new subdirectory in `guide/`. Add a link to the new guide in `pagesource/userguide.md`.

Do not manually update the version strings or SHA-256 hashes in `index.html`. These are calculated dynamically from the files during the build process on GitHub Actions.
9 changes: 5 additions & 4 deletions blogsource/content/contributors/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SBLG = sblg
LOWDOWN = lowdown
CONTRIBUTORS = $(wildcard *.md)
CONTRIBUTORS_XML = $(CONTRIBUTORS:.md=.xml)
CONTRIBUTORS_OUT = $(CONTRIBUTORS_XML:.xml=.html)
Expand All @@ -12,12 +13,12 @@ $(CONTRIBUTORS_OUT) index.html: $(CONTRIBUTORS_XML) contributor-template.xml con
$(CONTRIBUTORS_XML): $(CONTRIBUTORS)
echo "<article id=\"manual\" data-sblg-article=\"1\">" >$@
echo " <header>" >>$@
echo " <h3>`lowdown -X name $(subst .xml,.md,$@)`</h3>" >>$@
echo " <h3>`$(LOWDOWN) -X name $(subst .xml,.md,$@)`</h3>" >>$@
echo " </header>" >>$@
test -f img/$(shell lowdown -X name $(subst .xml,.md,$@)).jpg && \
echo " <img src=\"img/`lowdown -X name $(subst .xml,.md,$@)`.jpg\" alt=\"Avatar for `lowdown -X name $(subst .xml,.md,$@)`.\"/>" >>$@ || \
test -f img/$(shell $(LOWDOWN) -X name $(subst .xml,.md,$@)).jpg && \
echo " <img src=\"img/`$(LOWDOWN) -X name $(subst .xml,.md,$@)`.jpg\" alt=\"Avatar for `$(LOWDOWN) -X name $(subst .xml,.md,$@)`.\"/>" >>$@ || \
echo No image
lowdown $(subst .xml,.md,$@) >>$@
$(LOWDOWN) --html-no-skiphtml --html-no-escapehtml $(subst .xml,.md,$@) >>$@
echo "</article>" >>$@

clean:
Expand Down
7 changes: 4 additions & 3 deletions blogsource/content/post/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SBLG = sblg
LOWDOWN = lowdown
BLOG_POSTS = $(wildcard *.md)

PAGES_OUT = $(PAGES:.xml=.html)
Expand All @@ -19,11 +20,11 @@ $(BLOG_POSTS_OUT): $(BLOG_POSTS_XML) blog-post-template.xml
$(BLOG_POSTS_XML): $(BLOG_POSTS)
echo "<article id=\"manual\" data-sblg-article=\"1\">" >$@
echo " <header>" >>$@
echo " <h3>`lowdown -X title $(subst .xml,.md,$@)`</h3>" >>$@
echo " <h3>`$(LOWDOWN) -X title $(subst .xml,.md,$@)`</h3>" >>$@
echo " <address><a href=\"../../contributors/`lowdown -X authors $(subst .xml,.md,$@)`.html\">`lowdown -X authors $(subst .xml,.md,$@)`</a></address>" >>$@
echo " <time datetime=\"`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`\">`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`</time>" >>$@
echo " <time datetime=\"`$(LOWDOWN) -X date $(subst .xml,.md,$@) | cut -f1 -dT`\">`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`</time>" >>$@
echo " </header>" >>$@
lowdown $(subst .xml,.md,$@) >>$@
$(LOWDOWN) $(subst .xml,.md,$@) >>$@
echo "</article>" >>$@

clean:
Expand Down
69 changes: 69 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
title: Profanity, a console based XMPP client - Home
subtitle: A console based XMPP client

${div_content}

#### Profanity is a console based XMPP client written in C using [ncurses](http://www.gnu.org/software/ncurses/) and [libstrophe](http://strophe.im/libstrophe/), inspired&nbsp;by&nbsp; [Irssi](http://irssi.org/)


Available on Linux, FreeBSD, OpenBSD, OSX, Windows and Android (Termux)

Do you like Profanity?
Consider [donating](donate.html)!

**Latest release:**
**[profanity-${version}.tar.xz](tarballs/profanity-${version}.tar.xz id="download-tarball")**
sha256: <span class="hash">${tar_xz_sha256}</span>

**[profanity-${version}.zip](tarballs/profanity-${version}.zip id="download-zip")**
sha256: <span class="hash">${zip_sha256}</span>

**Documentation:**
[User Guide](userguide.html)
[FAQ](faq.html)
[Supported XEPs](xeps.html)
[Plugins](plugins.html)
[Reporting Issues](issues.html)
[How to help out](helpout.html)
[Blog](blog/post/index.html)
[Theme Gallery](themegallery.html)

**Links:**
[GitHub](http://github.com/profanity-im/profanity)
[Mailing List](https://lists.posteo.de/listinfo/profanity)
[Twitter](https://twitter.com/profanityim)
[xmpp:profanity@rooms.dismail.de](xmpp:profanity@rooms.dismail.de?join)

${div_end}

${div_features}

### Features

![](images/profanity_logo.png "Profanity Logo")

- Supports XMPP chat services
- MUC chat room support
- OTR, PGP and OMEMO encryption
- Roster management
- Flexible resource and priority settings
- Desktop notifications
- Plugins in Python and C

${div_end}

${div_screenshots}

### Screenshots

- [![](images/prof-1.webp)](images/prof-1.webp)
- [![](images/profroster.webp)](images/profroster.webp)
- [![](images/profoldterm.webp)](images/profoldterm.webp)
- [![](images/roompanel.webp)](images/roompanel.webp)
- [![](images/profxfce.webp)](images/profxfce_small.webp)
- [![](images/prof_mac.webp)](images/prof_mac_small.webp)
- [![](images/prof-win.webp)](images/prof-win.webp)
- [![](images/prof-pink.webp)](images/prof-pink.webp)
- [![](images/2-barebones-chat.webp)](images/2-barebones-chat.webp)

${div_end}
75 changes: 0 additions & 75 deletions index.xml

This file was deleted.

52 changes: 52 additions & 0 deletions pagesource/accounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
title: Profanity, a console based XMPP client - Account Configuration
subtitle: Account Configuration

${section_start}

### Contents

- [Configuring Accounts](#configuring-accounts)

${section_end}

${section_start}

### Configuring Accounts

The [<code>/account</code>](reference.html#account) command should be used to
modify the settings below.

The following is an example account configuration file with two configured
accounts.

```[jabber]
enabled=true
priority.online=10
priority.chat=20
priority.away=0
priority.xa=0
priority.dnd=-10
jid=someone@jabber.org
resource=laptop
presence.last=xa
presence.login=online
muc.service=conference.jabber.org
muc.nick=aperson

[work]
enabled=true
priority.online=2
priority.chat=1
priority.away=0
priority.xa=-5
priority.dnd=-10
jid=bob.smith@mycompany.org
server=talk.mycompany.org
resource=office
presence.last=online
presence.login=away
muc.service=rooms.mycompany.org
muc.nick=smithy
```

${section_end}
51 changes: 0 additions & 51 deletions pagesource/accounts.xml

This file was deleted.

Loading
Loading