blog3000/Blog3000/Server/README.md

134 lines
3.2 KiB
Markdown

# Blog3000
_Alpha Prototype software_
Simple blog software with(out) following features
- Written in .Net core
- Using blazor on the client (C# instead of javascript!!!!)
- Using ASP.NEt Core on server
- Caches all blog-data in the browser for offline use.
- Installable PWA
- Simple view-stats
- Serverside Search-Robot-Support for bing/google
- BlogPosts are stored as MarkDown. Images are supported. Can
be edited by blogger directly on server. Markdown is enahanced
with tags in the first lines "@" providing metadata and id
#### Install / Configure
TODO
#### Markdown header format
TODO
### Parameters
Start Server without parameters to get a parameter list/help
### Runing on Linux (Gentoo)
#### Config
Use blogconfig.json from www-root as template and copy to your blog-data-path.
Modify as neeed. To Set value in protected start server without parameters
to see commandline-parameters therefore.
#### Init-script
```
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
use dns logger
after apache2
}
configtest() {
ebegin "Checking ${SVCNAME} configuration"
eend $?
}
start() {
ebegin "Starting ${SVCNAME}"
nohup -- su -s /bin/bash blogmh3000 -c "(cd /var/www/blog-mh3000-net/server/exe && /opt/dotnet31/dotnet Blog3000.Server.dll --blog-data-path=/var/www/blog-mh3000-net/server/data | logger -t blogmh3000 )" > /dev/null &
eend ${retval}
}
stop() {
ebegin "Stopping ${SVCNAME}"
kill `ps ax | grep Blog3000 | grep " /opt/dotnet31" | grep -v "bash" | cut -b 1-5` || exit ß
}
```
### Syslog-ng
Add this somewhere before the log(message)-lines.
```
# Blog
filter f_blogmh3000 { program(blogmh3000); };
destination dest_blog3000 { file("/var/log/blogmh3000.log"); };
log { source(src); filter(f_blogmh3000); destination(dest_blog3000); flags(final);};
```
Rename according to your own names. Note: the `program()` filter equals the `| logger -t [PROGRAM]` in the initscript above.
### Logrotate
Add as /etc/logrotate.d/blogmh3000:
```
/var/log/blogmh3000.log {
missingok
notifempty
sharedscripts
postrotate
/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
endscript
}
```
As before, rename according to your own names.
## Further notes
#### Downloads
Currently a _very rough_ feature for offering downloads from the blog is available:
The authors can put files on a cdn/ftp/public website, and reference them via
the "/PublicDl". The server then is called with the filename and returns the actual
url to the actual download site. This would allow download-counting or one-time url
for protected downlodas in the future.
No sub-folder are supported at the moment.
Downloads may not reside in the same domain, otherwise router-module of the blog-app
may take over and return 404.
Perhabs in the future a javascript base downloader may resolve this issue and allow
file living in the blogs url-space for more easness.
#### Testing SEO output
with testbox enabled e.g. use wget
```
wget -O - --header="User-Agent: xx-testbot-xx" --no-check-certificate https://local-ip:5001/
```
_(C) 2020 Michael Hoess, MIT-License_