Skip to content

Commit

Permalink
refo
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Apr 26, 2010
1 parent dba0aff commit 4451f05
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
17 changes: 12 additions & 5 deletions project-site.mk → Makefile.mk
Expand Up @@ -9,7 +9,7 @@ ALL_CONTENT := $(shell if [ -e content ]; then find content/ -type f | grep -v '
SITE = site SITE = site
TEMPLATE = template TEMPLATE = template


PROJECT_SITE_BASE = $(MAKEFILE_LIST:%/project-site.mk=%) PROJECT_SITE_BASE = $(MAKEFILE_LIST:%/Makefile.mk=%)
PROJECT_SITE_CSS = project-site.css PROJECT_SITE_CSS = project-site.css
PROJECT_SITE_DIRS = \ PROJECT_SITE_DIRS = \
bin \ bin \
Expand Down Expand Up @@ -62,12 +62,21 @@ SITE_FILES = $(SITE_HTML) $(SITE_CSS)
# Make Targets # Make Targets
# #


default:
@echo 'There is no default target. You probably want one of these:'
@echo ''
@echo ' new - Create a new project'
@echo ' update - Update existing project'
@echo ''

# debug: # debug:
# echo $(MAKEFILE) # echo $(MAKEFILE)
# @echo '>>' $(SITE_DIRS) # @echo '>>' $(SITE_DIRS)
# @echo '>>>' $(SITE_FILES) # @echo '>>>' $(SITE_FILES)


website: $(SITE_DIRS) $(SITE_FILES) new: $(PROJECT_SITE_FILES)

update: $(SITE_DIRS) $(SITE_FILES)


$(SITE_CSS): $(TEMPLATE)/$(PROJECT_SITE_CSS) Makefile config.yaml $(SITE_CSS): $(TEMPLATE)/$(PROJECT_SITE_CSS) Makefile config.yaml
tt-render --path=$(TEMPLATE) --data=config.yaml $(PROJECT_SITE_CSS) > $@ tt-render --path=$(TEMPLATE) --data=config.yaml $(PROJECT_SITE_CSS) > $@
Expand All @@ -90,8 +99,6 @@ template/%.html: content/%.pod
$(SITE_DIRS) $(PROJECT_SITE_DIRS): $(SITE_DIRS) $(PROJECT_SITE_DIRS):
mkdir -p $@ mkdir -p $@


new: $(PROJECT_SITE_FILES)

# XXX Not working yet :\ # XXX Not working yet :\
# upgrade: # upgrade:
# make -f $(MAKEFILE) new # make -f $(MAKEFILE) new
Expand All @@ -103,7 +110,7 @@ $(SITE)/index.html:
cp -p $(PROJECT_SITE_BASE)/gitignore $@ cp -p $(PROJECT_SITE_BASE)/gitignore $@


Makefile: Makefile:
ln -s $(PROJECT_SITE_BASE)/project-site.mk $@ ln -s $(PROJECT_SITE_BASE)/Makefile.mk $@


htdocs: htdocs:
ln -s $(SITE) $@ ln -s $(SITE) $@
Expand Down
1 change: 0 additions & 1 deletion README

This file was deleted.

1 change: 0 additions & 1 deletion SETUP

This file was deleted.

6 changes: 3 additions & 3 deletions SETUP.rst
Expand Up @@ -8,12 +8,12 @@ Project Site is easy to set up. Just follow these easy steps::
> git clone git://github.com/ingydotnet/project-site.git > git clone git://github.com/ingydotnet/project-site.git
> mkdir your-project-name > mkdir your-project-name
> cd your-project-name > cd your-project-name
> make -f ../project-site/project-site.mk new > make -f ../project-site/Makefile.mk new
... edit the config.yaml file appropriately ... edit the config.yaml file appropriately
... add the appropriate image files to site/images/ ... add the appropriate image files to site/images/
... edit files in the content directory (See below) ... edit files in the content directory (See below)
> make website > make update
... repeat edit & 'make website' as necessary ... repeat edit & 'make update' as necessary


The directory ``your/server/website/path/your-project-name/site/`` is your The directory ``your/server/website/path/your-project-name/site/`` is your
website's root directory. You'll need to configure your web server to point at website's root directory. You'll need to configure your web server to point at
Expand Down

0 comments on commit 4451f05

Please sign in to comment.