Closed sc0ttj closed 5 years ago
This will need a server
script that checks $blog_url, and if it is
/
or empty, run the web server from project root/foo
, run from ../
/foo/bar
, run from ../../
The local web server always needs to run from the dir that mdsh
considers the web root.
if a site is at http://site.com/
, then posts/
dir is in the webroot, so $blog_url=''
..
if a site is at http://site.com/blog/
, then posts/
dir is NOT in the webroot, so $blog_url='/blog'
and webroot is ..
if a site is at http://site.com/something/blog/
, then posts/
dir is NOT in the webroot, so $blog_url='/something/blog'
and webroot is ../../
Easy option is to use a $blog_webroot
var in .site_config
.. but user then needs to know how to set it... and might get it wrong.
done
Current procedure:
mdsh
foldermdsh
foldermdsh
git push --set-upstream origin gh-pages
)ties user into using GitHub!
)./create_page
,./create_post
, etc..Preferred procedure:
The preferred setup method should ideally not tie users into using GitHub or
git
.. (using agh-pages
branch not required fot GitLab, checking out branches generally not required if not using git.)So, ideally users would do something like:
.tar.gz
into theblog
folderblog
dirsetup
server start
new post