Git Product home page Git Product logo

lektor-website's Introduction

Lektor Website

This is the repository for the Lektor website at getlektor.com.

To run:

$ lektor server

If you also want to update the webpack files, you need npm installed and then run it like this:

$ lektor server -f webpack

Notes

Changes made here get deployed automatically by this workflow.

Building lektor-website requires the latest stable release of Lektor.

lektor-website's People

Contributors

3kori avatar ajdavis avatar arunpersaud avatar bameda avatar dairiki avatar dependabot[bot] avatar do1jlr avatar doobeh avatar dwt avatar fschulze avatar go-bears avatar goanpeca avatar hackebrot avatar hitrust avatar jeffwidman avatar jurgenizer avatar jvanloofsvelt avatar marksteve avatar mesbahamin avatar mitsuhiko avatar nicoleiocana avatar nixjdm avatar runfalk avatar singingwolfboy avatar skorokithakis avatar tariquesani avatar torian257x avatar wsvincent avatar xlotlu avatar yagebu 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

lektor-website's Issues

plugin team and plugin listing updates

@Vesuvium, @odeckmyn, @BarnabyShearer, @pietroalbini, @kwellman, @fschulze, @ajdavis, @spenczar, @humrochagf, @marksteve, @bancek, @sterin, @skorokithakis, @mesbahamin, @gagoman, @Andrew-Shay

Thank you for making your plugins! I want to tell you all that I invited you to the plugin-developers team for the Lektor organization. My intention is to offer that as a place where people who have made plugins can hear of any important news related to plugins. I'll offer an invite to future plugin devs as well.

This comes because of a significant change coming to getlektor.com regarding plugins, that I plan on pulling early next week #194. In short, I request that you check your setup.py and update it to include at least a url to your plugin's GitHub page and a long_description that PyPI understands (getlektor will too). So you're aware, I plan on making the website build at least nightly going forward, so any changes you make in the future will take effect overnight at the latest. Other setup.py keys you might want to set can be seen here. I will go and update my own and the official plugins.

I also suggest you check my work regarding your plugin(s) specifically, and file an issue or pull request to fix anything. I made tags for your plugins, that you can add or subtract from, for instance.

I will close this issue when #194 is pulled.

Thank you for your work! I appreciate your contributions!

AtomFeedSupport cause error with `_model: none` pages

  • /content/test.xml/contents.lr
_template: test.html

---
_model: none
  • /models/none.ini
    → empty
  • template/test.html
hello world
  • parts or loooong log
Webpack build finished
U index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U page/2/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U page/3/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U page/4/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U 2015-12-21/Hello_Website/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U 2015-12-21/Hello_Website1/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U 2015-12-21/Hello_Website3/index.html
U feed.xml
  E feed.xml (RuntimeError: Body field not found: 'body')
U temp-test.xml

cause (RuntimeError: Body field not found: 'body')

tell plugin devs to update their projects and review changes

I do not think #194 needs to wait on this, but we should tell all of the plugin devs that this change has been made. They may want to edit their category or tags that I chose for them. Many of them also do not use all of the fields we pull from PyPI, so they can update their plugins.

The slideshow on the homepage is too fast

Hello Armin, thanks for releasing Lektor :)

A quick feedback: the slideshow on the homepage looks too fast to me and I'm not sure where to fix it. I guess it's in slideshow.ini?

Cache project data for reuse

Post #194

The project_data plugin that grabs information from pypi, github, etc currently makes one request per project per relevant template query. This means there are redundant requests being made. This adds build time. The requests actually make up most of the build time for the site. This can be cut back significantly if we cache the results of the first time a project's data is queried for, and then check for that cache and reread it instead o making the same query again.

Ideally I think, the data would be cached on first use, and reread from the cache until the build dir is cleaned. So then if you wanted to force a refresh, you'd just run lektor clean, otherwise, you'd just not worry about it.

Documentation search bar

The documentation needs a search bar for combing through all the pages, so someone can quickly find any references or examples to the feature or syntax they are struggling with. Its overly time consuming (and frustrating) looking for explanations to small problems.

Example need case:
Everything that someone new is struggling with and needs docs support to overcome.

