Closed alecStewart1 closed 1 year ago
I've been procrastinating on building a site with Coleslaw for a bit, and part of what I have left to do is creating some static pages.
Although there's some questions I have:
Should these .page files be placed in the root directory of the blog? Even if my :deploy-dir is pointing to a public/ directory?
I have a working site at truex.eu. Almost everything is done with Coleslaw. My directory setup looks like this:
~/webdir/
"root@truex.eu:/var/www/html"
~/webdir/
and my images in ~/webdir/static/
Here is my init, maybe you can use it to check your syntax:
(:author "Spenser Truex"
:deploy-dir "user@truex.eu:/var/www/html"
:domain "http://truex.eu"
:excerpt-sep "<!--more-->"
:feeds ("article")
:plugins ((mathjax)
(sitemap)
(cl-who)
(3bmd-youtube)
(static-pages))
:routing ((:post "~a")
(:tag-index "tag/~a")
(:month-index "date/~a")
(:static "static/~a")
(:numeric-index "~d")
(:feed "~a.xml")
(:tag-feed "tag/~a.xml"))
:sitenav ((:url "/index.html" :name "Home")
(:url "https://github.com/equwal" :name "Github")
(:url "/call.html" :name "Contact")
(:url "/bio.html" :name "Bio")
(:url "/resume.html" :name "Resume")
(:url "/irc.html" :name "IRC Bouncer"))
:staging-dir "~/webdir/tmp/coleslaw"
:title "equwal"
:license ""
:theme "hyde" ;; from /themes/
)
;; * Prerequisites described in plugin docs.
Make sure you included the static pages plugin.
> Will .page files take on anything from the base.tmpl, such as important things like a navbar and footer? Or would those have to be created as navbar.tmpl and footer.tmpl to then be able to require those components in the rendered .page files?
The Base.tmpl will apply some things to your pages. You can change it.
> Do .page files except the Closure templating syntax?
Feel free to write a compatible implementation.
@equwal
I have this (without some specific details) as my .coleslawrc
(:author "Me"
:deploy-dir "/home/bigdaddy/blog/public/"
:domain "https://my-domain-name.xyz"
:excerpt-sep "<!--more-->"
:feeds ("tech" "gaming" "fitness" "misc")
:plugins (
;;(analytics :tracking-code "foo")
(disqus :shortname "my-site-name") ;; <- need to setup this up
;;(incremental) ;; *Remove comment to enable incremental builds.
(mathjax)
(sitemap)
(static-pages)
;;(versioned) ;; *Remove comment to enable symlinked, timestamped deploys.
)
:routing ((:post "posts/~a")
(:tag-index "tag/~a")
(:month-index "date/~a")
(:numeric-index "~d")
(:feed "~a.xml")
(:tag-feed "tag/~a.xml"))
:sitenav ((:url "http://my-domain-name.xyz/" :name "Home")
(:url "http://my-domain-name.xyz/public/about.html" :name "About")
(:url "http://github.com/The-BigDaddy" :name "Code")
(:url "http://my-domain-name.xyz/public/contact.html" :name "Contact"))
:staging-dir "/tmp/coleslaw/"
:title "A Personal Website and a Lame Blog w/ Sarcasm"
:theme "cold-bulma")
;; ^ a theme I've been working on that uses [Bulma](https://bulma.io)
;; * Prerequisites described in plugin docs.
Probably would've benefitted me, to post that here earlier.
Here's the tree of my blog
directory
/home/bigdaddy/blog
├── about.page
├── node_modules
│ └── bulma
│ ├── CHANGELOG.md
│ ├── LICENSE
│ ├── README.md
│ ├── bulma.sass
│ ├── css
│ │ ├── bulma.css
│ │ ├── bulma.css.map
│ │ └── bulma.min.css
│ ├── package.json
│ └── sass
│ ├── base
│ │ ├── _all.sass
│ │ ├── generic.sass
│ │ ├── helpers.sass
│ │ └── minireset.sass
│ ├── components
│ │ ├── _all.sass
│ │ ├── breadcrumb.sass
│ │ ├── card.sass
│ │ ├── dropdown.sass
│ │ ├── level.sass
│ │ ├── list.sass
│ │ ├── media.sass
│ │ ├── menu.sass
│ │ ├── message.sass
│ │ ├── modal.sass
│ │ ├── navbar.sass
│ │ ├── pagination.sass
│ │ ├── panel.sass
│ │ └── tabs.sass
│ ├── elements
│ │ ├── _all.sass
│ │ ├── box.sass
│ │ ├── button.sass
│ │ ├── container.sass
│ │ ├── content.sass
│ │ ├── form.sass
│ │ ├── icon.sass
│ │ ├── image.sass
│ │ ├── notification.sass
│ │ ├── other.sass
│ │ ├── progress.sass
│ │ ├── table.sass
│ │ ├── tag.sass
│ │ └── title.sass
│ ├── grid
│ │ ├── _all.sass
│ │ ├── columns.sass
│ │ └── tiles.sass
│ ├── layout
│ │ ├── _all.sass
│ │ ├── footer.sass
│ │ ├── hero.sass
│ │ └── section.sass
│ └── utilities
│ ├── _all.sass
│ ├── animations.sass
│ ├── controls.sass
│ ├── derived-variables.sass
│ ├── functions.sass
│ ├── initial-variables.sass
│ └── mixins.sass
├── package.json
├── post-receive
├── public
│ ├── atom.xml
│ ├── css
│ │ └── style.css
│ ├── img
│ │ ├── cc-by-sa.png
│ │ ├── logo_large.jpg
│ │ ├── logo_medium.jpg
│ │ ├── logo_small.jpg
│ │ └── bulma-logo.png
│ ├── index.html -> 1.html
│ ├── rss.xml
│ └── tag
│ ├── fitness-atom.xml
│ ├── fitness-rss.xml
│ ├── gaming-atom.xml
│ ├── gaming-rss.xml
│ ├── misc-atom.xml
│ ├── misc-rss.xml
│ ├── tech-atom.xml
│ └── tech-rss.xml
├── themes
│ └── cold-bulma
│ ├── base.tmpl
│ ├── css
│ │ └── blog.css
│ ├── img
│ │ ├── cc-by-sa.png
│ │ └── logo_small.jpg
│ ├── index.tmpl
│ ├── post.tmpl
│ └── sass
│ └── blog.sass
└── yarn.lock
20 directories, 84 files
Maybe this is just me guessing, but it seems easiest to just have all .post
and .page
files in the root directory. Which I'd rather organize things in a nicer way, but it's not an issue really.
If you put them in their own sub-directories in your source root, they will get pushed to the root directory when you generate the site. You can also use symlinks if you want some files to be elsewhere ln -s target source
.
I've been procrastinating on building a site with Coleslaw for a bit, and part of what I have left to do is creating some static pages.
Although there's some questions I have:
Should these
.page
files be placed in the root directory of the blog? Even if my:deploy-dir
is pointing to apublic/
directory?Will
.page
files take on anything from thebase.tmpl
, such as important things like a navbar and footer? Or would those have to be created asnavbar.tmpl
andfooter.tmpl
to then be able to require those components in the rendered.page
files?Do
.page
files except the Closure templating syntax?