Giter Site home page Giter Site logo

getgrav / grav-learn Goto Github PK

View Code? Open in Web Editor NEW
226.0 226.0 791.0 50.04 MB

Grav Learn (exhaustive grav documentation)

Home Page: http://learn.getgrav.org

License: MIT License

CSS 0.85% HTML 5.82% JavaScript 7.86% Shell 0.12% PHP 4.71% SCSS 62.89% Twig 17.74%
documentation grav learning php

grav-learn's People

Contributors

adrian5 avatar arkhi avatar cord avatar csixtyfour avatar flaviocopes avatar gamahachaa avatar gitname avatar hughbris avatar james0r avatar jgonyea avatar karmalakas avatar keithbentrup avatar kmcital avatar mahagr avatar max123kl avatar nicohood avatar olevik avatar pamtbaau avatar paulhibbitts avatar paulmassen avatar perlkonig avatar petira avatar rfultz avatar rhukster avatar ricardo118 avatar roblui avatar robwent avatar ryanmpierson avatar stephan-strate avatar w00fz 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grav-learn's Issues

Page object summary() documentation clarification

The documentation is a little misleading with regards to summary().

This returns a truncated or shortened version of your content. You can provide an optional 
size parameter to specify the number of words. Alternatively, if no size is provided, the 
value can be obtained via the site-wide variable summary.size from your site.yaml configuration.

However, summary(size) limits by the number of characters, not the number of words, which is evident in system/src/Grav/Common/Page/Page.php.

Should the documentation be updated to clarify that it is the number of characters that're being limited, and not the words? Or is this an oversight and summaries were intended to be based on the number of words?

new skeleton based on grav-learn

Your documentation looks pretty good. Based on this what do you think about a "grav-skeleton-documentation" or "grav-skeleton-book"?

possibly adding more information about how values are stored for Pages Blueprint?

Hi, I was just going through Blueprints > Pages documentation and it took me awhile before I understood how form values were stored in pages .md files and how explicitly defining fields matters due to how Grav reads data in sequence. Ex. header.title.

I just thought to share my experience going through the documentation and possibly add this information.

Documentation on blueprints.yaml

A documentation on blueprints.yaml is needed. It is recommended that this file is created, but nowhere does it say what it is used for, and how to use this file.

strange markdown wrapping

hi guys, after the last update it seems the learn site has an issue with wrapping markdown and normal text as per the picture attached.
captura de ecran din 2016 04 27 la 17 39 23

Readme install steps don't work

I'm getting this error:

Theme 'learn2' does not exist, unable to display page.

Is there a reason it can't find the theme? I ran bin/grav install as instructed.

Possible changes for clarity.

  1. By using a shared Group between your user and PHP/Webserver account with 775 and 664 permissions you ensure that even though you have two different accounts, both will have Read/Write access to the files.

to

