topiary-io / topiary

a modern content management system
Other
2 stars 0 forks source link

Rename AdminLocation #16

Closed schtauffen closed 8 years ago

schtauffen commented 8 years ago

I propose we add all topiary-specific variables to a new section of the config, as opposed to how it is currently (root of config.toml). I would also like to rename AdminLocation to adminRoot, and remove the trailing slash from the root:

AdminLocation = "/my-admin/"

->

[topiary]
  adminRoot = "/my-admin"

Let me know if you disagree, or would like to structure the variables differently.

doesntgolf commented 8 years ago

Agreed, we should have topiary configuration under [topiary]. The one hesitation I've had about adminlocation, though, is there are two possible meanings of our adminlocation/adminroot: the location for the admin on the FE, and the location of the admin templates in the input. In Hugo's configuration, they use contentdir/staticdir/layoutdir/etc. to describe the input locations. Should we have the location of the admin templates use admindir, and have adminroot describe the admin's FE location?

EDIT: Sorry, didn't mean to close this :)

schtauffen commented 8 years ago

I think that would make a lot of sense and agree we should separate the current AdminLocation into admindir and adminroot. I'm a little confused about Hugo's conventions when it comes to slashes, though. For the 'dirs they are not using slashes at all (source: http://gohugo.io/overview/configuration/):

contentdir = "content"

But for paths they use both leading and trailing slashes:

baseurl = "http://yoursite.example.com/"
post = "/:year/:month/:title/"

->

baseurl = "http://yoursite.example.com"
post = "/:year/:month/:title"

In my opinion there is little reason to use trailing slashes. However, we should probably use "path" which takes care of standardization. It seems to follow the same convention I am used to, at least in regards to dropping the trailing slash:

https://play.golang.org/p/hvS6ehifMx https://golang.org/pkg/path/#Join

doesntgolf commented 8 years ago

In my opinion there is little reason to use trailing slashes. However, we should probably use "path" which takes care of standardization. It seems to follow the same convention I am used to, at least in regards to dropping the trailing slash:

SGTM :+1:

schtauffen commented 8 years ago

Path may not fit our needs - it appears golang wants urls to end with "/", and path seems to strip relative dots "./"