Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

[Getting Started] Fixed more sphinx stuff #113

Merged
merged 13 commits into from
Apr 17, 2013
Merged

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Apr 7, 2013

This PR fixes every sphinx/doc standards stuff I could find in the Getting Started articles:

  • missing indexes
  • wrongly formatted headings and lists
  • missing formats
  • heading capitializing
  • wrong yaml code

Please note this is not a WIP, it can be merged :)

- Multi-site.
- Multi-language.
- Tree-like structure for easier management.
- User defined URLs;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. I've never seen semi-colons at the end of list items before, but maybe I'm being blind :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's something that Fabian introduced in the core documentation. We generally end every list item with a semi colon, except the last one.

@dantleech
Copy link
Member

This is really good :)

<symfony-cmf-routing-extra:controllers-by-type
type="editablestatic"
>
sandbox_main.controller:indexAction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that whilst having the node value on its own line makes it much more readable, that extra whitespace also becomes part of the value, unless stripped by the RoutingExtraBundle. I say this because I am currently configuring parameters in the DIC XML config and they have to be inline with no surrounging whitespace (I really /want/ to do what you do here, but its not possible afaik)

dbu added a commit that referenced this pull request Apr 17, 2013
[Getting Started] Fixed more sphinx stuff
@dbu dbu merged commit 2f64665 into symfony-cmf:master Apr 17, 2013
@dbu
Copy link
Member

dbu commented Apr 17, 2013

thanks a ton wouter!

@@ -66,6 +74,18 @@ menu ``simple``, the menu root node must be stored at ``/cms/menu/simple``.
symfony_cmf_menu:
menu_basepath: /cms/menu

.. code-block:: xml

<symfony-cmf-menu:config>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wouterj i had a chat with @dantleech regarding the namespace prefixes. i wonder if we could not make those prefixes shorter, like cmf-menu here. the symfony- adds nothing and its just prefixes, so if ever somebody finds another cmf-menu prefix he can just use different namespace mappings. wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbu I just had another idea to make the xml formats somewhat cleaner. We could set the default namespace to http://cmf.symfony.com/schema/dic/... inside the config element, that means we only need the prefix for the first element (config):

<container xmlns="http://symfony.com/schema/dic/symfony"
    xmlns:cmf-menu="http://cmf.symfony.com/schema/dic/menu"
>
    <!-- ... -->

    <cmf-menu:config xmlns="http://cmf.symfony.com/schema/dic/menu">
        <menu-basepath>/cms/menu</menu-basepath>
    </cmf-menu:config>
</container>

I think it makes the xml format more readable, but it can also confuse people. What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. advanced xml indeed. its elegant but when people copy-paste around xml fragments and are not too familiar with xml, it could easily end up in non-working things that are hard to understand. what does symfony core do in such cases?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ryan and I are discussing this for a long time. The core docs has as much working examples as possible (because Ryan wants that).
I think it's good to have some more readable examples when using advanced formats. For instance, I don't believe people who didn't have knowledge of XML will use it: (a) yaml is always easier to understand and (b) yaml is always before XML and (c) if they don't use yaml, they will use PHP because that's more familair.

I think the only people who use XML are people who know XML or people who write open source bundles (because XML is validationable). So I don't think it will be much of a problem to use advanced things.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i can follow that reasoning, lets do the way you propose then.

@wouterj wouterj deleted the reread_1 branch June 26, 2013 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants