Code Monkey home page Code Monkey logo

Comments (4)

desbest avatar desbest commented on July 28, 2024

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

from stacey.

papillon-unix avatar papillon-unix commented on July 28, 2024

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

Please, can you be more explicit?

from stacey.

desbest avatar desbest commented on July 28, 2024

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

from stacey.

papillon-unix avatar papillon-unix commented on July 28, 2024

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.

from stacey.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.