Back-up github stats with values grabbed from build

Post #194

The plugin details page lists github stats, which are grabbed via JS that queries for them. GitHub places are fairly small rate limit on these queries per IP address though, so if someone is browsing many plugins, or going back and forth between a few for a while, the stats will stop appearing until enough time passes that they're under the rate limit again.

These JS queries are grabbing current values, so I don't think I want to get rid of them, but I think we should gracefully fall back to values that we query for ourselves during build time. I haven't done the styling for this, but the project_data plugin already is capable of downloading the data. The templates just need to start using it, and we need some styling so that the user can't tell the difference when the rate limiting kicks in. This should probably come after #206 though, because without the project data being cached this will cause a jump in build time.

Remove asciidoc from plugins list until it's published.

As I'm refactoring the plugin page I notice that lektor-asciidoc is not published on pypi. I think that makes it hard enough to use that we should remove it from the list until that's changed. I want to make that a policy change - GitHub isn't enough to be listed on this site.

As a related note, the refactoring relies on information pulled from the Warehouse's JSON API. I don't want to support other python repositories since that's so rare. And for the above reason, I'm also don't want to support effectively unlisted plugins.

list project_urls on plugin detail page

Post #194

We can also add project_urls to the left-hand margin. We still need to require url to definitively know where the repo link is, but we could also display links to people's personal / company websites, related projects, etc.

This is currently not possible, being blocked by pypi/warehouse#3831. But after that, it should be no problem.

datetime listed in field types but not available in 1.2.1

The documentation lists datetime in the builtin field types doc but it doesn't appear that this will be available until the 2.0 milestone.

Shouldn't the docs match what's part of the public install?

In the meantime, attempts to use it yields:

Traceback (most recent call last):
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
    response = self.make_response(self.handle_exception(e))
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/admin/modules/serve.py", line 127, in serve_artifact
    pad = li.get_pad()
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/admin/webui.py", line 23, in get_pad
    return Database(self.env).new_pad()
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/db.py", line 880, in __init__
    self.datamodels = load_datamodels(env)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/datamodel.py", line 583, in load_datamodels
    get_model(model_id)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/datamodel.py", line 567, in get_model
    return create_model(model_id)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/datamodel.py", line 579, in create_model
    rv[model_id] = mod = datamodel_from_data(env, model_data, parent)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/datamodel.py", line 488, in datamodel_from_data
    parent and parent.fields or None)
  File "/Applications/Lektor.app/Contents/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/lektor/datamodel.py", line 459, in fields_from_data
    ty = env.types[options.get('type', 'string')]
KeyError: u'datetime'

Individual Pages for plugins

Related to #182

We could change the layout of the Plugins List to link to individual getlektor.com pages for each Plugin. People could then read more about a plugin right on getlektor.com. To be clear I still want links to the repos. Some of the current descriptions on getlektor are a bit lacking. We could also add the tags plugin to getlektor.com and allow tagging of plugins so that they're easier to discover.

If they all get their own page, they need some content. So then what would the content be? We could simply have a Markdown field and encourage / make better descriptions, or we could use a little JS to grab a project's pre-rendered README (or other file).

@lektor/developers thoughts?

Missing favicon ?

Hi,

It seems there is no favicon provided for the website. I guess the logo would make a perfect one ;-)

Many pages in admin interface have no content (blank, white) when in edit mode.

Many pages in admin interface have no content (blank, white) when in edit mode.

For example:

  • http://localhost:5000/ - everything seems OK
  • http://localhost:5000/admin/root/edit - just meny on the left side. No fields for the page content
    ** and javascript errors in Chrome developer console
  • by pressing on the "Preview" button in left many, page looks ok in preview
    ** and javascript errors in Chrome developer console
  • by pressing on "Edit" button on the left, nothing happens until i press the "eye" icon
    ** and NO javascript errors in Chrome developer console after that

Some pages have partial content in admin edit mode, and they still have javascript errors

Reproducing

