GithubHelp home page GithubHelp logo

andreaskoch / allmark Goto Github PK

View Code? Open in Web Editor NEW
308.0 17.0 75.0 16.78 MB

A cross-platform markdown web server

Home Page: https://allmark.io

License: Other

Makefile 0.08% Go 99.91% Batchfile 0.01%
markdown web-server linux windows macos

allmark's People

Contributors

andreaskoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

allmark's Issues

Installation instructions requires the use of the curl --insecure flag

The --insecure flag in the curl params for the linux installation instructions is a security concern for many developers. I believe the reason why you have added this is because you are using a let's encrypt cert for allmark.io without including the intermediate cert causing cert validation to fail as the lets encrypt CA cert will only be found in recent distros. However, the intermediate cert is cosigned by IdenTrust, which their CA cert will be available to older distros. So using your fullchain cert should resolve the issue allowing you to drop the --insecure flag.

see: certbot/certbot#2026

S3 serving

would be amazing it this could be pointed at an s3 bucket and serve contents (and recursive contents) to a browser. taking account of permisisons for the current user......

I saw this was in your road map, any idea when that might be implemented?

The windows platform downloads "dont work"

Clicking on the link downloads the file "allmark_windows_amd64" without extension, but 7zip can view the contents.

Running the powershell command from the main page nets a connection error.

PS C:\temp\allmark> Invoke-WebRequest https://allmark.io/bin/windows_amd64/allmark.exe -OutFile allmark.exe
Invoke-WebRequest : The underlying connection was closed: An unexpected error occurred on a send.
At line:1 char:1
+ Invoke-WebRequest https://allmark.io/bin/windows_amd64/allmark.exe -O ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
   eption
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

if I add ".exe" to the file it appears to be what I want, but the directions may need a bit of touchup.

Unable to search for string in quotes

I created a markdown page that contained this string:
"status=exited"

When I try to search for the page on either status or exited it does not find any pages. It works to search for words that are not inside the qoutes.

Search does not index strings inside markdown code spans

I was testing the search and looking for a code snippet inside markdown backticks, and I found that nothing inside the code spans is being indexed in the search.

I'm not sure if this is intentional or an oversight, but initially it made me think that the search engine wasn't working.

Memory consumption is too high

My site has about 4000 pages, memory consumption is about 300M after all mark start, and the number rose to 1.5G when I wandered in the site. poof said there is more than 4000 heaps.

Sent with GitHawk

HTML rendering of children items is fixed

I have a problem displaying a complex file structure with allmark.

Here my questions:
How can I show only the root page and
how can I show all children from root page and
how can I show all children in children from child page?

Here my layout:

.                                                                                                                                             
├── 01.00.Chapter                                                                                                                             
│   ├── 01.00.Chapter.md                                                                                                                      
│   ├── 01.01.Chapter                                                                                                                         
│   │   └── 01.01-Chapter.md                                                                                                                  
│   ├── 01.02.Chapter                                                                                                                         
│   │   └── 01.02-Chapter.md                                                                                                                  
│   ├── 01.03.Chapter                                                                                                                         
│   │   └── 01.03-Chapter.md                                                                                                                  
│   └── 01.04.Chapter                                                                                                                         
│       └── 01.04-Chapter.md                                                                                                                  
├── 02.00.Chapter                                                                                                                             
│   ├── 02.00.Chapter.md                                                                                                                      
│   ├── 02.01-Chapter                                                                                                                         
│   │   ├── 02.01.01-Chapter                                                                                                                  
│   │   │   └── 02.01.01.Chapter.md                                                                                                              
│   │   ├── 02.01.02-Chapter                                                                                                                  
│   │   │   └── 02.01.02.Chapter.md                                                                                                              
│   │   ├── 02.01.03-Chapter                                                                                                                  
│   │   │   └── 02.01.03.Chapter.md                                                                                                              
│   │   └── 02.01.Chapter.md                                                                                                                  
│   ├── 02.02-Chapter                                                                                                                         
│   │   └── 02.02-Chapter.md                                                                                                                  
│   └── 02.03-Chapter                                                                                                                         
│       └── 02.03-Chapter.md        
└── Home.md

Thanks in advance

