瀏覽代碼

Documentation and license

master
Rocketsoup 3 年之前
父節點
當前提交
8db1e11af4
共有 2 個文件被更改,包括 53 次插入4 次删除
  1. 33
    4
      README.md
  2. 20
    0
      htdocs/index.php

+ 33
- 4
README.md 查看文件

@@ -1,7 +1,36 @@
1
-# www-app-microjournal
2
-
3
-A tiny self-hostable "microjournaling" web app. Helps fill the void when abstaining from social media by encouraging journaling small thoughts throughout the day.
1
+# Microjournal
2
+
3
+A tiny self-hostable "microjournaling" web app. Helps fill the void when abstaining from social media by encouraging journaling small thoughts throughout the day instead of doomscrolling! Inspired by a [video by struthful](https://www.youtube.com/watch?v=mFvdHfhVIsQ) on YouTube.
4
+
5
+Features:
6
+
7
+- Post plain text entries to a simple private blog timeline
8
+- Light/dark mode support
9
+- No Javascript
10
+- Works as a nice little web app when bookmarked to the home screen on iOS
4 11
 
5 12
 # Requirements
6 13
 
7
-- web host with PHP
14
+- Web host with PHP 8.1
15
+
16
+# Installation
17
+
18
+1. Copy all the files in `htdocs` to your web directory.
19
+2. Copy `journal.db` somewhere **outside** your web directory so it is not accessible from the internet.
20
+3. Ensure `journal.db` is writable by the web server user. The web app will test writability when it is first run and will alert you if it fails.
21
+4. Edit `index.php` and set the configuration values near the top:
22
+    - `DB_PATH` is the path to `journal.db` on the server's file system.
23
+    - `BASE_URL` is the URL where `index.php` will be accessed from the web. An `https:` URL is strongly recommended. You may include `index.php` in the URL or just point to the path.
24
+5. Load the URL in a browser. If there are any configuration problems, you'll be notified. Otherwise, you will be prompted to create a username and password. The username can be an email address or a simple username.
25
+
26
+Optionally, since there isn't anything here you'd want other people accessing, you may want to add a [`robots.txt`](https://en.wikipedia.org/wiki/Robots.txt) to your website to keep your journal undiscovered by search engines.
27
+
28
+# Future features (maybe)
29
+
30
+- Deleting posts
31
+- Editing posts
32
+- Simple markdown support
33
+
34
+# License
35
+
36
+This software is under the [MIT Software License](https://mit-license.org/).

+ 20
- 0
htdocs/index.php 查看文件

@@ -1,4 +1,24 @@
1 1
 <?php declare(strict_types=1);
2
+// Copyright © 2023 Ian Albert
3
+//
4
+// Permission is hereby granted, free of charge, to any person obtaining a copy
5
+// of this software and associated documentation files (the “Software”), to deal
6
+// in the Software without restriction, including without limitation the rights
7
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+// copies of the Software, and to permit persons to whom the Software is
9
+// furnished to do so, subject to the following conditions:
10
+//
11
+// The above copyright notice and this permission notice shall be included in
12
+// all copies or substantial portions of the Software.
13
+//
14
+// THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+// SOFTWARE.
21
+
2 22
 
3 23
 
4 24
 // --------------------------------------------------------

Loading…
取消
儲存