I started lektor server inside lektor-website (venv activated)
Web site looks great.
After switced to admin (http://localhost:5000/admin/root/edit), nothing in admin, so i looked the page source and found:
<!doctype html>
  <title>Lektor Admin</title>
  <link rel=stylesheet type=text/css href="/admin/static/gen/styles.css">
   <div id=dash>
  <div class=loadbox>
  <p>Loading Interface ...</p>
  <noscript>You must enable JavaScript to use the editing interface.</noscript>
  </div>
  </div>
  <script type=text/javascript>
  var $LEKTOR_CONFIG = {
  admin_root: "/admin",
  site_root: "",
  lang: "en"
  };
  </script>  
  <script type=text/javascript src="/admin/static/gen/vendor.js"></script>
  <script type=text/javascript src="/admin/static/gen/app.js"></script>

  • Tried in Chrome and Firefox and result was the same
  • The same applies for any page
  • My personal Lektor projects look OK (i used teh same, MASTER branch of lektor built locally)

Ubuntu 16
Python 2.7.13
node: v4.2.6
npm: 3.5.2

  • I cloned this: https://github.com/lektor/lektor-website
  • I did all this:
    $ git clone https://github.com/lektor/lektor
    $ cd lektor
    $ virtualenv venv
    $ . venv/bin/activate
    $ pip install --editable .
    $ make build-js
    $ make install-git-hooks
    $ export LEKTOR_DEV=1

Add a guide to redirect pages

In preparation for making a top-level Plugins page, I thought about redirecting https://www.getlektor.com/docs/plugins/list/ to https://www.getlektor.com/plugins. I think knowing how to make a redirect is a worthwhile thing to make a guide page for.

There is an issue for making redirects easier in Lektor, but in lieu of that, a guide can still be made for at least the general case, if not specific manual steps for setting this up, for example, with Apache. After that issue Lektor #107, this guide page could be amended.

Installer doesn't work on Windows

When trying to install on a Windows Machine using both 2.7 and 3.6 I cannot get lektor to install and run a server.

I get a message about unicode errors.

Fix showcase CSS

#190 ought to be fine. I think the style aren't liking the left image being slightly taller than the right? That's a guess, I haven't looked into it yet. But showcase images ought to be fine if they're all approximately the right size, which the new one in #190 is.

tiny legibility issue in docs (perhaps md limitation)

Re: https://github.com/lektor/lektor-website/blob/master/content/docs/content/contents.lr#L89

On my standard Chrome setup on a Mac, it renders like this:

screen shot 2016-03-02 at 5 15 58 pm

Sure would be nice if those four dashes could be wrapped in <nobr>... can either embed the tags right in the md, or style the code tags:

code { white-space: nowrap; }

This may have unintended consequences elsewhere in the docs though, so before I do a PR, I thought I'd just bring it up. :-)

Lektor 3 vs 2 differences and compatibility?

Hi all,
Are there any release notes or document pointing out the differences between Lektor 2 vs 3? We'd like to move a large web site from v. 2 to 3 but it's not clear what are the differences and if there are major changes we need to handle manually. Is it a transparent operation, so we can just rebuild the site with V3 and expect everything to work (plugins included)? Thank you.

Categorize Plugins List

The unofficial list should be categorized so that people can more easily discover plugins they are interested in. Possibly, we can combine the official and unofficial lists so the official ones are categorized too. We can mark the official ones as such in a different method.

The list is getting a bit long, and it's becoming more unreasonable to actually read through them all to determine which plugins you'd want, if any. Not to mention some are similar, yet not right next to each other (looking at you htmlmin and minify).

docs for config value in template

config has some values. we can know by print {{ config.__dict__ }} but we can not know each key's purpose.

I suggest document about config value. I think there is some useful values such as config.base_url.

Typo on the main page

Multilingual
We can speak multiple languages and allows you to easily create localized websites.

Make external links open new tabs

It's better practice, especially for SEO, to open new tabs for external links. Currently they just change your page in the current tab.

Fix link to source of homepage

It works, but is not ideal with the extra slash: https://github.com/lektor/lektor-website/tree/master/content//contents.lr

URLs and Slugs page examples

This is kind of a silly issue, but there are several paragraphs on how extensively versatile these two features are, at this link. Then there is a small example of how it might look in the .ini and .html files here.

However, I had to actually guess at how to link the pages together when I input the file path for root from the CMS.

model.ini code snippet:

[fields.link]
label = URL or File Link
type = url

model.html code snippet:
<a href="{{ this.link }}">

Then in the CMS I finally just put a "/" in the input box, after trying (and failing) to find an example of how to link home. I'm probably just not good at understanding those complex paragraphs of explanation, but the examples of code used to teach a feature are worth a thousand words.

openurl in Python 3 returns file-like object with bytes, not str

I got an exception when install lektor by the install script

 $ curl -sf https://www.getlektor.com/install.sh | sh
...
Traceback (most recent call last):
  File "<stdin>", line 142, in <module>
  File "<stdin>", line 130, in main
  File "/usr/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

I'm using

$ python --version
Python 3.5.2

Reproduce with traceback of exception

$ python installer.py # extracted from the SH script 

Welcome to Lektor

This script will install Lektor on your computer.

Installing at:
  bin: /home/hvn/py35env/bin
  app: /home/hvn/.local/lib/lektor

Continue? [Yn] y
Traceback (most recent call last):
  File "installer.py", line 140, in <module>
    main()
  File "installer.py", line 128, in main
    for url in json.load(urlopen(VENV_URL))['urls']:
  File "/usr/lib/python3.5/json/__init__.py", line 268, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
  File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
    s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'

A quick workaround to make it work on Python 3

 $ diff installer.py orig.py 
128c128
<     for url in json.loads(urlopen(VENV_URL).read().decode())['urls']:
---
>     for url in json.load(urlopen(VENV_URL))['urls']:

EDIT: this seems related but only fixed in 3.6 http://bugs.python.org/issue10976

Python 3 support?

While the PR providing Python 3 support has been merged in lektor, the docs still say that Python 2 is required … is this due to the current large release gap, or just an oversight?

Add page for all plugin tags

With #194 there is a page per plugin tag, but not a page that lists all tags, which I really want. I could not find an easy way of doing this with lektor-tags. Perhaps the easiest way is to update that plugin. It would be really nice to see a list of all tags and have them all be hyperlinked.

Menu navigation upgrade

The menu tree on the left side needs to be expandable for searching for a specific page.

Example need case:
I am hunting for the attachments page that's nested in the Data Modelling menu tree, but I can't see it unless I click on the Data Modeling page from the menu tree.

It's not a huge annoyance at the moment because most stuff seems to only be nested only once under a parent page. However, as Lektor grows and more features, depth, and complexity blooms, no doubt so will that menu tree. At some point it will become difficult for new curious people who want to try Lektor, because the documentation will become to time consuming trying to comb through the nested menu for the specific feature they are struggling with.

Installation under Bash on Ubuntu on Windows (WSL) has odd path resolution

I wanted to install on Windows 10. Thinking that ImageMagick might be a pain to install I tried installation under WSL. When I do this I find that install.sh resolves some odd installation directories:

brianly@Aotearoa:~$ curl -sf https://www.getlektor.com/install.sh | sh
()
Welcome to Lektor
()
This script will install Lektor on your computer.
()
Installing at:
  bin: /mnt/c/Go/bin
  app: /mnt/c/Go/lib/lektor
()
Continue? [Yn]

I have Go installed under Windows and it seems to want to install there. If I look at my $PATH variable under WSL it looks like it includes values from Linux and Windows:

brianly@Aotearoa:~$ $PATH
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program: No such file or directory

Running the find_user_paths() function independently under WSL I get:

>>> def find_user_paths():
...   rv = []
...   for item in os.environ['PATH'].split(':'):
...     if os.access(item, os.W_OK) \
...     and item not in rv \
...     and '/sbin' not in item:
...       rv.append(item)
...   return rv
...
>>> find_user_paths()
['/mnt/c/Users/brian/AppData/Local/Microsoft/WindowsApps', '/mnt/c/Go/bin', '/mnt/d/Sysinternals', '/mnt/c/Users/brian/AppData/Roaming/npm', '/mnt/d/SFBin/windows/docker']

I haven't done enough research to understand the expected behaviour with paths, but I see similar behavior on another computer running WSL under Windows 10.

Add section for themes

I'm not sure if we should add a section for themes in the showcase or elsewhere though.

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.