Missing parts in documentation

Hi, thanks for the great tool.

I have a question:

The documentation says:

  1. Markdown Extensions
  • Image Galleries
  • File Preview
  • Displaying Folder Contents
  • Video Player Integration
  • Audio Player Integration
  • Repository cross-links by alias
  1. Document Meta Data
  • Author
  • Tags
  • Document Alias
  • Creation Date
  • Last Modified Date
  • Language
  • Geo Location

26.Short links
If you assign an alias to a document you can reach that document via short/direct link (e.g. http://repo.com/!an-alias). An overview of all available short links can be reached under
http://repo.com/!.

but I can not find out how to use these features, eg. defining an alias or set Document Meta Data. Is there any documentation about this?

Also in comparison of your homepage (hosted with allmark) could you explain a little bit more how to integrate tag clouds etc. and is there a way to create a startpage with links to other documents instead of showing them all together on the startpage?

Thanks in adavance.

Peter

404 error on requests for included images

Thank you very much for this great tool!

my problem:

given:

image

result in allmark:

image

debug:

you can see the 400er error, when the png-files are requested.

C:\temp\ci>allmark server
allmark - The standalone markdown webserver (Version: v0.10.0-dev)

Usage:
allmark <command> <repository path>

Available commands:
     init  Initialize the configuration
    serve  Start serving the supplied repository via HTTP and HTTPs

Fork me on GitHub "https://github.com/andreaskoch/allmark"

C:\temp\ci>allmark serve
2020/07/16 11:58:24         Debug    Re-initializing the repository index.
2020/07/16 11:58:24         Debug    Scanning directory "C:\\temp\\ci"
2020/07/16 11:58:24         Debug    Creating a physical item from route ""
2020/07/16 11:58:24         Debug    ------- Sub Indexes for "C:\\temp\\ci" ---------------
2020/07/16 11:58:24         Debug    Sub index (old):
<empty-tree>
2020/07/16 11:58:24         Debug    Sub index (new):
- <no-name-assigned>
2020/07/16 11:58:24         Debug    "" was not found in
<empty-tree>
2020/07/16 11:58:24         Debug    "": new
2020/07/16 11:58:24         Debug    ------- Difference ---------------
2020/07/16 11:58:24         Debug    New: 1
2020/07/16 11:58:24         Debug    Modified: 0
2020/07/16 11:58:24         Debug    Deleted: 0
2020/07/16 11:58:24         Debug    ------- Full Indexes ---------------
2020/07/16 11:58:24         Debug    Old Index:
<empty-tree>
2020/07/16 11:58:24         Debug    New Index:
- <no-name-assigned>
2020/07/16 11:58:24         Debug    sendUpdate(Update (New: 1, Modified: 0, Deleted: 0)): Notifying all subscribers
2020/07/16 11:58:24          Info    Reindexing: Off
2020/07/16 11:58:24          Info    Live Reload: Off
2020/07/16 11:58:24          Info    Open URL: http://localhost:33001
2020/07/16 11:58:24          Info    HTTP Endpoint: [::]:33002
2020/07/16 11:58:24          Info    HTTP Endpoint: 0.0.0.0:33001
2020/07/16 11:58:25         Debug    Requesting ""
2020/07/16 11:58:25         Debug    Parsing item ""
2020/07/16 11:58:25         Debug    Converting markdown for item "".
2020/07/16 11:58:25         Debug    Returning item ""
::1 - - [16/Jul/2020:11:58:25 +0200] "GET / HTTP/1.1" 200 5169
2020/07/16 11:58:25         Debug    Requesting "class_old.png"
2020/07/16 11:58:25          Warn    File "class_old.png" was not found.
2020/07/16 11:58:25         Debug    No item or file found for route "class_old.png"
2020/07/16 11:58:25         Debug    Requesting "class_new.png"
2020/07/16 11:58:25          Warn    File "class_new.png" was not found.
2020/07/16 11:58:25         Debug    No item or file found for route "class_new.png"
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /class_old.png HTTP/1.1" 404 2962
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /class_new.png HTTP/1.1" 404 2962
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /theme/modernizr.js HTTP/1.1" 200 14633
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /theme/codehighlighting/highlight.css HTTP/1.1" 200 2619
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /theme/screen.css HTTP/1.1" 200 13248
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /theme/jquery.tmpl.js HTTP/1.1" 200 6009
::1 - - [16/Jul/2020:11:58:25 +0200] "GET /theme/jquery.js HTTP/1.1" 200 84246
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/lazysizes.js HTTP/1.1" 200 5732
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/search.js HTTP/1.1" 200 975
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/site.js HTTP/1.1" 200 1145
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/latest.js HTTP/1.1" 200 813
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/typeahead.js HTTP/1.1" 200 29675
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/presentation.js HTTP/1.1" 200 2967
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/codehighlighting/highlight.js HTTP/1.1" 200 47867
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/github-ribbon.png HTTP/1.1" 200 7327
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /theme/print.css HTTP/1.1" 200 1570
2020/07/16 11:58:26    Statistics    Priming the latest items cache took 0.000000 seconds.
2020/07/16 11:58:26         Debug    Converting markdown for item "".
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /latest HTTP/1.1" 200 3874
::1 - - [16/Jul/2020:11:58:26 +0200] "GET /opensearch.xml HTTP/1.1" 200 503

Error installing on Ubuntu 16.04.6

Hi,

I am trying to install allmark on Ubuntu 16.04.6. It downloaded an html page, not a binary file. I tried to install allmark in /usr/local/bin using the curl procedure. Is something wrong with my command.

curl -s --insecure https://allmark.io/bin/allmark > /usr/local/bin/allmark

Thanks
Amal

Missing a browserEnabled flag

Hi Andreas,

can you add a boolean flag for browserEnabled and set it to true?
So the user can choose to start a browser if needed and use allmark more like a daemon.
Thanks.

Error when trying to build / install from source

The documentation may be lacking: How do I clean up ? git reset --hard ?

I have errors when building:

~/tmp/allmark  (master)  go run make.go -install -v
# command-line-arguments
ar: `u' modifier ignored since `D' is the default (see `U')
Version: 2015-11-17-09b235a
GOPATH: /home/bruno/tmp/allmark
GOBIN: /home/bruno/tmp/allmark/bin
Running go install --ldflags=-X allmark.io/modules/common/buildinfo.GitInfo=2015-11-17-09b235a allmark.io/cmd/allmark
# allmark.io/modules/common/certificates
src/allmark.io/modules/common/certificates/cert.go:75:42: error: reference to undefined identifier ‘elliptic.P224’
   priv, err = ecdsa.GenerateKey(elliptic.P224(), rand.Reader)
                                          ^
