stacey icon indicating copy to clipboard operation
stacey copied to clipboard

Arbitrary insertion of images/Image captions

Open kariemil opened this issue 7 years ago • 4 comments

Hi Stacey community,

What's the best way to arbitrarily insert images into a "blog" post? So to have a bunch of text, then an image (with maybe a caption) etc.?

Furthermore, using the standard function of just displaying all the media in one go, is there a way to include captions below each instance?

kariemil avatar Aug 16 '18 15:08 kariemil

Use the @root_path or {{root.path} then content/mypagename/imagename.png as an <img> HTML tag

desbest avatar Apr 01 '20 12:04 desbest

Use the @root_path or {{root.path} then content/mypagename/imagename.png as an tag

Please, can you be more explicit?

papillon-unix avatar May 08 '21 21:05 papillon-unix

Stacey is a flat file CMS meaning that all the content is stored in the file system as files and folders, instead of a database like a mysql/mariadb, sql server or sqlite database.

Because of this, each folder on your website that is stored inside the content/ folder represents a page. Also each sub-folder inside the content/ folder represents a page on your website that has a parent page. That's why mypagename in my above comment has to be replaced with the name of your page.

The @root_path in Stacey 2.3 or {{root.path}} in Stacey 3 is a variable that when put inside the content of your page you are editing, it will be replaced with the root directory of your website. So there is no need to include your domain name in your URL, which is better for multiple reasons, for one if you're moving your website from one domain to another.

There was a formatting error in my above comment, I actually meant a <img> HTML tag.

If editing plain html files is too confusing for you, I have created an admin panel frontend so you can edit your Stacey website in your web browser. #141

desbest avatar May 10 '21 01:05 desbest

thx, I ended up building an Twig extension to replace image names in my content with the actual image it reffers to & formatting it with my design.

papillon-unix avatar Sep 21 '21 17:09 papillon-unix