Skip to content

Commit 5720ec6

Browse files
committed
Convert page sources to markdown
Internal links are have not been preserved. Original links can be added again, though may increase maintenance burden. Some content is also outdated and will need to be updated.
1 parent 897dcb0 commit 5720ec6

21 files changed

Lines changed: 1094 additions & 884 deletions

Makefile

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
SBLG = sblg
22
XSLTPROC = xsltproc
3+
LOWDOWN = lowdown
34
PREFIX = $(PWD)/site
45
BLOG_SRC_TOP_DIR = blogsource/content
56
BLOG_POST_SRC_DIR = $(BLOG_SRC_TOP_DIR)/post
67
BLOG_POST_OUT_TOP_DIR = blog
78
BLOG_POST_OUT_DIR = $(BLOG_POST_OUT_TOP_DIR)/post
89
BLOG_POSTS = $(wildcard $(BLOG_POST_SRC_DIR)/*.md)
9-
BLOG_POSTS_OUT = $(subst $(BLOG_POST_SRC_DIR), $(BLOG_POST_OUT_DIR), $(BLOG_POSTS:.md=.html))
10+
BLOG_POSTS_OUT = $(subst $(BLOG_POST_SRC_DIR), $(BLOG_POST_OUT_DIR), $(BLOG_POSTS:.md=.html))
1011
CONTRIBUTORS_SRC_DIR = blogsource/content/contributors
1112
CONTRIBUTORS_OUT_DIR = contributors
1213
CONTRIBUTORS = $(wildcard $(CONTRIBUTORS_SRC_DIR)/*.md)
1314
PAGES_SRC_DIR = pagesource
14-
PAGES_SRC = $(wildcard $(PAGES_SRC_DIR)/*.xml)
15-
PAGES_SRC += xeps.xml
16-
PAGES = $(subst $(PAGES_SRC_DIR)/,,$(PAGES_SRC:.xml=.html))
15+
PAGES_SRC = $(wildcard $(PAGES_SRC_DIR)/*.md)
16+
PAGES_MD_TO_XML = $(subst $(PAGES_SRC_DIR)/,,$(PAGES_SRC:.md=.xml))
17+
PAGES_XML = $(PAGES_MD_TO_XML)
18+
PAGES_XML += xeps.xml
19+
PAGES = $(PAGES_XML:.xml=.html)
1720
REDIRECTS_DIR = pageredirects
1821
REDIRECTS_SRC = $(wildcard $(REDIRECTS_DIR)/*.html)
1922
REDIRECTS = $(subst $(REDIRECTS_DIR)/,,$(REDIRECTS_SRC))
@@ -42,25 +45,40 @@ install: index.html $(PAGES) themegallery.html $(BLOG_POSTS_OUT) $(BLOG_POST_OU
4245
cp -p -r tarballs $(PREFIX)
4346

4447

45-
index.html: landing-template.xml index.xml profanity_version.txt
48+
index.html: landing-template.xml index.md profanity_version.txt
4649
sed -e 's/$${version}/$(VERSION)/g' \
4750
-e 's/$${tar_xz_sha256}/$(TAR_XZ_SHA256)/g' \
48-
-e 's/$${zip_sha256}/$(ZIP_SHA256)/g' index.xml > index.gen.xml
49-
$(SBLG) -o $@ -t landing-template.xml -c index.gen.xml
50-
rm -f index.gen.xml
51+
-e 's/$${zip_sha256}/$(ZIP_SHA256)/g' index.md > index.tmpmd
52+
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)
53+
$(LOWDOWN) --html-no-head-ids --html-no-skiphtml --html-no-escapehtml index.tmpmd >>$(@:.html=.xml)
54+
echo "</article>" >>$(@:.html=.xml)
55+
sed -e 's|<p>$${div_content}</p>|<div id="content">|g' $(@:.html=.xml) > $(@:.html=.tmpxml)
56+
sed -e 's|<p>$${div_features}</p>|<div id="features">|g' $(@:.html=.tmpxml) > $(@:.html=.xml)
57+
sed -e 's|<p>$${div_screenshots}</p>|<div id="screenshots">|g' $(@:.html=.xml) > $(@:.html=.tmpxml)
58+
sed -e 's|<p>$${div_end}</p>|</div>|g' $(@:.html=.tmpxml) > $(@:.html=.xml)
59+
$(SBLG) -o $@ -t landing-template.xml -c index.xml
60+
rm -f index.xml index.tmpxml index.tmpmd
5161

52-
$(PAGES): manual-template.xml xeplist
53-
cp --preserve=mode,ownership,timestamps $(addprefix $(PAGES_SRC_DIR)/,$(@:.html=.xml)) .
62+
$(PAGES): manual-template.xml $(PAGES_MD_TO_XML) xeplist
5463
$(SBLG) -o $@ -t manual-template.xml -c $(@:.html=.xml)
55-
rm -f $(PAGES:.html=.xml)
64+
rm -f $(@:.html=.xml)
65+
66+
$(PAGES_MD_TO_XML): $(PAGES_SRC)
67+
cp $(addprefix $(PAGES_SRC_DIR)/,$(@:.xml=.md)) .
68+
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)`\">" >$@
69+
$(LOWDOWN) --html-no-skiphtml --html-no-escapehtml $(subst .xml,.md,$@) >>$@
70+
echo "</article>" >>$@
71+
sed -e 's|<p>$${section_start}</p>|<section>|g' $@ > $(@:.xml=.tmpxml)
72+
sed -e 's|<p>$${section_end}</p>|</section>|g' $(@:.xml=.tmpxml) > $@
73+
rm -f $(@:.xml=.md) $(@:.xml=.tmpxml)
5674

5775
xeplist: $(PAGES_SRC_DIR)/doap-stylesheet/style.xsl $(PAGES_SRC_DIR)/doap/profanity.doap \
5876
$(PAGES_SRC_DIR)/xeplist/xeplist.xml
5977
cp --preserve=mode,ownership,timestamps $(PAGES_SRC_DIR)/xeplist/xeplist.xml \
6078
$(PAGES_SRC_DIR)/doap-stylesheet/
6179
$(XSLTPROC) $(PAGES_SRC_DIR)/doap-stylesheet/style.xsl \
6280
$(PAGES_SRC_DIR)/doap/profanity.doap \
63-
> $(PAGES_SRC_DIR)/xeps.xml
81+
> xeps.xml
6482
rm $(PAGES_SRC_DIR)/doap-stylesheet/xeplist.xml
6583

6684
themegallery.html: gallery-template.xml

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
Sources for https://profanity-im.github.io
22

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

55
## Reference
66

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

1919
### Page Sources
20-
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 list of supported XEPS is generated using a git submodule for https://github.com/profanity-im/profanity/blob/master/profanity.doap.
20+
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. The list of supported XEPS is generated using a git submodule for https://github.com/profanity-im/profanity/blob/master/profanity.doap.
2121

2222
### Blog
2323
Blog posts and contributor profiles are written in Markdown.
@@ -55,6 +55,6 @@ When a new version of Profanity is released:
5555

5656
1. Update the version string in `profanity_version.txt`.
5757
2. Add the new `.tar.xz` and `.zip` source tarballs to the `tarballs/` directory.
58-
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`.
58+
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`.
5959

6060
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.

blogsource/content/contributors/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SBLG = sblg
2+
LOWDOWN = lowdown
23
CONTRIBUTORS = $(wildcard *.md)
34
CONTRIBUTORS_XML = $(CONTRIBUTORS:.md=.xml)
45
CONTRIBUTORS_OUT = $(CONTRIBUTORS_XML:.xml=.html)
@@ -12,12 +13,12 @@ $(CONTRIBUTORS_OUT) index.html: $(CONTRIBUTORS_XML) contributor-template.xml con
1213
$(CONTRIBUTORS_XML): $(CONTRIBUTORS)
1314
echo "<article id=\"manual\" data-sblg-article=\"1\">" >$@
1415
echo " <header>" >>$@
15-
echo " <h3>`lowdown -X name $(subst .xml,.md,$@)`</h3>" >>$@
16+
echo " <h3>`$(LOWDOWN) -X name $(subst .xml,.md,$@)`</h3>" >>$@
1617
echo " </header>" >>$@
17-
test -f img/$(shell lowdown -X name $(subst .xml,.md,$@)).jpg && \
18-
echo " <img src=\"img/`lowdown -X name $(subst .xml,.md,$@)`.jpg\" alt=\"Avatar for `lowdown -X name $(subst .xml,.md,$@)`.\"/>" >>$@ || \
18+
test -f img/$(shell $(LOWDOWN) -X name $(subst .xml,.md,$@)).jpg && \
19+
echo " <img src=\"img/`$(LOWDOWN) -X name $(subst .xml,.md,$@)`.jpg\" alt=\"Avatar for `$(LOWDOWN) -X name $(subst .xml,.md,$@)`.\"/>" >>$@ || \
1920
echo No image
20-
lowdown $(subst .xml,.md,$@) >>$@
21+
$(LOWDOWN) --html-no-skiphtml --html-no-escapehtml $(subst .xml,.md,$@) >>$@
2122
echo "</article>" >>$@
2223

2324
clean:

blogsource/content/post/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
SBLG = sblg
2+
LOWDOWN = lowdown
23
BLOG_POSTS = $(wildcard *.md)
34

45
PAGES_OUT = $(PAGES:.xml=.html)
@@ -19,11 +20,11 @@ $(BLOG_POSTS_OUT): $(BLOG_POSTS_XML) blog-post-template.xml
1920
$(BLOG_POSTS_XML): $(BLOG_POSTS)
2021
echo "<article id=\"manual\" data-sblg-article=\"1\">" >$@
2122
echo " <header>" >>$@
22-
echo " <h3>`lowdown -X title $(subst .xml,.md,$@)`</h3>" >>$@
23+
echo " <h3>`$(LOWDOWN) -X title $(subst .xml,.md,$@)`</h3>" >>$@
2324
echo " <address><a href=\"../../contributors/`lowdown -X authors $(subst .xml,.md,$@)`.html\">`lowdown -X authors $(subst .xml,.md,$@)`</a></address>" >>$@
24-
echo " <time datetime=\"`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`\">`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`</time>" >>$@
25+
echo " <time datetime=\"`$(LOWDOWN) -X date $(subst .xml,.md,$@) | cut -f1 -dT`\">`lowdown -X date $(subst .xml,.md,$@) | cut -f1 -dT`</time>" >>$@
2526
echo " </header>" >>$@
26-
lowdown $(subst .xml,.md,$@) >>$@
27+
$(LOWDOWN) $(subst .xml,.md,$@) >>$@
2728
echo "</article>" >>$@
2829

2930
clean:

index.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
title: Profanity, a console based XMPP client - Home
2+
subtitle: A console based XMPP client
3+
4+
${div_content}
5+
6+
#### 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/)
7+
8+
9+
Available on Linux, FreeBSD, OpenBSD, OSX, Windows and Android (Termux)
10+
11+
Do you like Profanity?
12+
Consider [donating](donate.html)!
13+
14+
**Latest release:**
15+
**[profanity-${version}.tar.xz](tarballs/profanity-${version}.tar.xz id="download-tarball")**
16+
sha256: <span class="hash">${tar_xz_sha256}</span>
17+
18+
**[profanity-${version}.zip](tarballs/profanity-${version}.zip id="download-zip")**
19+
sha256: <span class="hash">${zip_sha256}</span>
20+
21+
**Documentation:**
22+
[User Guide](userguide.html)
23+
[FAQ](faq.html)
24+
[Supported XEPs](xeps.html)
25+
[Plugins](plugins.html)
26+
[Reporting Issues](issues.html)
27+
[How to help out](helpout.html)
28+
[Blog](blog/post/index.html)
29+
[Theme Gallery](themegallery.html)
30+
31+
**Links:**
32+
[GitHub](http://github.com/profanity-im/profanity)
33+
[Mailing List](https://lists.posteo.de/listinfo/profanity)
34+
[X](https://x.com/profanityim)
35+
[xmpp:profanity@rooms.dismail.de](xmpp:profanity@rooms.dismail.de?join)
36+
37+
${div_end}
38+
39+
${div_features}
40+
41+
### Features
42+
43+
![](images/profanity_logo.png "Profanity Logo")
44+
45+
- Supports XMPP chat services
46+
- MUC chat room support
47+
- OTR, PGP and OMEMO encryption
48+
- Roster management
49+
- Flexible resource and priority settings
50+
- Desktop notifications
51+
- Plugins in Python and C
52+
53+
${div_end}
54+
55+
${div_screenshots}
56+
57+
### Screenshots
58+
59+
- [![](images/prof-1.webp)](images/prof-1.webp)
60+
- [![](images/profroster.webp)](images/profroster.webp)
61+
- [![](images/profoldterm.webp)](images/profoldterm.webp)
62+
- [![](images/roompanel.webp)](images/roompanel.webp)
63+
- [![](images/profxfce.webp)](images/profxfce_small.webp)
64+
- [![](images/prof_mac.webp)](images/prof_mac_small.webp)
65+
- [![](images/prof-win.webp)](images/prof-win.webp)
66+
- [![](images/prof-pink.webp)](images/prof-pink.webp)
67+
- [![](images/2-barebones-chat.webp)](images/2-barebones-chat.webp)
68+
69+
${div_end}

index.xml

Lines changed: 0 additions & 75 deletions
This file was deleted.

pagesource/accounts.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
title: Profanity, a console based XMPP client - Account Configuration
2+
subtitle: Account Configuration
3+
4+
${section_start}
5+
6+
### Contents
7+
8+
- [Configuring Accounts](#configuring-accounts)
9+
10+
${section_end}
11+
12+
${section_start}
13+
14+
### Configuring Accounts
15+
16+
The [<code>/account</code>](reference.html#account) command should be used to
17+
modify the settings below.
18+
19+
The following is an example account configuration file with two configured
20+
accounts.
21+
22+
```[jabber]
23+
enabled=true
24+
priority.online=10
25+
priority.chat=20
26+
priority.away=0
27+
priority.xa=0
28+
priority.dnd=-10
29+
jid=someone@jabber.org
30+
resource=laptop
31+
presence.last=xa
32+
presence.login=online
33+
muc.service=conference.jabber.org
34+
muc.nick=aperson
35+
36+
[work]
37+
enabled=true
38+
priority.online=2
39+
priority.chat=1
40+
priority.away=0
41+
priority.xa=-5
42+
priority.dnd=-10
43+
jid=bob.smith@mycompany.org
44+
server=talk.mycompany.org
45+
resource=office
46+
presence.last=online
47+
presence.login=away
48+
muc.service=rooms.mycompany.org
49+
muc.nick=smithy
50+
```
51+
52+
${section_end}

0 commit comments

Comments
 (0)