Error running go install --ldflags=-X allmark.io/modules/common/buildinfo.GitInfo=2015-11-17-09b235a allmark.io/cmd/allmark: exit status 2
exit status 1

Syntax error: newline unexpected

Hi, I tried to serve a markdoc folder, but when a run allmark, I got a "newline unexpected" error

user@host $ cd docs 
user@host/docs $ allmark serve
/usr/local/bin/allmark: 2: /usr/local/bin/allmark: Syntax error: newline unexpected

allmark.io SSL cert expired

$ wget https://allmark.io/bin/files/allmark_linux_amd64
--2018-10-30 11:25:06--  https://allmark.io/bin/files/allmark_linux_amd64
Resolving allmark.io (allmark.io)... 88.99.132.60, 2a01:4f8:10b:2d25::7
Connecting to allmark.io (allmark.io)|88.99.132.60|:443... connected.
ERROR: The certificate of ‘allmark.io’ is not trusted.
ERROR: The certificate of ‘allmark.io’ has expired.
The certificate has expired

Update the documentation

Maintainers, please update the documentation, as it is not a make command now. Whatever is there in readme is valid for previous tag, not the current one, hence I used earlier tag and couldn't exploit the newer functionalities.

Can't build from source

On CentOS 7, I get this after the clone. Ideas?