By using a shared Group between your user and PHP/Web Server account with 775 permissions on directories and 664 permissions on files you ensure that even though you have two different accounts, both will have Read/Write access to the files.

  1. #!/bin/sh for what shell?
    It may matter. I'm using /bin/bash and the command:
    find . -type f -path "./bin/" | xargs chmod 775
    results in: chmod: missing operand after `755'

I'm as dumb as a sack of hammers but I'll figure it out. Someone else may not.

Add more information on blueprint form types, e.g. array and list

Hi grav-team,

the doc is really awesome. Personally I think that more advanced form field types like array and list, maybe some others too, aber not really documented. Also google does not really help. It is really hard to get started. Maybe I've missed sth.

Thanks & BR toovy

mongoose server?

Has anyone tried running grav on mongoose? should be easy and can add that to the list of grav supported servers

https://github.com/cesanta/mongoose

I'm using the windows binary php version and I can get the grav home page to display but no others, I suspect I'm just having a folder permissions issue to get past, I'll update this if I get further

"Modular Pages" is missing the template part

I am fairly new to GRAV and looking through all docs – hopefully carful :-)

I think the part about Modular Pages is missing the point where it says you have to iterate in your template through the sub-pages/children/blocks.

I was thinking it is done by GRAV itself, since I define the order in my MD-file.

grav-learn/pages/02.content/09.modular/docs.md

Haven't done it before, but maybe I can contribute to the docs?!

Grav logging functions are missing

The docs say that you can log with any of the commands below:

$grav['log']->info('My informational message');
$grav['log']->notice('My notice message');
$grav['log']->debug('My debug message');
$grav['log']->warning('My warning message');
$grav['log']->error('My error message');
$grav['log']->critical('My critical message');
$grav['log']->emergency('Emergency, emergency, there is an emergency here!');

But only warning, error, critical, and emergency are actually logged:

[2015-06-26 20:58:51] grav.WARNING: My warning message [] []
[2015-06-26 20:58:51] grav.ERROR: My error message [] []
[2015-06-26 20:58:51] grav.CRITICAL: My critical message [] []
[2015-06-26 20:58:51] grav.EMERGENCY: Emergency, emergency, there is an emergency here! [] []

'permissions-fixing shell script' fails on directories with spaces in them

My /user/pages has dirs and files in it with spaces in the name, which makes the suggested permissions-fixing shell script fail:

Say I have a ./user/pages/this has spaces/default.md:

chmod: cannot access ‘./user/pages/this’: No such file or directory
chmod: cannot access ‘has’: No such file or directory
chmod: cannot access ‘spaces/default.md’: No such file or directory

However, after some googling, I found this script to work for me:

chown foo:bar .
chown -R foo:bar *
find . -type f -exec chmod 664 {} \;
find ./bin -type f -exec chmod 775 {} \;
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod +s {} \;
umask 0002

I don't know enough about the subject matter to be sure this does the same thing as the suggested script, by I just thought it ought to be looked at.

Comments regarding installation.

After a long three days of trying to get Grav running on Bluehost, I'm throwing in the towel. BH doesn't have the in depth resources available to the commoner to diagnose the problem with Server 500 errors. I'll investigate further and report back to see if there is some way to make it work. In the mean time I'll have to find another hosting company.

Build an epub

Could you please make it possible to build an epub file with the learn.getgrav.org website?
Would be a very nice option of the documentation!

Thanks
C

Commands not Found

While installing grav-learn through ssh I am getting several "Commands not Found" during the Cloning Bits phase of the installation, suggestion?

Media display in templates

This snippet was not working until markdown extra was set to true

{% for child in collection %}
  {{ child.media['cover.jpg'].display('thumbnail').html() }}
{% endfor %}  

Maybe a little info box saying that Markdown extra has to be set to true to make it works would be appreciated

Dead link for more info

I don't know how to fix the more info link in Markup for:
data-srcset | In case of image media, this contains the srcset string. (more info)

http://learn.getgrav.org/content/media/#responsive-images
should be:
http://learn.getgrav.org/content/media#responsive-images

nextSibling returning collection

I have a page variable that shows up like this when I dump it :
{{ dump(page) }}

Grav\Common\Page\Page {#189
  #name: "news-item.md"
  #folder: "slicing-meat-perfectly"
  #path: "/home/pz/Code/pp/user/pages/02.news"
  #extension: ".md"
  #url_extension: ""
  #id: "14796693254b05940b2b54fa4d02652305bc165011"
  #parent: "/home/pz/Code/pp/user/pages/02.news"
  #template: "news-item"
  #expires: null
  #visible: false
  #published: true
  #publish_date: null
  #unpublish_date: null
  #slug: "slicing-meat-perfectly"
  #route: "/news/slicing-meat-perfectly"
  #raw_route: "/news/slicing-meat-perfectly"
  #url: null
  #routes: null
  #routable: true
  #modified: 1479669325
  #redirect: null
  #external_url: null
  #items: null
  #header: {#187
    +"title": "Slicing Meat Perfectly"
    +"date": "09:34 07/01/2015"
    +"description": "Not sure where to start! It can go left, it can go right, it can go up, it can go down! The head spins and spins, it never stops!"
    +"imageMainBackground": "individual-backgrounds/outside.jpg"
    +"taxonomy": array:3 [
      "category" => "Food"
      "tag" => array:2 [
        0 => "reflection"
        1 => "thoughts"
      ]
      "author" => "ksmith"
    ]
  }
  ...

When I call {{ dump(page.nextSibling()) }} I get a collection :

Grav\Common\Page\Collection {#622
  #pages: Grav\Common\Page\Pages {#100
    #grav: Grav\Common\Grav {#3
      #processors: array:13 [
        0 => "siteSetupProcessor"
        1 => "configurationProcessor"
        2 => "errorsProcessor"
        3 => "debuggerInitProcessor"
        4 => "initializeProcessor"
        5 => "pluginsProcessor"
        6 => "themesProcessor"
        7 => "tasksProcessor"
        8 => "assetsProcessor"
        9 => "twigProcessor"
        10 => "pagesProcessor"
        11 => "debuggerAssetsProcessor"
        12 => "renderProcessor"
      ]
      -values: array:48 [
        "loader" => Composer\Autoload\ClassLoader {#1
          -prefixLengthsPsr4: array:7 [
            "W" => array:1 [ …1]
            "S" => array:7 [ …7]
            "R" => array:8 [ …8]
            "M" => array:3 [ …3]
            "L" => array:1 [ …1]
            "G" => array:1 [ …1]
            "D" => array:2 [ …2]
          ]

I'm expecting the next page object, not this collection. The collection that I have passed down to my twig templates looks like this:

content:
    items: 
        '@taxonomy.category': 'Food'
    order:
        by: date
        dir: desc
    limit: 30
    pagination: true

I actually have another section with a collection using taxonomy "News" that has the next and previous sibling functions correctly returning the next or previous page object, I am stumped.

Typo in example of accessing "header" map

Hey guys,
I think there is a typo in the documentation where access of the pages headers map is written about.
It says "page.headers.author" for instance. In my opinion it should read "page.header.author" instead.
It took me a while to find out why a custom header variable was not printed in a twig template.
But maybe I am wrong, who knows ;-)
Cheers
Thorsten

Bitbucket authentication?

Is this standard bitbucket behavior?

Cloning into 'user/plugins/gravui'...
Username for 'https://bitbucket.org': attiks
Password for 'https://[email protected]': 
remote: Unauthorized
fatal: Authentication failed for 'https://bitbucket.org/rockettheme/grav-plugin-gravui/'
SUCCESS cloned https://bitbucket.org/rockettheme/grav-plugin-gravui -> /home/peter/projecten/grav-learn//user/plugins/gravui

Cause by https://github.com/getgrav/grav-learn/blob/develop/.dependencies#L22

Permissions troubleshooting page should account for files in bin

The example script shows setting all files to 644, this will remove the executable bit from bin/grav and bin/gpm.

If the script is intended to be run from the top of the grav install
find . -type f ! -path "./bin/" | xargs chmod 644
find . -type f -path "./bin/
" | xargs chmod 755

Theme Basics - Theme Folders image

For this image ![Theme Folders](theme-folders.png), the path is not correct thus the image cannot be displayed, but I don't know what it should be.

Multi-Language: language selection by browser unclear/very strict

Maybe this is not only a documentation issue: the Multi-Language page (under Content) indicates that it is possible to select the language by a browser's Accept Language header but it does not describe in detail how this type of content negotiation is processed.

The practical issue with that approach is that most browsers set the value of Accept Language by the localization settings of the underlying operating system. If one installes Chrome in London then "en-gb" is set, if one installes in Boston then "en-us" is set, if one installes in Sidney then "en-au" is set.

On the other hand most makers of a web site will provide only a single page "in English" and not making a destinction between British and US English.

By my testing Grav does not fall-back to pages created in English (en) if the browser sends "en-gb".

Therefore this very strict behaviour should be explained in the documentation or the software should be changed to support such a fall-back.

Increase readibility with smaller font-size

First of all, thanks for a great project with some very nice docs!

What I've found when referring to the documentation however, is that I often miss things in the text because of its pretty large font-size, even on smaller screens. To increase readability, I'd like to propose that the body text's font-size is decreased from 18px to 14px, and that a max-width of about 900px is set on the content container.

Ideally, I'd also like for the headings to be a bit smaller as well, and for the <h1> to be less dramatic. I realize that the <h1> uses the identity style of Grav, but for the docs, I think that the argument to first and foremost make them easily digestible carries a lot of weight.

When trying out these changes in my browser, I must say that that they really made the docs a lot more readable to me. I've attached a screenshot showing what it looks like.

screenshot 2016-07-07 11 03 25

If you like, I could submit a PR for these changes!

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.