Comments (9)
Agreed on both fronts. Will see if I can push it into hotfix release (0.2.1) next week.
Thanks!
from phrozn.
Awesome! I'll see if I can free up some time to try and help you out with some actual code, unless you beat me to it.
from phrozn.
Hi. I'm experiencing this problem in 0.5.3 beta. phr up src dest
appends "/.." to dest
, generating files in src/../
. The workaround is to use something like phr up src dest/discarded_word
.
Edit: Moved --regen
issue to #76.
from phrozn.
Hi @alexgieg,
can you explain more what you are doing? In my env static generation works fine,
$ mkdir src dest
$ phr init src
$ ls -las src/
4 drwxrwxr-x 3 walter walter 4096 Feb 5 19:08 .
4 drwxrwxr-x 3 walter walter 4096 Feb 5 19:08 ..
4 drwxrwxr-x 9 walter walter 4096 Feb 5 19:08 .phrozn
$ phr up src dest
Phrozn 0.5.3DEV by Victor Farazdagi
Starting static site compilation.
[OK] Source directory located: /home/walter/git/test/src/.phrozn/
[OK] Destination directory located: /home/walter/git/test/dest/
[OK] ./src/.phrozn/entries/demos/tabs.twig parsed
[OK] ./dest/demos/tabs.html written
[OK] ./src/.phrozn/entries/demos/modal.twig parsed
[OK] ./dest/demos/modal.html written
[OK] ./src/.phrozn/entries/demos/twipsy.twig parsed
[OK] ./dest/demos/twipsy.html written
[OK] ./src/.phrozn/entries/demos/popup.twig parsed
[OK] ./dest/demos/popup.html written
[OK] ./src/.phrozn/entries/about.twig parsed
[OK] ./dest/about/index.html written
[OK] ./src/.phrozn/styles/bootstrap.less parsed
[OK] ./dest/styles/bootstrap.css written
[OK] ./src/.phrozn/styles/default.less parsed
[OK] ./dest/styles/default.css written
[OK] ./src/.phrozn/scripts/default.js parsed
[OK] ./dest/scripts/default.js written
[OK] ./dest/media/README copied
[OK] ./dest/media/img/phrozn.png copied
[OK] ./dest/media/img/README copied
Phrozn is extremely flexible static site generator for PHP.
For additional information, see http://phrozn.info
$ ls -l dest/
total 32
drwxrwxr-x 2 walter walter 4096 Feb 5 19:09 about
drwxrwxr-x 2 walter walter 4096 Feb 5 19:09 demos
-rw-rw-r-- 1 walter walter 10328 Feb 5 19:09 index.html
drwxrwxr-x 3 walter walter 4096 Feb 5 19:09 media
drwxrwxr-x 2 walter walter 4096 Feb 5 19:09 scripts
drwxrwxr-x 2 walter walter 4096 Feb 5 19:09 styles
Effectively --regen
seems not working properly.
from phrozn.
This could be related to #75
from phrozn.
Ah! I got what was wrong. Instead of using src
, my script was referring to src/.phrozn
:
With a relative destination path:
$ mkdir src dst
$ phr init src
$ phr up src/.phrozn dst
Phrozn 0.5.3 by Victor Farazdagi
Starting static site compilation.
[OK] Source directory located: /home/private/a/src/.phrozn/
[OK] Destination directory located: /../
[OK] ./src/.phrozn/entries/index.twig parsed
[OK] /../index.html written
[OK] ./src/.phrozn/entries/demos/tabs.twig parsed
[OK] /../demos/tabs.html written
[OK] ./src/.phrozn/entries/demos/twipsy.twig parsed
[OK] /../demos/twipsy.html written
[OK] ./src/.phrozn/entries/demos/modal.twig parsed
[OK] /../demos/modal.html written
[OK] ./src/.phrozn/entries/demos/popup.twig parsed
[OK] /../demos/popup.html written
[OK] ./src/.phrozn/entries/about.twig parsed
[OK] /../about/index.html written
[OK] ./src/.phrozn/styles/bootstrap.less parsed
[OK] /../styles/bootstrap.css written
[OK] ./src/.phrozn/styles/default.less parsed
[OK] /../styles/default.css written
[OK] ./src/.phrozn/scripts/default.js parsed
[OK] /../scripts/default.js written
[FAIL] /home/private/a/src/.phrozn/media/README: Failed transfering "/home/private/a/src/.phrozn/media/README" from media folder
[FAIL] /home/private/a/src/.phrozn/media/img/README: Failed transfering "/home/private/a/src/.phrozn/media/img/README" from media folder
[FAIL] /home/private/a/src/.phrozn/media/img/phrozn.png: Failed transfering "/home/private/a/src/.phrozn/media/img/phrozn.png" from media folder
(Followed by several error messages due to the root filesystem being read-only.)
With an absolute destination path:
$ mkdir src dst
$ ls
dst/ src/
$ phr init src
$ phr up src/.phrozn ~/a/dst
Phrozn 0.5.3 by Victor Farazdagi
Starting static site compilation.
[OK] Source directory located: /home/private/a/src/.phrozn/
[OK] Destination directory located: /home/private/a/dst/../
[OK] ./src/.phrozn/entries/about.twig parsed
[OK] ./dst/../about/index.html written
[OK] ./src/.phrozn/entries/demos/popup.twig parsed
[OK] ./dst/../demos/popup.html written
[OK] ./src/.phrozn/entries/demos/tabs.twig parsed
[OK] ./dst/../demos/tabs.html written
[OK] ./src/.phrozn/entries/demos/twipsy.twig parsed
[OK] ./dst/../demos/twipsy.html written
[OK] ./src/.phrozn/entries/demos/modal.twig parsed
[OK] ./dst/../demos/modal.html written
[OK] ./src/.phrozn/entries/index.twig parsed
[OK] ./dst/../index.html written
[OK] ./src/.phrozn/styles/default.less parsed
[OK] ./dst/../styles/default.css written
[OK] ./src/.phrozn/styles/bootstrap.less parsed
[OK] ./dst/../styles/bootstrap.css written
[OK] ./src/.phrozn/scripts/default.js parsed
[OK] ./dst/../scripts/default.js written
[OK] ./media/img/phrozn.png copied
[OK] ./media/img/README copied
[OK] ./media/README copied
$ ls dst
(empty)
$ ls
about/ demos/ dst/ index.html media/ scripts/ src/ styles/
I guess a sanity check with an error message would solve this nicely, but it'd be more interesting if the src
folder could actually be a direct folder rather than a hidden .phrozn
subfolder within an otherwise empty folder. It'd make editing and moving things around easier for the case when one has the source in one place and the generated content elsewhere. Perhaps something like a phr init --bare src
command resulting in this:
$ mkdir src
$ phr init --bare src
$ ls src
archive/ config.yml entries/ layouts/ media/ plugins/ scripts/ styles/
With a corresponding phr up --bare src dst
, or even a self-detecting phr up
that'd show an error message and require an explicit dst
when a bare src
was detected. It'd certainly help my workflow. What do you think? :)
Edit: Moved --regen
issue to #76.
from phrozn.
I think that this issue is absolutelly related to PR #75 that should simplify the project generation.
The regenerate option not working I think that we need to open a dedicated issue for this problem in order to simplify issues management.
from phrozn.
Hi! Sorry for the delay. True enough, I'm opening a new issue about the regen not working: #76.
from phrozn.
Compiling into custom directory is now implemented. And since -R/--regen issue got its own ticket, closing this one.
from phrozn.
Related Issues (20)
- Replace PEAR console libs with Symfony Console component
- default.twig in phrozn/skeleton/layouts links to Bootstrap no longer work HOT 2
- Jekyll Style Includes? HOT 1
- Sample site: css and js broken on nested pages
- Code block nukes white space
- Phrozn as library HOT 1
- Add dev dependencies to composer.json HOT 1
- Twig_Error_Syntax : The filter "raw" does not exist
- Broken links and deprecated link on phrozn.info
- -R/--regen flag doesn't work HOT 2
- Is PEAR supposed to be required? HOT 5
- Support for Scss HOT 4
- Phrozn installed with Composer still requires PEAR to be installed HOT 1
- Composer Autoloader will not load plugins from project Directory. HOT 4
- Sample site does not compile if src directory is not . HOT 1
- Cannot create directory if file exists and returns 0
- Can't run phr init HOT 1
- local server? HOT 2
- @variable@ not replaced when installed using composer HOT 2
- Blog-like functionality and related variables/values HOT 2
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 phrozn.