You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+79-71Lines changed: 79 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,26 @@ open-source and free under the MIT License. Check out the [GitHub repo](https://
10
10
**TLDR:** Self-hosted Obsidian publish with an API to extend functionality.
11
11
12
12
## Features
13
-
-**Simple Deployment:** Extremely easy to deploy, configure, and use.
14
-
-**REST API Interface:** Provides a REST API to interact with different Markdown elements in your notes.
15
-
-**Customizable UI:** Supports "bring your own user interface" by using Markopolis as a backend.
16
-
-**Obsidian Markdown Flavor:** Stays close to the Obsidian Markdown flavor and supports backlinks, todos, LaTeX equations, code, tables, callouts etc.
17
-
-**Instant Rendering:** Uses a single command to push Markdown notes to the server and instantly renders them as simple webpages.
18
-
-**Full Text Search:** Implements full text search.
19
-
-**Dark and Light Modes:** Supports both dark and light modes.
20
-
-**Low Maintenance:** Requires very little to no maintenance.
21
-
-**Docker Support:** Comes as a deployable Docker image.
22
-
-**API Documentation:** Inbuilt API documentation generated using FastAPI.
13
+
14
+
-**Easy setup** Extremely simple to deploy and use
15
+
-**Easy publish** Publish notes online with a single command
16
+
-**Markdown API interface** Interact with aspecs of markdown using REST APIs
17
+
-**Extensible** Extendable using exposed APIs
18
+
-**Develop your own frontend** You can use the api calls to get every section of markdown files to design your own frontend
19
+
-**Instand rendering** Article is available online as soon as ypu publish
20
+
-**Full text search** Fuzzy search across your entire notes vault
21
+
-**Obsidian markdown flavor** Maintains compatibility with obsidian markdown syntax. Supports
22
+
callouts, equations, code highlighting etc.
23
+
-**Dark & Light modes** Supports toggling between light and dark themes
24
+
-**Easy maintenance** Requires very little to no maintenance
25
+
-**Docker support** Available as docker images to self host
23
26
24
27
and lots more to come. Checkout the [roadmap](https://markopolis.app/roadmap) page for planned features.
25
28
26
29
## Demo
27
-
The documentation [website](https://markopolis.app) is hosted using Markopolis and showcases a small collection of Markdown notes to highlight the essential features.
28
-
I have tried to incorporate content here to showcase different features. Take a look at the [https://markopolis.app/](https://markopolis.app/Markdown%20Syntax) page for
29
-
checking out how different markdown syntax is rendered.
30
+
The documentation [website](https://markopolis.app) is hosted using Markopolis and is a live demo.
31
+
These notes are used to demonstrate the various aspects of Markopolis.
32
+
Checkout the [[Markdown Syntax]] page for a full showcase of all supported markdown syntax. checking out how different markdown syntax is rendered.
30
33
31
34
Thank you for considering Markopolis for your Markdown note-sharing needs! If you like
32
35
the project considering starring the repository.
@@ -47,58 +50,77 @@ will always be open-source and maintained as I rely on it for my own notes syste
47
50
If you like the project please don't forget to star the [github repo](https://github.com/rishikanthc/markopolis.git).
48
51
49
52
## Installation
50
-
Installing Markopolis involves two steps.
51
-
52
-
-**STEP 1:** Deploying the Markopolis server
53
-
-**STEP 2:** Installing the Markopolis package on your local machine
53
+
Installing Markopolis involves two steps. First deploying the server. Second
54
+
installing the CLI tool. The CLI tool provides a utility command to upload
55
+
your markdown files to the server. The articles are published as soon as
56
+
this command is run.
54
57
55
-
## STEP 1: Deploying Markopolis server
58
+
## Server installation
56
59
57
-
The easiest way to deploy the server is to use the provided docker image.
58
-
The docker image packages both the backend and frontend together and sets up a
59
-
reverse proxy to route requests correctly to the backend and frontend.
60
+
We will be using Docker for deploying Markopolis.
61
+
Create a docker-compose and configure environment variables.
62
+
Make sure to generate and add a secure `API_KEY`.
63
+
Allocate persistent storage for the Markdown files.
60
64
61
-
You can use the docker-compose provided below. Make sure to change the
62
-
environment variables to match your settings.
63
-
64
-
> [!warning]
65
-
> Make sure to use a secure API key. You can use `openssl rand -hex 32` to
66
-
> generate a random alphanumeric string to use as your API key.
67
65
68
-
### Docker Compose
66
+
Next create a `docker-compose.yaml` file with the following:
- MARKOPOLIS_API_KEY=<really long random alpha-numeric string>
78
+
- POCKETBASE_URL=http://127.0.0.1:8080
79
+
- API_KEY=test
80
+
- POCKETBASE_ADMIN_EMAIL=admin@admin.com
81
+
- POCKETBASE_ADMIN_PASSWORD=password
82
+
- TITLE=Markopolis
83
+
- CAP1=caption1
84
+
- CAP2=caption2
85
+
- CAP3=caption3
85
86
volumes:
86
-
- markopolis_data:/app/markdown
87
-
restart: unless-stopped
88
-
89
-
volumes:
90
-
markopolis_data:
91
-
driver: local
87
+
- ./pb_data:/app/pb
92
88
```
93
89
90
+
Now you can deploy Markopolis by running `docker-compse up -d`
94
91
95
92
Parameter | Description
96
93
-- | --
97
-
MARKOPOLIS_DOMAIN | This is the domain at which both your frontend and backend is available by default. Make sure to include the protocol along with your domain
98
-
MARKOPOLIS_FRONTEND_URL | This parameter is available for configuring custom frontend implementations. If you are using the default front-end that ships with Markopolis, this should be **same as MARKOPOLIS_DOMAIN**.
99
-
MARKOPOLIS_TITLE | This parameter controls the site title displayed on the top-left in the header
100
-
MARKOPOLIS_MD_PATH | This is the path on the server at which your markdown files are stored. Ideally this should point to a directory in your persistent volume.
101
-
MARKOPOLIS_API_KEY | For security, most of the API endpoints are protected by an API key. Make sure to use a secure API key and don't share it publicly.
94
+
POCKETBASE_URL | **DO NOT Change this**
95
+
POCKETBASE_ADMIN_EMAIL | The admin account email for the database
96
+
POCKETBASE_ADMIN_PASSWORD | The admin account password
97
+
TITLE | SITE TITLE
98
+
API_KEY | For security, most of the API endpoints are protected by an API key. Make sure to use a secure API key and don't share it publicly.
99
+
CAP1 | Caption 1, text that appears below the site title
100
+
CAP2 | Caption 2
101
+
CAP3 | Caption 3
102
+
103
+
104
+
## Local Installation
105
+
Requirements: Python 3.12
106
+
107
+
Install:
108
+
```sh
109
+
pip install markopolis
110
+
```
111
+
112
+
### Configuration:
113
+
Create a config file as a YAML file in any location.
114
+
Set the `MARKOPOLIS_CONFIG_PATH` environment variable to point to the location of the config file.
115
+
The config file should specify the domain of the deployment including the protocol and
116
+
the api key. The api key should be the same as what you used for the deployment:
117
+
118
+
```yaml
119
+
domain: "https://your-domain.com"
120
+
```
121
+
122
+
I recommend using a python virtual environment for the local installation.
123
+
102
124
103
125
> [!warning]
104
126
> the domains should not contain a leading slash at the end.
@@ -107,23 +129,18 @@ MARKOPOLIS_API_KEY | For security, most of the API endpoints are protected by an
107
129
108
130
## STEP 2: Local installation
109
131
110
-
Markopolis provides an easy way to sync or push your markdown files from your computer to the server.
111
-
You do not need to use Docker to mount your markdown files. Follow the instructions below to set this
112
-
up.
113
-
114
-
115
132
I highly recommend configuring a virtual environment for python to keep your environment clean and
116
133
and prevent any dependency issues. Below I detail the steps to do this using Conda or pip. If you are familar
117
134
with this feel free to skip to the package installation section.
118
135
119
136
> [!info]
120
-
> You need to have python version >= 3.11
137
+
> You need to have python version >= 3.12
121
138
122
139
### Setting up a virtual environment
123
140
124
141
You can use either `pip` or `conda` to do this. If you are using `pip` simply run
125
142
```bash
126
-
python3.11 -m venv <name>
143
+
python3.12 -m venv <name>
127
144
```
128
145
129
146
Replace `<name>` with your desired virtual environment name. You can then activate the virtual environment
@@ -134,7 +151,7 @@ source <name>
134
151
135
152
For conda, you can use
136
153
```bash
137
-
conda create -n <name> python==3.11
154
+
conda create -n <name> python==3.12
138
155
```
139
156
140
157
and activate it with
@@ -153,40 +170,31 @@ pip install markopolis
153
170
154
171
### Configuration
155
172
156
-
Create a yaml config file anywhere in your system to set the below values. I recommend
157
-
storing it in `.config/markopolis/settings.yaml`.
158
-
159
-
> [!info]
160
-
> You can name the file anything and you can store it anywhere.
161
-
> You will need to set the config path for Markopolis to read the config file correctly.
162
-
163
-
Point markopolis to your config file by setting the `MARKOPOLIS_CONFIG_PATH` to the location
164
-
of your yaml file. You can also add it to your shell config so it persists across sessions.
165
-
173
+
Set the environment variables `MARKOPOLIS_DOMAIN` and `MARKOPOLIS_API`
0 commit comments