$ make
go build -o bin/files/allmark ./cli
cli/allmark.go:10:2: cannot find package "github.com/andreaskoch/allmark/common/config" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/common/config (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:11:2: cannot find package "github.com/andreaskoch/allmark/common/logger/console" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/common/logger/console (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:12:2: cannot find package "github.com/andreaskoch/allmark/common/logger/loglevel" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/common/logger/loglevel (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:13:2: cannot find package "github.com/andreaskoch/allmark/common/shutdown" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/common/shutdown (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:14:2: cannot find package "github.com/andreaskoch/allmark/common/util/fsutil" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/common/util/fsutil (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:15:2: cannot find package "github.com/andreaskoch/allmark/dataaccess/filesystem" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/dataaccess/filesystem (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:16:2: cannot find package "github.com/andreaskoch/allmark/services/initialization" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/services/initialization (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:17:2: cannot find package "github.com/andreaskoch/allmark/services/parser" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/services/parser (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:18:2: cannot find package "github.com/andreaskoch/allmark/services/thumbnail" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/services/thumbnail (from $GOROOT)
    ($GOPATH not set)
cli/allmark.go:19:2: cannot find package "github.com/andreaskoch/allmark/web/server" in any of:
    /usr/lib/golang/src/github.com/andreaskoch/allmark/web/server (from $GOROOT)
    ($GOPATH not set)
make: *** [build] Error 1

$

force open new tab in new window

HI there,
I know that we could always use
example
to force a hyperlink to open in new tab.

But the case I have already wrote like hundreds of them, is it possible there is a switch somewhere to do this?
Thanks!
btw, like this repo so much!

Current binary doesn't work on OSX 10.11.1

Using the binary provided I get the error

panic: Cannot determine the current users home direcotry. Error: user: Current not implemented on darwin/amd64

goroutine 1 [running]:
allmark.io/modules/common/config.init.1()
    /srv/allmark.io/repo/src/allmark.io/modules/common/config/config.go:67 +0x16a
allmark.io/modules/common/config.init()
    /srv/allmark.io/repo/src/allmark.io/modules/common/config/json.go:33 +0x86
main.init()
    /srv/allmark.io/repo/src/allmark.io/cmd/allmark/allmark.go:247 +0x47

Building the application from source works for me even if the test run results in an error.

❯ go run make.go -test
Testing package 01 of 14: allmark.io/modules/common/config
ok      allmark.io/modules/common/config    0.011s
Testing package 02 of 14: allmark.io/modules/common/logger/console
ok      allmark.io/modules/common/logger/console    0.005s
Testing package 03 of 14: allmark.io/modules/common/route
ok      allmark.io/modules/common/route 0.005s
Testing package 04 of 14: allmark.io/modules/common/tree
ok      allmark.io/modules/common/tree  0.007s
Testing package 05 of 14: allmark.io/modules/common/util/dateutil
ok      allmark.io/modules/common/util/dateutil 0.006s
Testing package 06 of 14: allmark.io/modules/common/util/hashutil
ok      allmark.io/modules/common/util/hashutil 0.006s
Testing package 07 of 14: allmark.io/modules/services/converter/markdowntohtml/postprocessor
# allmark.io/modules/services/converter/markdowntohtml/postprocessor
src/allmark.io/modules/services/converter/markdowntohtml/postprocessor/image_test.go:13:2: cannot find package "allmark.io/modules/services/converter/markdowntohtml/common" in any of:
    /usr/local/Cellar/go/1.5.1/libexec/src/allmark.io/modules/services/converter/markdowntohtml/common (from $GOROOT)
    XXX/allmark/src/allmark.io/modules/services/converter/markdowntohtml/common (from $GOPATH)
FAIL    allmark.io/modules/services/converter/markdowntohtml/postprocessor [setup failed]
Error running go test allmark.io/modules/services/converter/markdowntohtml/postprocessor: exit status 1
exit status 1

Reserved name error.

I have folder name .wiki which is contains markdown files from GitHub.

Open command line from that folder and run the command allmark serve cause error.

Fatal Unable to create a repository. Error: The path "D:\GitHub\MyRepo.wiki" is using a reserved name and cannot be a root.

add support for linking to md files

I have a directory like this:
dir/
README.md
a.md
b.md
c.md

I have links in README.md linking to other md files
e.g.
now checkout a.md

Those links (a.md) are not working. I get a 'file not found' error.

I am guessing allmark is looking for 'a.md/README.md' file and it is unable to find it.

Could this be fixed? so direct links to files work

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.