Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arbitrary insertion of images/Image captions #159

Open
kariemil opened this issue Aug 16, 2018 · 4 comments
Open

Arbitrary insertion of images/Image captions #159

kariemil opened this issue Aug 16, 2018 · 4 comments

Comments

@kariemil
Copy link

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?

@desbest
Copy link

desbest commented Apr 1, 2020

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

@papillon-unix
Copy link

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

Please, can you be more explicit?

@desbest
Copy link

desbest commented May 10, 2021

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

@papillon-unix
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants