Comments (4)
Use the @root_path or {{root.path} then content/mypagename/imagename.png as an <img>
HTML tag
from stacey.
Use the @root_path or {{root.path} then content/mypagename/imagename.png as an tag
Please, can you be more explicit?
from stacey.
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.
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)
- sub variables? HOT 4
- feedback when search results are not found
- Stacey on OSX Yosemite HOT 4
- crash if /content is a symlink HOT 2
- Updating from Stacey 2.3 HOT 1
- "Ñ" in variable? HOT 14
- Multilanguage HOT 1
- ![img](url){#id .class} HOT 1
- Installation problem OS X El capitan HOT 1
- Asset Display Order HOT 1
- Srcset + image sizes creation HOT 1
- php version issue HOT 10
- Update for php 7.1+ (Stacey 3 only) HOT 5
- Static site generator? HOT 5
- Errors using Stacey 2.3 in PHP 7 HOT 7
- Stacey 2.3 sometimes makes my cache corrupt by adding a duplicate "up one directory" HOT 1
- pagination HOT 2
- Twig number_format
- Twig Math in Stacey and Trailing Zero HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stacey.