Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Gentle introduction' is inaccessible #147

Closed
michmech opened this issue Jun 27, 2019 · 9 comments
Closed

'Gentle introduction' is inaccessible #147

michmech opened this issue Jun 27, 2019 · 9 comments
Labels

Comments

@michmech
Copy link
Member

Go to this URL (or click the 'Gentle introduction' link on the homepage) and you get 404 Not Found:

https://www.lexonomy.eu/docs/intro/

Probably these lines in lexonomy.py is causing it by thinking that everything in the docs directory are static files:

# serve static files
@route('/<path:re:(widgets|furniture|libs|docs).*>')
def server_static(path):
    return static_file(path, root="./")

Not everything in the docs directory is a static file.

@iiegn
Copy link
Collaborator

iiegn commented Jun 28, 2019

...how is this actually supposed to work (or how did it work)?

there exists a markdown file intro.md which links to, i think, all the 0x-0y.png files but not, for example,

  • lexonomy_httpd.con
  • mode-laic.png
  • text-editor-asklongstring.png
  • web.config
    ...

now, how is this markdown file supposed to become 'rendered'?

  • is this something we introduced when moving the 'wiki' from github into this repository (because obviously, a .md file in a wiki on github would get rendered)
  • do we need to 'render this'
    • offline (ideally automatically before/during git commit)?
    • online?

@michmech
Copy link
Member Author

michmech commented Jul 1, 2019

In the Node.js backend this is (or rather: was) handled in the following way.

  1. There is (or rather: was) a line of code in lexonomy.js that says that static files can be found in the /docs directory (as well as a couple of other locations). If an HTTP request arrives asking for something in this directory, and if such a file exists there, then Node,.js serves this file. If not, then Node.js proceeds to number 2.

  2. There is a GET handler in lexonomy.js (lines 220 - 226) which handles requests to URLs like /docs/blablabla/. The handler assumes that a file like docs/blablabla.md exists, opens it, converts it contents from Markdown to HTML, and serves it to the user through the template views/doc.ejs.

@iiegn
Copy link
Collaborator

iiegn commented Jul 1, 2019

In the Node.js backend this is (or rather: was) handled in the following way.

  1. There is (or rather: was) a line of code in lexonomy.js that says that static files can be found in the /docs directory (as well as a couple of other locations). If an HTTP request arrives asking for something in this directory, and if such a file exists there, then Node,.js serves this file. If not, then Node.js proceeds to number 2.

ok, likely around here (just for reference): 9eaa7c9

  1. There is a GET handler in lexonomy.js (lines 220 - 226) which handles requests to URLs like /docs/blablabla/. The handler assumes that a file like docs/blablabla.md exists, opens it, converts it contents from Markdown to HTML, and serves it to the user through the template views/doc.ejs.

and this one, for reference, as well:

// DOCS:
app.get(siteconfig.rootPath + "docs/:docID/", function (req, res) {
ops.verifyLogin(req.cookies.email, req.cookies.sessionkey, function (user) {
ops.getDoc(req.params.docID, function (doc) {
res.render("doc.ejs", { user: user, siteconfig: siteconfig, doc: doc });
});
});
});

So far, it seems, we have keept the EJS templating in place. Insofar, we could

(possible) alternative:

  • use bottle's templating engine (but this would probably only make sense if we wanted to move away more parts - and not only docs/)
  • other ideas...

@mjakubicek have you given this already a thought?

@mjakubicek
Copy link
Collaborator

short term solution is just to forward requests to this path to NodeJS
long term is rewrite for the bottlepy templates like everything else (so far there is just one template in bottlepy - the consent.tpl)

@michmech
Copy link
Member Author

Embarrassingly, it still isn't working:
https://www.lexonomy.eu/docs/intro/

@michmech michmech reopened this Jul 29, 2019
@iiegn
Copy link
Collaborator

iiegn commented Jul 29, 2019

ok, i see - but this time it's a 'deployment' issue: 'someone' needs to update https://www.lexonomy.eu because https://lexonomy.elex.is works.
(i think, we can stuff it into this issue for the time being - generally, i'd consider it a different issue...)

@rambousek
Copy link
Member

This is already fixed in beta

@jsbien
Copy link

jsbien commented May 3, 2022

Today https://www.lexonomy.eu/docs/intro/ is still not working.

@rambousek
Copy link
Member

Thanks for information, somehow we drop intro in the new interface. It is back in now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants